summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-11-14 20:00:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-15 09:38:37 +0000
commit28ecbe0cc3836eb82d7488db28ce653f6daa843d (patch)
treec1eb2eda9ad54558f80824a7c712ac2f87dcc018 /meta/recipes-core/glib-2.0
parentf595da926eb6b887a716edd26829ad922dd6861b (diff)
downloadpoky-28ecbe0cc3836eb82d7488db28ce653f6daa843d.tar.gz
glib-2.0: update 2.72.3 -> 2.74.1
Patches: 0001-Do-not-ignore-return-value-of-write.patch merged upstream Enable-more-tests-while-cross-compiling.patch replaced with a request to upstream to solve this correctly with meson's exe_wrapper: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3067 https://github.com/mesonbuild/meson/issues/11029 License-update: formatting Make needed adjustments to ptests. Backport a couple of patches to address musl failures. (From OE-Core rev: cf529411493bc86c4d8d0bb29cbb7b98c23456ad) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch39
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch14
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch46
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch23
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch48
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch123
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch77
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch31
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch8
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/run-ptest1
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.74.1.bb (renamed from meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb)7
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc16
12 files changed, 208 insertions, 225 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
deleted file mode 100644
index f3a0069633..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 658c034d92027dc8af5f784cae852123fac79b19 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 16 Apr 2016 13:28:59 -0700
4Subject: [PATCH] Do not ignore return value of write()
5
6gcc warns about ignoring return value when compiling
7with fortify turned on.
8
9assert when write() fails
10
11Upstream-Status: Submitted
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14---
15 glib/tests/unix.c | 5 +++--
16 1 file changed, 3 insertions(+), 2 deletions(-)
17
18diff --git a/glib/tests/unix.c b/glib/tests/unix.c
19index 7639d06..f941141 100644
20--- a/glib/tests/unix.c
21+++ b/glib/tests/unix.c
22@@ -33,14 +33,15 @@ test_pipe (void)
23 GError *error = NULL;
24 int pipefd[2];
25 char buf[1024];
26- gssize bytes_read;
27+ gssize bytes_read, bytes_written;
28 gboolean res;
29
30 res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
31 g_assert (res);
32 g_assert_no_error (error);
33
34- write (pipefd[1], "hello", sizeof ("hello"));
35+ bytes_written = write (pipefd[1], "hello", sizeof ("hello"));
36+ g_assert (bytes_written != -1 && "write() failed");
37 memset (buf, 0, sizeof (buf));
38 bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
39 g_assert_cmpint (bytes_read, >, 0);
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
index 5fe3aa898e..9bdd99d8a2 100644
--- 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
@@ -1,4 +1,4 @@
1From 0797a40627a4cb5439a24b872edc65356dceaaf0 Mon Sep 17 00:00:00 2001 1From 4a41bf7b050168726cc4fad4c1c72fc7c18ab779 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 15 Feb 2019 11:17:27 +0100 3Date: Fri, 15 Feb 2019 11:17:27 +0100
4Subject: [PATCH] Do not write $bindir into pkg-config files 4Subject: [PATCH] Do not write $bindir into pkg-config files
@@ -16,16 +16,16 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
16 2 files changed, 11 insertions(+), 11 deletions(-) 16 2 files changed, 11 insertions(+), 11 deletions(-)
17 17
18diff --git a/gio/meson.build b/gio/meson.build 18diff --git a/gio/meson.build b/gio/meson.build
19index 532b086..98468a3 100644 19index 36b5bad..137e75a 100644
20--- a/gio/meson.build 20--- a/gio/meson.build
21+++ b/gio/meson.build 21+++ b/gio/meson.build
22@@ -820,14 +820,14 @@ pkg.generate(libgio, 22@@ -862,14 +862,14 @@ pkg.generate(libgio,
23 'schemasdir=' + join_paths('${datadir}', schemas_subdir), 23 'schemasdir=' + join_paths('${datadir}', schemas_subdir),
24 'bindir=' + join_paths('${prefix}', get_option('bindir')), 24 'bindir=' + join_paths('${prefix}', get_option('bindir')),
25 'giomoduledir=' + pkgconfig_giomodulesdir, 25 'giomoduledir=' + pkgconfig_giomodulesdir,
26- 'gio=' + join_paths('${bindir}', 'gio'), 26- 'gio=' + join_paths('${bindir}', 'gio'),
27- 'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'), 27- 'gio_querymodules=@0@'.format(pkgconfig_multiarch_bindir / 'gio-querymodules'),
28- 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'), 28- 'glib_compile_schemas=@0@'.format(pkgconfig_multiarch_bindir / 'glib-compile-schemas'),
29- 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'), 29- 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'),
30- 'gdbus=' + join_paths('${bindir}', 'gdbus'), 30- 'gdbus=' + join_paths('${bindir}', 'gdbus'),
31- 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'), 31- 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'),
@@ -43,10 +43,10 @@ index 532b086..98468a3 100644
43 install_dir : glib_pkgconfigreldir, 43 install_dir : glib_pkgconfigreldir,
44 filebase : 'gio-2.0', 44 filebase : 'gio-2.0',
45diff --git a/glib/meson.build b/glib/meson.build 45diff --git a/glib/meson.build b/glib/meson.build
46index aaf5f00..1e0992b 100644 46index c365901..c3d6601 100644
47--- a/glib/meson.build 47--- a/glib/meson.build
48+++ b/glib/meson.build 48+++ b/glib/meson.build
49@@ -375,9 +375,9 @@ pkg.generate(libglib, 49@@ -397,9 +397,9 @@ pkg.generate(libglib,
50 subdirs : ['glib-2.0'], 50 subdirs : ['glib-2.0'],
51 extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, 51 extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
52 variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')), 52 variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')),
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
index 59de3fa969..2e1e2313e8 100644
--- 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
@@ -1,31 +1,31 @@
1From 4f327be49fd6ac5a77da6e48459b37f37a601977 Mon Sep 17 00:00:00 2001 1From ba1728bc27c88597164957d000b70ec4be6edf28 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 13 Feb 2019 15:32:05 +0100 3Date: Wed, 13 Feb 2019 15:32:05 +0100
4Subject: [PATCH] Set host_machine correctly when building with mingw32 4Subject: [PATCH] Set host_machine correctly when building with mingw32
5 5
6Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
8--- 9---
9 gio/tests/meson.build | 8 ++++---- 10 gio/tests/meson.build | 8 ++++----
10 glib/tests/meson.build | 2 +- 11 glib/tests/meson.build | 2 +-
11 meson.build | 3 +++ 12 meson.build | 3 +++
12 tests/meson.build | 2 +- 13 3 files changed, 8 insertions(+), 5 deletions(-)
13 4 files changed, 9 insertions(+), 6 deletions(-)
14 14
15diff --git a/gio/tests/meson.build b/gio/tests/meson.build 15diff --git a/gio/tests/meson.build b/gio/tests/meson.build
16index abe676767c60..34b347815308 100644 16index f644aa2..64a8684 100644
17--- a/gio/tests/meson.build 17--- a/gio/tests/meson.build
18+++ b/gio/tests/meson.build 18+++ b/gio/tests/meson.build
19@@ -27,7 +27,7 @@ if build_machine.system() == 'linux' 19@@ -29,7 +29,7 @@ endif
20 endif # libutil.length() > 0 20
21 endif # build_machine.system() == 'linux' 21 test_cpp_args = test_c_args
22 22
23-if host_machine.system() == 'windows' 23-if host_machine.system() == 'windows'
24+if host_system == 'windows' 24+if host_system == 'windows'
25 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] 25 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
26 endif 26 endif
27 27
28@@ -176,7 +176,7 @@ else 28@@ -210,7 +210,7 @@ if have_dbus_daemon
29 endif 29 endif
30 30
31 # Test programs buildable on UNIX only 31 # Test programs buildable on UNIX only
@@ -33,8 +33,8 @@ index abe676767c60..34b347815308 100644
33+if host_system != 'windows' 33+if host_system != 'windows'
34 gio_tests += { 34 gio_tests += {
35 'file' : {}, 35 'file' : {},
36 'gdbus-peer' : { 36 'gdbus-peer-object-manager' : {},
37@@ -434,7 +434,7 @@ if host_machine.system() != 'windows' 37@@ -462,7 +462,7 @@ if host_machine.system() != 'windows'
38 endif # unix 38 endif # unix
39 39
40 # Test programs buildable on Windows only 40 # Test programs buildable on Windows only
@@ -43,7 +43,7 @@ index abe676767c60..34b347815308 100644
43 gio_tests += {'win32-streams' : {}} 43 gio_tests += {'win32-streams' : {}}
44 endif 44 endif
45 45
46@@ -504,7 +504,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' 46@@ -532,7 +532,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
47 } 47 }
48 endif 48 endif
49 49
@@ -53,10 +53,10 @@ index abe676767c60..34b347815308 100644
53 'gdbus-example-unix-fd-client' : { 53 'gdbus-example-unix-fd-client' : {
54 'install' : false, 54 'install' : false,
55diff --git a/glib/tests/meson.build b/glib/tests/meson.build 55diff --git a/glib/tests/meson.build b/glib/tests/meson.build
56index a0c64afe6ae9..48407f99569c 100644 56index db01b54..6950817 100644
57--- a/glib/tests/meson.build 57--- a/glib/tests/meson.build
58+++ b/glib/tests/meson.build 58+++ b/glib/tests/meson.build
59@@ -151,7 +151,7 @@ if glib_conf.has('HAVE_EVENTFD') 59@@ -188,7 +188,7 @@ if glib_conf.has('HAVE_EVENTFD')
60 } 60 }
61 endif 61 endif
62 62
@@ -66,10 +66,10 @@ index a0c64afe6ae9..48407f99569c 100644
66 glib_tests += { 66 glib_tests += {
67 'gpoll' : { 67 'gpoll' : {
68diff --git a/meson.build b/meson.build 68diff --git a/meson.build b/meson.build
69index e0b14319fb58..f6756a3c7dfb 100644 69index 43bb468..5f9b59c 100644
70--- a/meson.build 70--- a/meson.build
71+++ b/meson.build 71+++ b/meson.build
72@@ -54,6 +54,9 @@ else 72@@ -43,6 +43,9 @@ else
73 endif 73 endif
74 74
75 host_system = host_machine.system() 75 host_system = host_machine.system()
@@ -79,19 +79,3 @@ index e0b14319fb58..f6756a3c7dfb 100644
79 79
80 if host_system == 'darwin' 80 if host_system == 'darwin'
81 ios_test_code = '''#include <TargetConditionals.h> 81 ios_test_code = '''#include <TargetConditionals.h>
82diff --git a/tests/meson.build b/tests/meson.build
83index 5ff99a4a8258..8a4dad0ccae7 100644
84--- a/tests/meson.build
85+++ b/tests/meson.build
86@@ -53,7 +53,7 @@ test_extra_programs = {
87 'assert-msg-test' : {},
88 }
89
90-if host_machine.system() != 'windows'
91+if host_system != 'windows'
92 tests += {
93 'timeloop' : {},
94 }
95--
962.34.1
97
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch
index c33fa88a76..57ada66907 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch
@@ -1,10 +1,11 @@
1Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2990] 1From 3c56ff21b9a5fe18f9cec9b97ae1788fdf5d563e Mon Sep 17 00:00:00 2001
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From 14838522a706ebdcc3cdab661d4c368099fe3a4e Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@arm.com> 2From: Ross Burton <ross.burton@arm.com>
6Date: Tue, 6 Jul 2021 19:26:03 +0100 3Date: Tue, 6 Jul 2021 19:26:03 +0100
7Subject: [PATCH] gio/tests/g-file-info: don't assume million-in-one events 4Subject: [PATCH] gio/tests/g-file-info: don't assume million-in-one events
5
6Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2990]
7Signed-off-by: Ross Burton <ross.burton@arm.com>
8
8 don't happen 9 don't happen
9 10
10The access and creation time tests create a file, gets the time in 11The access and creation time tests create a file, gets the time in
@@ -20,15 +21,16 @@ Change the test to simply assert that the difference not negative to
20handle this case. 21handle this case.
21 22
22This is the same fix as 289f8b, but that was just modification time. 23This is the same fix as 289f8b, but that was just modification time.
24
23--- 25---
24 gio/tests/g-file-info.c | 4 ++-- 26 gio/tests/g-file-info.c | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-) 27 1 file changed, 2 insertions(+), 2 deletions(-)
26 28
27diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c 29diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c
28index 59411c3a8..a213e4b92 100644 30index d9ad045..c9b12b0 100644
29--- a/gio/tests/g-file-info.c 31--- a/gio/tests/g-file-info.c
30+++ b/gio/tests/g-file-info.c 32+++ b/gio/tests/g-file-info.c
31@@ -239,7 +239,7 @@ test_g_file_info_access_time (void) 33@@ -307,7 +307,7 @@ test_g_file_info_access_time (void)
32 g_assert_nonnull (dt_usecs); 34 g_assert_nonnull (dt_usecs);
33 35
34 ts = g_date_time_difference (dt_usecs, dt); 36 ts = g_date_time_difference (dt_usecs, dt);
@@ -36,8 +38,8 @@ index 59411c3a8..a213e4b92 100644
36+ g_assert_cmpint (ts, >=, 0); 38+ g_assert_cmpint (ts, >=, 0);
37 g_assert_cmpint (ts, <, G_USEC_PER_SEC); 39 g_assert_cmpint (ts, <, G_USEC_PER_SEC);
38 40
39 /* Try round-tripping the access time. */ 41 /* Try again with nanosecond precision. */
40@@ -316,7 +316,7 @@ test_g_file_info_creation_time (void) 42@@ -442,7 +442,7 @@ test_g_file_info_creation_time (void)
41 g_assert_nonnull (dt_usecs); 43 g_assert_nonnull (dt_usecs);
42 44
43 ts = g_date_time_difference (dt_usecs, dt); 45 ts = g_date_time_difference (dt_usecs, dt);
@@ -45,7 +47,4 @@ index 59411c3a8..a213e4b92 100644
45+ g_assert_cmpint (ts, >=, 0); 47+ g_assert_cmpint (ts, >=, 0);
46 g_assert_cmpint (ts, <, G_USEC_PER_SEC); 48 g_assert_cmpint (ts, <, G_USEC_PER_SEC);
47 49
48 /* Try round-tripping the creation time. */ 50 /* Try again with nanosecond precision. */
49--
502.34.1
51
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch
new file mode 100644
index 0000000000..db08b5af55
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch
@@ -0,0 +1,48 @@
1From fdbffaea2fa85c203cc6aacb5734acac65aeaa19 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 11 Nov 2022 13:12:42 +0100
4Subject: [PATCH] tests/meson.build: do not use can_run_host_binaries()
5
6can_run_host_binaries() returns true even when cross compiling,
7if there is an executable wrapper defined that can run
8cross-binaries under some kind of emulation.
9
10Unfortunately, custom_target() will not use the wrapper
11and will attempt to execute the command directly. Until
12this is addressed in meson upstream, we have to disable
13these targets in cross scenarios.
14
15Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3067]
16Signed-off-by: Alexander Kanavin <alex@linutronix.de>
17
18---
19 gio/tests/meson.build | 2 +-
20 glib/tests/meson.build | 2 +-
21 2 files changed, 2 insertions(+), 2 deletions(-)
22
23diff --git a/gio/tests/meson.build b/gio/tests/meson.build
24index 49cfa25ce..ea59656f9 100644
25--- a/gio/tests/meson.build
26+++ b/gio/tests/meson.build
27@@ -652,7 +652,7 @@ if installed_tests_enabled
28 endforeach
29 endif
30
31-if meson.can_run_host_binaries()
32+if not meson.is_cross_build()
33
34 compiler_type = '--compiler=@0@'.format(cc.get_id())
35
36diff --git a/glib/tests/meson.build b/glib/tests/meson.build
37index 69508178e..e4f75f302 100644
38--- a/glib/tests/meson.build
39+++ b/glib/tests/meson.build
40@@ -411,7 +411,7 @@ executable('testing-helper', 'testing-helper.c',
41 )
42
43 # some testing of gtester functionality
44-if meson.can_run_host_binaries() and host_system != 'windows'
45+if not meson.is_cross_build() and host_system != 'windows'
46 xmllint = find_program('xmllint', required: false)
47 if xmllint.found()
48 tmpsample_xml = custom_target('tmpsample.xml',
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
deleted file mode 100644
index f5c161fe04..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ /dev/null
@@ -1,123 +0,0 @@
1From 1f3c05529c0c9032ae0a289fb1f088b7541fc9b0 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 9 Nov 2015 11:07:27 +0200
4Subject: [PATCH] Enable more tests while cross-compiling
5
6Upstream disables a few tests while cross-compiling because their build requires
7running other built binaries. This usually makes sense but in the cross-compile
8case we can depend on glib-2.0-native.
9
10Upstream-Status: Inappropriate [OE specific]
11Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
12
13---
14 gio/tests/meson.build | 24 ++++++++++++------------
15 1 file changed, 12 insertions(+), 12 deletions(-)
16
17diff --git a/gio/tests/meson.build b/gio/tests/meson.build
18index 3ed23a5..5df932a 100644
19--- a/gio/tests/meson.build
20+++ b/gio/tests/meson.build
21@@ -253,7 +253,7 @@ if host_machine.system() != 'windows'
22 }
23 endif
24
25- if have_dbus_daemon
26+ if true
27 annotate_args = [
28 '--annotate', 'org.project.Bar', 'Key1', 'Value1',
29 '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
30@@ -603,14 +603,14 @@ if installed_tests_enabled
31 endforeach
32 endif
33
34-if not meson.is_cross_build() or meson.has_exe_wrapper()
35+if meson.is_cross_build()
36
37 compiler_type = '--compiler=@0@'.format(cc.get_id())
38
39 plugin_resources_c = custom_target('plugin-resources.c',
40 input : 'test4.gresource.xml',
41 output : 'plugin-resources.c',
42- command : [glib_compile_resources,
43+ command : ['glib-compile-resources',
44 compiler_type,
45 '--target=@OUTPUT@',
46 '--sourcedir=' + meson.current_source_dir(),
47@@ -636,7 +636,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
48 test_gresource = custom_target('test.gresource',
49 input : 'test.gresource.xml',
50 output : 'test.gresource',
51- command : [glib_compile_resources,
52+ command : ['glib-compile-resources',
53 compiler_type,
54 '--target=@OUTPUT@',
55 '--sourcedir=' + meson.current_source_dir(),
56@@ -649,7 +649,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
57 test_resources2_c = custom_target('test_resources2.c',
58 input : 'test3.gresource.xml',
59 output : 'test_resources2.c',
60- command : [glib_compile_resources,
61+ command : ['glib-compile-resources',
62 compiler_type,
63 '--target=@OUTPUT@',
64 '--sourcedir=' + meson.current_source_dir(),
65@@ -662,7 +662,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
66 test_resources2_h = custom_target('test_resources2.h',
67 input : 'test3.gresource.xml',
68 output : 'test_resources2.h',
69- command : [glib_compile_resources,
70+ command : ['glib-compile-resources',
71 compiler_type,
72 '--target=@OUTPUT@',
73 '--sourcedir=' + meson.current_source_dir(),
74@@ -676,7 +676,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
75 input : 'test2.gresource.xml',
76 depends : big_test_resource,
77 output : 'test_resources.c',
78- command : [glib_compile_resources,
79+ command : ['glib-compile-resources',
80 compiler_type,
81 '--target=@OUTPUT@',
82 '--sourcedir=' + meson.current_source_dir(),
83@@ -689,7 +689,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
84 digit_test_resources_c = custom_target('digit_test_resources.c',
85 input : '111_digit_test.gresource.xml',
86 output : 'digit_test_resources.c',
87- command : [glib_compile_resources,
88+ command : ['glib-compile-resources',
89 compiler_type,
90 '--target=@OUTPUT@',
91 '--sourcedir=' + meson.current_source_dir(),
92@@ -702,7 +702,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
93 digit_test_resources_h = custom_target('digit_test_resources.h',
94 input : '111_digit_test.gresource.xml',
95 output : 'digit_test_resources.h',
96- command : [glib_compile_resources,
97+ command : ['glib-compile-resources',
98 compiler_type,
99 '--target=@OUTPUT@',
100 '--sourcedir=' + meson.current_source_dir(),
101@@ -744,11 +744,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
102
103 ld = find_program('ld', required : false)
104
105- if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
106+ if not meson.is_cross_build()
107 test_gresource_binary = custom_target('test5.gresource',
108 input : 'test5.gresource.xml',
109 output : 'test5.gresource',
110- command : [glib_compile_resources,
111+ command : ['glib-compile-resources',
112 compiler_type,
113 '--target=@OUTPUT@',
114 '--sourcedir=' + meson.current_source_dir(),
115@@ -762,7 +762,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
116 test_resources_binary_c = custom_target('test_resources_binary.c',
117 input : 'test5.gresource.xml',
118 output : 'test_resources_binary.c',
119- command : [glib_compile_resources,
120+ command : ['glib-compile-resources',
121 compiler_type,
122 '--target=@OUTPUT@',
123 '--sourcedir=' + meson.current_source_dir(),
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch b/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch
new file mode 100644
index 0000000000..63cbf90ab2
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch
@@ -0,0 +1,77 @@
1From 0ca5254c5d92aec675b76b4bfa72a6885cde6066 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
3Date: Sat, 29 Oct 2022 04:30:52 +0200
4Subject: [PATCH] glib/gmacros: Always define NULL as nullptr in C++11 and
5 newer
6
7Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/0ca5254c5d92aec675b76b4bfa72a6885cde6066]
8Signed-off-by: Alexander Kanavin <alex@linutronix.de>
9---
10 glib/gmacros.h | 9 ++++++++-
11 glib/tests/cxx.cpp | 13 -------------
12 2 files changed, 8 insertions(+), 14 deletions(-)
13
14diff --git a/glib/gmacros.h b/glib/gmacros.h
15index 5302841105..9fe8270822 100644
16--- a/glib/gmacros.h
17+++ b/glib/gmacros.h
18@@ -870,10 +870,17 @@
19 */
20 #ifndef NULL
21 # ifdef __cplusplus
22-# define NULL (0L)
23+# if __cplusplus >= 201103L
24+# define NULL (nullptr)
25+# else
26+# define NULL (0L)
27+# endif /* __cplusplus >= 201103L */
28 # else /* !__cplusplus */
29 # define NULL ((void*) 0)
30 # endif /* !__cplusplus */
31+#elif defined (__cplusplus) && __cplusplus >= 201103L
32+# undef NULL
33+# define NULL (nullptr)
34 #endif
35
36 #ifndef FALSE
37diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
38index 6ac60791c8..045457c6e2 100644
39--- a/glib/tests/cxx.cpp
40+++ b/glib/tests/cxx.cpp
41@@ -34,21 +34,12 @@ test_typeof (void)
42 MyObject *obj3 = g_atomic_pointer_get (&obj2);
43 g_assert_true (obj3 == obj);
44
45-#if __cplusplus >= 201103L
46- MyObject *obj4 = nullptr;
47-#else
48 MyObject *obj4 = NULL;
49-#endif
50 g_atomic_pointer_set (&obj4, obj3);
51 g_assert_true (obj4 == obj);
52
53-#if __cplusplus >= 201103L
54- MyObject *obj5 = nullptr;
55- g_atomic_pointer_compare_and_exchange (&obj5, nullptr, obj4);
56-#else
57 MyObject *obj5 = NULL;
58 g_atomic_pointer_compare_and_exchange (&obj5, NULL, obj4);
59-#endif
60 g_assert_true (obj5 == obj);
61
62 MyObject *obj6 = g_steal_pointer (&obj5);
63@@ -195,11 +186,7 @@ test_steal_pointer (void)
64 int
65 main (int argc, char *argv[])
66 {
67-#if __cplusplus >= 201103L
68- g_test_init (&argc, &argv, nullptr);
69-#else
70 g_test_init (&argc, &argv, NULL);
71-#endif
72
73 g_test_add_func ("/C++/typeof", test_typeof);
74 g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange);
75--
76GitLab
77
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch b/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch
new file mode 100644
index 0000000000..763d5ce539
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch
@@ -0,0 +1,31 @@
1From 7dc19632f3115e3f517c6bc80436fe72c1dcdeb4 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
3Date: Sat, 29 Oct 2022 04:16:00 +0200
4Subject: [PATCH] glib/tests/cxx: Ensure NULL is always casted to a pointer
5 type
6
7Otherwise it may not be recognized as valid sentinel
8Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/7dc19632f3115e3f517c6bc80436fe72c1dcdeb4]
9Signed-off-by: Alexander Kanavin <alex@linutronix.de>
10---
11 glib/tests/cxx.cpp | 4 ++++
12 1 file changed, 4 insertions(+)
13
14diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
15index 045457c6e2..aa5e0cb576 100644
16--- a/glib/tests/cxx.cpp
17+++ b/glib/tests/cxx.cpp
18@@ -186,7 +186,11 @@ test_steal_pointer (void)
19 int
20 main (int argc, char *argv[])
21 {
22+#if __cplusplus >= 201103L
23 g_test_init (&argc, &argv, NULL);
24+#else
25+ g_test_init (&argc, &argv, static_cast<void *>(NULL));
26+#endif
27
28 g_test_add_func ("/C++/typeof", test_typeof);
29 g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange);
30--
31GitLab
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 c0114397d8..7723ac6672 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 9a66887179d28d696562dcac43ad05d67580cfdb Mon Sep 17 00:00:00 2001 1From 0da0b608fdbb144c39225233cbdd89995b76904b 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
@@ -19,10 +19,10 @@ Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
19 1 file changed, 11 insertions(+), 1 deletion(-) 19 1 file changed, 11 insertions(+), 1 deletion(-)
20 20
21diff --git a/gio/giomodule.c b/gio/giomodule.c 21diff --git a/gio/giomodule.c b/gio/giomodule.c
22index 2a043cc..e2d2310 100644 22index f5dbb4555..c926e77a8 100644
23--- a/gio/giomodule.c 23--- a/gio/giomodule.c
24+++ b/gio/giomodule.c 24+++ b/gio/giomodule.c
25@@ -56,6 +56,8 @@ 25@@ -58,6 +58,8 @@
26 #ifdef G_OS_WIN32 26 #ifdef G_OS_WIN32
27 #include "gregistrysettingsbackend.h" 27 #include "gregistrysettingsbackend.h"
28 #include "giowin32-priv.h" 28 #include "giowin32-priv.h"
@@ -31,7 +31,7 @@ index 2a043cc..e2d2310 100644
31 #endif 31 #endif
32 #include <glib/gstdio.h> 32 #include <glib/gstdio.h>
33 33
34@@ -1267,7 +1269,15 @@ get_gio_module_dir (void) 34@@ -1261,7 +1263,15 @@ get_gio_module_dir (void)
35 NULL); 35 NULL);
36 g_free (install_dir); 36 g_free (install_dir);
37 #else 37 #else
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
index 7a231b514b..c476d67310 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -5,5 +5,6 @@ if id -u glib2-test; then
5 userdel glib2-test 5 userdel glib2-test
6fi 6fi
7useradd glib2-test 7useradd glib2-test
8cd /tmp
8su glib2-test -c 'gnome-desktop-testing-runner glib' 9su glib2-test -c 'gnome-desktop-testing-runner glib'
9userdel glib2-test 10userdel glib2-test
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.74.1.bb
index b5ab6502a3..8fd785a7fd 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.74.1.bb
@@ -7,20 +7,21 @@ SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
7SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ 7SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
8 file://run-ptest \ 8 file://run-ptest \
9 file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ 9 file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
10 file://Enable-more-tests-while-cross-compiling.patch \
11 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ 10 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
12 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ 11 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
13 file://0001-Do-not-ignore-return-value-of-write.patch \
14 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ 12 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
15 file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ 13 file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
16 file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ 14 file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
17 file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ 15 file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
18 file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ 16 file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
19 file://0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch \ 17 file://0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch \
18 file://0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch \
19 file://cpp-null.patch \
20 file://cpp-null2.patch \
20 " 21 "
21SRC_URI:append:class-native = " file://relocate-modules.patch" 22SRC_URI:append:class-native = " file://relocate-modules.patch"
22 23
23SRC_URI[sha256sum] = "4a39a2f624b8512d500d5840173eda7fa85f51c109052eae806acece85d345f0" 24SRC_URI[sha256sum] = "0ab981618d1db47845e56417b0d7c123f81a3427b2b9c93f5a46ff5bbb964964"
24 25
25# Find any meson cross files in FILESPATH that are relevant for the current 26# Find any meson cross files in FILESPATH that are relevant for the current
26# build (using siteinfo) and add them to EXTRA_OEMESON. 27# build (using siteinfo) and add them to EXTRA_OEMESON.
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index ffddefe22e..843b6bd29b 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -5,10 +5,10 @@ HOMEPAGE = "https://developer.gnome.org/glib/"
5# pcre is under BSD; 5# pcre is under BSD;
6# docs/reference/COPYING is with a 'public domain'-like license! 6# docs/reference/COPYING is with a 'public domain'-like license!
7LICENSE = "LGPL-2.1-or-later & BSD-3-Clause & PD" 7LICENSE = "LGPL-2.1-or-later & BSD-3-Clause & PD"
8LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ 8LIC_FILES_CHKSUM = "file://COPYING;md5=41890f71f740302b785c27661123bff5 \
9 file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ 9 file://glib/glib.h;beginline=4;endline=17;md5=72f7cc2847407f65d8981ef112e4e630 \
10 file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \ 10 file://LICENSES/LGPL-2.1-or-later.txt;md5=41890f71f740302b785c27661123bff5 \
11 file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ 11 file://gmodule/gmodule.h;beginline=4;endline=17;md5=72f7cc2847407f65d8981ef112e4e630 \
12 file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc" 12 file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
13BUGTRACKER = "http://bugzilla.gnome.org" 13BUGTRACKER = "http://bugzilla.gnome.org"
14SECTION = "libs" 14SECTION = "libs"
@@ -21,7 +21,7 @@ DEPENDS = "glib-2.0-native \
21 virtual/libintl \ 21 virtual/libintl \
22 virtual/libiconv \ 22 virtual/libiconv \
23 libffi \ 23 libffi \
24 libpcre \ 24 libpcre2 \
25 zlib" 25 zlib"
26 26
27PACKAGES += "${PN}-codegen ${PN}-utils" 27PACKAGES += "${PN}-codegen ${PN}-utils"
@@ -45,7 +45,7 @@ PACKAGECONFIG[libelf] = ",,elfutils"
45PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," 45PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,"
46PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" 46PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux"
47 47
48EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false" 48EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false"
49 49
50do_configure:prepend() { 50do_configure:prepend() {
51 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 51 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -54,6 +54,7 @@ do_configure:prepend() {
54FILES:${PN} = "${libdir}/lib*${SOLIBS} \ 54FILES:${PN} = "${libdir}/lib*${SOLIBS} \
55 ${libdir}/gio \ 55 ${libdir}/gio \
56 ${libexecdir}/*gio-querymodules \ 56 ${libexecdir}/*gio-querymodules \
57 ${libexecdir}/*gio-launch-desktop \
57 ${datadir}/glib-2.0/schemas" 58 ${datadir}/glib-2.0/schemas"
58 59
59FILES:${PN}-utils += "${bindir}/glib-genmarshal \ 60FILES:${PN}-utils += "${bindir}/glib-genmarshal \
@@ -130,6 +131,8 @@ do_install:append:class-target () {
130 mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test 131 mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test
131 fi 132 fi
132 fi 133 fi
134 # https://gitlab.gnome.org/GNOME/glib/-/issues/2810
135 rm -f ${D}${datadir}/installed-tests/glib/thread-pool-slow.test
133} 136}
134 137
135# As we do not build python3 for windows, makes no sense to ship the script that's using it 138# As we do not build python3 for windows, makes no sense to ship the script that's using it
@@ -148,6 +151,7 @@ RDEPENDS:${PN}-ptest += "\
148 coreutils \ 151 coreutils \
149 libgcc \ 152 libgcc \
150 dbus \ 153 dbus \
154 desktop-file-utils \
151 gnome-desktop-testing \ 155 gnome-desktop-testing \
152 tzdata \ 156 tzdata \
153 tzdata-americas \ 157 tzdata-americas \