summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch50
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch17
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch104
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-hardcode-linux-as-the-host-system.patch27
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch2
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch91
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch44
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch2
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb4
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc41
10 files changed, 316 insertions, 66 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch
new file mode 100644
index 0000000000..ede29c90ba
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch
@@ -0,0 +1,50 @@
1From 474e59abec88de0c455836c1f53152bf2aa26c34 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 15 Feb 2019 11:17:27 +0100
4Subject: [PATCH] Do not write $bindir into pkg-config files
5
6This would otherwise break when using the files to build other target
7components (we need to rely on PATH containing the paths to utilities,
8rather than use target paths).
9
10Upstream-Status: Inappropriate [upstream wants the paths in .pc files]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12---
13 gio/meson.build | 6 +++---
14 glib/meson.build | 6 +++---
15 2 files changed, 6 insertions(+), 6 deletions(-)
16
17diff --git a/gio/meson.build b/gio/meson.build
18index 85d8b14..657720a 100644
19--- a/gio/meson.build
20+++ b/gio/meson.build
21@@ -813,9 +813,9 @@ pkg.generate(libraries : libgio,
22 'schemasdir=' + join_paths('${datadir}', schemas_subdir),
23 'bindir=' + join_paths('${prefix}', get_option('bindir')),
24 'giomoduledir=' + giomodulesdir,
25- 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'),
26- 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'),
27- 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen')],
28+ 'glib_compile_schemas=glib-compile-schemas',
29+ 'glib_compile_resources=glib-compile-resources',
30+ 'gdbus_codegen=gdbus-codegen'],
31 version : glib_version,
32 install_dir : glib_pkgconfigreldir,
33 filebase : 'gio-2.0',
34diff --git a/glib/meson.build b/glib/meson.build
35index c05c694..434e8b1 100644
36--- a/glib/meson.build
37+++ b/glib/meson.build
38@@ -261,9 +261,9 @@ pkg.generate(libraries : [libglib, libintl],
39 subdirs : ['glib-2.0'],
40 extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
41 variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')),
42- 'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'),
43- 'gobject_query=' + join_paths('${bindir}', 'gobject-query'),
44- 'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')],
45+ 'glib_genmarshal=glib-genmarshal',
46+ 'gobject_query=gobject-query',
47+ 'glib_mkenums=glib-mkenums'],
48 version : glib_version,
49 install_dir : glib_pkgconfigreldir,
50 filebase : 'glib-2.0',
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
index 97d0aff5d6..f246254942 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
@@ -1,4 +1,4 @@
1From 856045927b9ab391165c0ebabf401835f8439eab Mon Sep 17 00:00:00 2001 1From 17fc9230fb932432d8faaaabf8c56fdc4845495e Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com> 2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Tue, 22 Mar 2016 15:14:58 +0200 3Date: Tue, 22 Mar 2016 15:14:58 +0200
4Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM 4Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM
@@ -11,7 +11,8 @@ Upstream-Status: Inappropriate [OE specific]
11 11
12--- 12---
13 gio/Makefile.am | 3 ++- 13 gio/Makefile.am | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-) 14 gio/meson.build | 1 +
15 2 files changed, 3 insertions(+), 1 deletion(-)
15 16
16diff --git a/gio/Makefile.am b/gio/Makefile.am 17diff --git a/gio/Makefile.am b/gio/Makefile.am
17index e14cad2..bf2bcc7 100644 18index e14cad2..bf2bcc7 100644
@@ -27,3 +28,15 @@ index e14cad2..bf2bcc7 100644
27 28
28 glib_compile_resources_LDADD = libgio-2.0.la \ 29 glib_compile_resources_LDADD = libgio-2.0.la \
29 $(top_builddir)/gobject/libgobject-2.0.la \ 30 $(top_builddir)/gobject/libgobject-2.0.la \
31diff --git a/gio/meson.build b/gio/meson.build
32index b83d8f5..85d8b14 100644
33--- a/gio/meson.build
34+++ b/gio/meson.build
35@@ -925,6 +925,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
36 c_args : gio_c_args,
37 # intl.lib is not compatible with SAFESEH
38 link_args : noseh_link_args,
39+ install_dir: glib_libexecdir,
40 dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep])
41
42 glib_compile_schemas = executable('glib-compile-schemas',
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
new file mode 100644
index 0000000000..2b7fab7bde
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
@@ -0,0 +1,104 @@
1From 4169f11beedacfbb8c7934a4c99189d44935a6b9 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 13 Feb 2019 15:32:05 +0100
4Subject: [PATCH] Set host_machine correctly when building with mingw32
5
6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9---
10 gio/tests/meson.build | 8 ++++----
11 glib/tests/meson.build | 4 ++--
12 meson.build | 3 +++
13 tests/meson.build | 2 +-
14 4 files changed, 10 insertions(+), 7 deletions(-)
15
16diff --git a/gio/tests/meson.build b/gio/tests/meson.build
17index 181f5c7..11a1f12 100644
18--- a/gio/tests/meson.build
19+++ b/gio/tests/meson.build
20@@ -12,7 +12,7 @@ test_c_args = [
21 '-DGLIB_COMPILE_SCHEMAS="@0@"'.format(glib_compile_schemas.full_path()),
22 ]
23
24-if host_machine.system() == 'windows'
25+if host_system == 'windows'
26 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
27 endif
28
29@@ -122,7 +122,7 @@ if dbus1_dep.found()
30 endif
31
32 # Test programs buildable on UNIX only
33-if host_machine.system() != 'windows'
34+if host_system != 'windows'
35 gio_tests += [{
36 'file' : {},
37 'gdbus-peer' : {
38@@ -314,7 +314,7 @@ if host_machine.system() != 'windows'
39 endif # unix
40
41 # Test programs buildable on Windows only
42-if host_machine.system() == 'windows'
43+if host_system == 'windows'
44 gio_tests += [{'win32-streams' : {}}]
45 endif
46
47@@ -379,7 +379,7 @@ if cc.get_id() != 'msvc'
48 }]
49 endif
50
51-if host_machine.system() != 'windows'
52+if host_system != 'windows'
53 test_extra_programs += [{
54 'gdbus-example-unix-fd-client' : {
55 'install' : false,
56diff --git a/glib/tests/meson.build b/glib/tests/meson.build
57index d7b6a7a..6678a08 100644
58--- a/glib/tests/meson.build
59+++ b/glib/tests/meson.build
60@@ -45,7 +45,7 @@ glib_tests = {
61 'hook' : {},
62 'hostutils' : {},
63 'include' : {
64- 'skip' : host_machine.system() == 'windows',
65+ 'skip' : host_system == 'windows',
66 },
67 'keyfile' : {},
68 'list' : {},
69@@ -112,7 +112,7 @@ glib_tests = {
70 'utils' : {},
71 'unicode' : {},
72 'unix' : {
73- 'skip' : host_machine.system() == 'windows',
74+ 'skip' : host_system == 'windows',
75 },
76 'uri' : {},
77 '1bit-mutex' : {},
78diff --git a/meson.build b/meson.build
79index f7405a2..4348f20 100644
80--- a/meson.build
81+++ b/meson.build
82@@ -31,6 +31,9 @@ else
83 endif
84
85 host_system = host_machine.system()
86+if host_system == 'mingw32'
87+ host_system = 'windows'
88+endif
89
90 glib_version = meson.project_version()
91 glib_api_version = '2.0'
92diff --git a/tests/meson.build b/tests/meson.build
93index 80e45d7..9f3869f 100644
94--- a/tests/meson.build
95+++ b/tests/meson.build
96@@ -67,7 +67,7 @@ test_extra_programs = {
97 'unicode-collate' : {},
98 }
99
100-if host_machine.system() != 'windows'
101+if host_system != 'windows'
102 tests += [{
103 'timeloop' : {},
104 'spawn-test' : {},
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-hardcode-linux-as-the-host-system.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-hardcode-linux-as-the-host-system.patch
new file mode 100644
index 0000000000..5a1a589890
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-hardcode-linux-as-the-host-system.patch
@@ -0,0 +1,27 @@
1From 635fe26af51f20194c8b208e7d01303be1086d68 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 19 Feb 2019 10:31:11 +0100
4Subject: [PATCH] meson.build: do not hardcode 'linux' as the host system
5
6OE build system can set this to other values that include 'linux',
7e.g. 'linux-gnueabi'
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 meson.build | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/meson.build b/meson.build
16index 4348f20..af5ed63 100644
17--- a/meson.build
18+++ b/meson.build
19@@ -1574,7 +1574,7 @@ atomicdefine = '''
20 # We know that we can always use real ("lock free") atomic operations with MSVC
21 if cc.get_id() == 'msvc' or cc.links(atomictest, name : 'atomic ops')
22 have_atomic_lock_free = true
23- if (host_system == 'android' or host_system == 'linux') and not cc.compiles(atomicdefine, name : 'atomic ops define')
24+ if (host_system == 'android' or host_system.contains('linux')) and not cc.compiles(atomicdefine, name : 'atomic ops define')
25 # When building for armv5 on Linux, gcc provides
26 # __sync_bool_compare_and_swap but doesn't define
27 # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
index 697d63d5fe..872340df96 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch
@@ -12,7 +12,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12 3 files changed, 3 insertions(+), 3 deletions(-) 12 3 files changed, 3 insertions(+), 3 deletions(-)
13 13
14diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in 14diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
15index 8050981..e693ef3 100644 15index 8050981..e693ef3 100755
16--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in 16--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
17+++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in 17+++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
18@@ -1,4 +1,4 @@ 18@@ -1,4 +1,4 @@
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
index 5060880926..5ccd3203fb 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -1,4 +1,4 @@
1From 70e462e070f8eb20b7660c1cf88271c0449e43cc Mon Sep 17 00:00:00 2001 1From 1481c6d5f08f9dbbe10abc87b372a1f61db36476 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com> 2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 9 Nov 2015 11:07:27 +0200 3Date: Mon, 9 Nov 2015 11:07:27 +0200
4Subject: [PATCH] Enable more tests while cross-compiling 4Subject: [PATCH] Enable more tests while cross-compiling
@@ -10,8 +10,10 @@ case we can depend on glib-2.0-native.
10Upstream-Status: Inappropriate [OE specific] 10Upstream-Status: Inappropriate [OE specific]
11Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 11Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
12--- 12---
13 gio/tests/Makefile.am | 10 ++++++---- 13 gio/tests/Makefile.am | 10 ++++++----
14 1 file changed, 6 insertions(+), 4 deletions(-) 14 gio/tests/meson.build | 15 ++++++++-------
15 tests/gobject/Makefile.am | 6 ++++++
16 3 files changed, 20 insertions(+), 11 deletions(-)
15 17
16diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am 18diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
17index c4e7a92..633e85c 100644 19index c4e7a92..633e85c 100644
@@ -50,3 +52,86 @@ index c4e7a92..633e85c 100644
50 52
51 BUILT_SOURCES += giotypefuncs.inc 53 BUILT_SOURCES += giotypefuncs.inc
52 54
55diff --git a/gio/tests/meson.build b/gio/tests/meson.build
56index dca33bd..181f5c7 100644
57--- a/gio/tests/meson.build
58+++ b/gio/tests/meson.build
59@@ -173,7 +173,7 @@ if host_machine.system() != 'windows'
60
61 # Test programs that need to bring up a session bus (requires dbus-daemon)
62 have_dbus_daemon = find_program('dbus-daemon', required : false).found()
63- if have_dbus_daemon
64+ if true
65 annotate_args = [
66 '--annotate', 'org.project.Bar', 'Key1', 'Value1',
67 '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
68@@ -406,12 +406,13 @@ if installed_tests_enabled
69 install_subdir('cert-tests', install_dir : installed_tests_execdir)
70 endif
71
72-if not meson.is_cross_build() or meson.has_exe_wrapper()
73+#if not meson.is_cross_build() or meson.has_exe_wrapper()
74+if meson.is_cross_build()
75
76 plugin_resources_c = custom_target('plugin-resources.c',
77 input : 'test4.gresource.xml',
78 output : 'plugin-resources.c',
79- command : [glib_compile_resources,
80+ command : ['glib-compile-resources',
81 '--target=@OUTPUT@',
82 '--sourcedir=' + meson.current_source_dir(),
83 '--generate-source',
84@@ -428,7 +429,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
85 test_gresource = custom_target('test.gresource',
86 input : 'test.gresource.xml',
87 output : 'test.gresource',
88- command : [glib_compile_resources,
89+ command : ['glib-compile-resources',
90 '--target=@OUTPUT@',
91 '--sourcedir=' + meson.current_source_dir(),
92 '--sourcedir=' + meson.current_build_dir(),
93@@ -439,7 +440,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
94 test_resources2_c = custom_target('test_resources2.c',
95 input : 'test3.gresource.xml',
96 output : 'test_resources2.c',
97- command : [glib_compile_resources,
98+ command : ['glib-compile-resources',
99 '--target=@OUTPUT@',
100 '--sourcedir=' + meson.current_source_dir(),
101 '--generate',
102@@ -450,7 +451,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
103 test_resources2_h = custom_target('test_resources2.h',
104 input : 'test3.gresource.xml',
105 output : 'test_resources2.h',
106- command : [glib_compile_resources,
107+ command : ['glib-compile-resources',
108 '--target=@OUTPUT@',
109 '--sourcedir=' + meson.current_source_dir(),
110 '--generate',
111@@ -461,7 +462,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
112 test_resources_c = custom_target('test_resources.c',
113 input : 'test2.gresource.xml',
114 output : 'test_resources.c',
115- command : [glib_compile_resources,
116+ command : ['glib-compile-resources',
117 '--target=@OUTPUT@',
118 '--sourcedir=' + meson.current_source_dir(),
119 '--generate-source',
120diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
121index 1bcefbe..77e646a 100644
122--- a/tests/gobject/Makefile.am
123+++ b/tests/gobject/Makefile.am
124@@ -51,7 +51,13 @@ if ENABLE_TIMELOOP
125 installed_test_programs += timeloop-closure
126 endif
127
128+# The marshal test requires running a binary, which means we require
129+# glib-native when cross-compiling
130+if !CROSS_COMPILING
131 glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
132+else
133+glib_genmarshal=$(shell which glib-genmarshal)
134+endif
135
136 testmarshal.h: stamp-testmarshal.h
137 @true
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
deleted file mode 100644
index 59b891347d..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 1dd1e6ddca5deada049bac2e1ee1fe4ecc5342c5 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 28 Apr 2012 18:24:50 +0200
4Subject: [PATCH 01/10] configure: use $host_alias-libtool instead of libtool
5 directly
6
7Poky renames libtool to $host_alias-libtool.
8./$host_alias-libtool isn't created until after configure runs with
9libtool >= 2.2.2
10so we can't call # it at this point. We can safely assume a version is
11available
12from PATH though
13
14Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>
15Rebased to glib-2.32.1 by Martin Jansa <Martin.Jansa@gmail.com>
16Rebased to glib-2.31.20+ by Andre McCurdy <armccurdy@gmail.com>
17
18Upstream-Status: Inappropriate [configuration]
19
20Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
21
22---
23 configure.ac | 4 ++--
24 1 file changed, 2 insertions(+), 2 deletions(-)
25
26diff --git a/configure.ac b/configure.ac
27index 6fa6eb0..b6f78a6 100644
28--- a/configure.ac
29+++ b/configure.ac
30@@ -1428,9 +1428,9 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
31 LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
32 dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
33 echo "void glib_plugin_test(void) { }" > plugin.c
34- ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
35+ ${SHELL} ./$host_alias-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \
36 ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1
37- ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
38+ ${SHELL} ./$host_alias-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \
39 ${LDFLAGS} -module -o plugin.la -export-dynamic \
40 -shrext ".o" -avoid-version plugin.lo \
41 -rpath /dont/care >/dev/null 2>&1
42--
432.14.1
44
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
index 9ec011a095..a4e0c9201f 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -1,4 +1,4 @@
1From 43967e85b7a87f9c2e780504ef30f4c9bf56f8f5 Mon Sep 17 00:00:00 2001 1From 9d985803c50cfb99253c757934985f937da34822 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com> 2From: Ross Burton <ross.burton@intel.com>
3Date: Fri, 11 Mar 2016 15:35:55 +0000 3Date: Fri, 11 Mar 2016 15:35:55 +0000
4Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds 4Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb
index 8aad570fa9..2de2affa51 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb
@@ -5,7 +5,6 @@ PE = "1"
5SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" 5SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
6 6
7SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ 7SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
8 file://configure-libtool.patch \
9 file://run-ptest \ 8 file://run-ptest \
10 file://uclibc_musl_translation.patch \ 9 file://uclibc_musl_translation.patch \
11 file://Enable-more-tests-while-cross-compiling.patch \ 10 file://Enable-more-tests-while-cross-compiling.patch \
@@ -14,6 +13,9 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
14 file://0001-Do-not-ignore-return-value-of-write.patch \ 13 file://0001-Do-not-ignore-return-value-of-write.patch \
15 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ 14 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
16 file://0001-Revert-Use-absolute-paths-in-pkg-config-files.patch \ 15 file://0001-Revert-Use-absolute-paths-in-pkg-config-files.patch \
16 file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
17 file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
18 file://0001-meson.build-do-not-hardcode-linux-as-the-host-system.patch \
17 " 19 "
18 20
19SRC_URI_append_class-native = " file://relocate-modules.patch" 21SRC_URI_append_class-native = " file://relocate-modules.patch"
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index a186c1d9eb..6305f553b4 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -29,7 +29,17 @@ PACKAGES += "${PN}-codegen ${PN}-utils"
29 29
30LEAD_SONAME = "libglib-2.0.*" 30LEAD_SONAME = "libglib-2.0.*"
31 31
32inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check 32inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check
33
34GTKDOC_ENABLE_FLAG = "-Dgtk_doc=true"
35GTKDOC_DISABLE_FLAG = "-Dgtk_doc=false"
36
37EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
38 '${GTKDOC_DISABLE_FLAG}', d)} "
39
40# This avoids the need to depend on target python3, which in case of mingw is not even possible.
41# meson's python configuration pokes into python3 configuration, so this provides the native config to it.
42unset _PYTHON_SYSCONFIGDATA_NAME
33 43
34REQUIRED_DISTRO_FEATURES_libc-glibc = "${@'libc-charsets libc-locale-code libc-locales' if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d) else ''}" 44REQUIRED_DISTRO_FEATURES_libc-glibc = "${@'libc-charsets libc-locale-code libc-locales' if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d) else ''}"
35 45
@@ -37,21 +47,17 @@ S = "${WORKDIR}/glib-${PV}"
37 47
38PACKAGECONFIG ??= "system-pcre libmount" 48PACKAGECONFIG ??= "system-pcre libmount"
39# To use the system pcre it must be configured with --enable-unicode-properties 49# To use the system pcre it must be configured with --enable-unicode-properties
40PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre" 50PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre"
41PACKAGECONFIG[libmount] = "--enable-libmount,--disable-libmount,util-linux" 51PACKAGECONFIG[libmount] = "-Dlibmount=true,-Dlibmount=false,util-linux"
42PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native" 52PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native"
43PACKAGECONFIG[libelf] = "--enable-libelf,--disable-libelf,elfutils" 53# libelf is auto-detected without a configuration option
54PACKAGECONFIG[libelf] = ",,elfutils"
44 55
45CORECONF = "--disable-dtrace --disable-fam --disable-systemtap" 56CORECONF = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=false"
46 57
47PRINTF = "--enable-included-printf=no" 58EXTRA_OEMESON = "${CORECONF} ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}"
48PRINTF_darwin = "--enable-included-printf=yes" 59EXTRA_OEMESON_class-native = "${CORECONF} -Dinstalled_tests=false"
49PRINTF_mingw32 = "--enable-included-printf=yes" 60EXTRA_OEMESON_class-nativesdk = "${CORECONF} -Dinstalled_tests=false"
50EXTRA_OECONF = "${PRINTF} ${CORECONF}"
51EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
52
53# Tell configure that we'll have dbus-daemon on the target for the tests
54EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}"
55 61
56do_configure_prepend() { 62do_configure_prepend() {
57 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 63 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -117,6 +123,8 @@ do_install_append () {
117 if test "x${MLPREFIX}" != "x"; then 123 if test "x${MLPREFIX}" != "x"; then
118 mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT} 124 mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT}
119 fi 125 fi
126 # Autotools does this, meson does not
127 mkdir -p ${D}${libdir}/gio/modules
120} 128}
121 129
122do_install_append_class-target () { 130do_install_append_class-target () {
@@ -129,6 +137,11 @@ do_install_append_class-target () {
129 fi 137 fi
130} 138}
131 139
140# As we do not build python3 for windows, makes no sense to ship the script that's using it
141do_install_append_mingw32() {
142 rm -f ${D}${bindir}/gtester-report
143}
144
132CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" 145CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml"
133CODEGEN_PYTHON_RDEPENDS_mingw32 = "" 146CODEGEN_PYTHON_RDEPENDS_mingw32 = ""
134 147