summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0
diff options
context:
space:
mode:
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.patch75
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch4
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch5
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch43
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch34
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch26
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch29
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch38
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch121
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch54
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch361
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc1
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch46
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/run-ptest3
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch32
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb (renamed from meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb)20
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc115
22 files changed, 671 insertions, 403 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..8e6598fbef 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 e7077aa23bfcd31a8e72e39dc93ce4f854678376 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
@@ -9,53 +9,52 @@ rather than use target paths).
9 9
10Upstream-Status: Inappropriate [upstream wants the paths in .pc files] 10Upstream-Status: Inappropriate [upstream wants the paths in .pc files]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12
13--- 12---
14 gio/meson.build | 16 ++++++++-------- 13 gio/meson.build | 16 ++++++++--------
15 glib/meson.build | 6 +++--- 14 glib/meson.build | 6 +++---
16 2 files changed, 11 insertions(+), 11 deletions(-) 15 2 files changed, 11 insertions(+), 11 deletions(-)
17 16
18diff --git a/gio/meson.build b/gio/meson.build 17diff --git a/gio/meson.build b/gio/meson.build
19index 532b086..98468a3 100644 18index 5f91586..1a95f4f 100644
20--- a/gio/meson.build 19--- a/gio/meson.build
21+++ b/gio/meson.build 20+++ b/gio/meson.build
22@@ -820,14 +820,14 @@ pkg.generate(libgio, 21@@ -884,14 +884,14 @@ pkg.generate(libgio,
23 'schemasdir=' + join_paths('${datadir}', schemas_subdir), 22 'dtdsdir=' + '${datadir}' / dtds_subdir,
24 'bindir=' + join_paths('${prefix}', get_option('bindir')), 23 'bindir=' + '${prefix}' / get_option('bindir'),
25 'giomoduledir=' + pkgconfig_giomodulesdir, 24 'giomoduledir=' + pkgconfig_giomodulesdir,
26- 'gio=' + join_paths('${bindir}', 'gio'), 25- 'gio=' + '${bindir}' / 'gio',
27- 'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'), 26- 'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
28- 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'), 27- 'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas',
29- 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'), 28- 'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources',
30- 'gdbus=' + join_paths('${bindir}', 'gdbus'), 29- 'gdbus=' + '${bindir}' /'gdbus',
31- 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'), 30- 'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen',
32- 'gresource=' + join_paths('${bindir}', 'gresource'), 31- 'gresource=' + '${bindir}' / 'gresource',
33- 'gsettings=' + join_paths('${bindir}', 'gsettings')], 32- 'gsettings=' + '${bindir}' / 'gsettings',
34+ 'gio=gio', 33+ 'gio=gio',
35+ 'gio_querymodules=gio-querymodules', 34+ 'gio_querymodules=gio-querymodules',
36+ 'glib_compile_schemas=glib-compile-schemas', 35+ 'glib_compile_schemas=glib-compile-schemas',
37+ 'glib_compile_resources=glib-compile-resources', 36+ 'glib_compile_resources=glib-compile-resources',
38+ 'gdbus=gdbus', 37+ 'gdbus=gdbus',
39+ 'gdbus_codegen=gdbus-codegen', 38+ 'gdbus_codegen=gdbus-codegen',
40+ 'gresource=gresource', 39+ 'gresource=gresource',
41+ 'gsettings=gsettings'], 40+ 'gsettings=gsettings',
41 ],
42 version : glib_version, 42 version : glib_version,
43 install_dir : glib_pkgconfigreldir, 43 install_dir : glib_pkgconfigreldir,
44 filebase : 'gio-2.0',
45diff --git a/glib/meson.build b/glib/meson.build 44diff --git a/glib/meson.build b/glib/meson.build
46index aaf5f00..1e0992b 100644 45index c26a35e..1d8ca6b 100644
47--- a/glib/meson.build 46--- a/glib/meson.build
48+++ b/glib/meson.build 47+++ b/glib/meson.build
49@@ -375,9 +375,9 @@ pkg.generate(libglib, 48@@ -447,9 +447,9 @@ pkg.generate(libglib,
50 subdirs : ['glib-2.0'], 49 variables : [
51 extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, 50 'bindir=' + '${prefix}' / get_option('bindir'),
52 variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')), 51 'datadir=' + '${prefix}' / get_option('datadir'),
53- 'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'), 52- 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal',
54- 'gobject_query=' + join_paths('${bindir}', 'gobject-query'), 53- 'gobject_query=' + '${bindir}' / 'gobject-query',
55- 'glib_mkenums=' + join_paths('${bindir}', 'glib-mkenums')], 54- 'glib_mkenums=' + '${bindir}' / 'glib-mkenums',
56+ 'glib_genmarshal=glib-genmarshal', 55+ 'glib_genmarshal=glib-genmarshal',
57+ 'gobject_query=gobject-query', 56+ 'gobject_query=gobject-query',
58+ 'glib_mkenums=glib-mkenums'], 57+ 'glib_mkenums=glib-mkenums',
59 version : glib_version, 58 'glib_valgrind_suppressions=' + '${datadir}' /
60 install_dir : glib_pkgconfigreldir, 59 valgrind_suppression_file_install_subdir /
61 filebase : 'glib-2.0', 60 fs.name(valgrind_suppression_file),
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
index 16f2d31496..eb9dfdbcf9 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
@@ -1,4 +1,4 @@
1From c94e669de98a3892c699bd8d0d2b5164b2de747e Mon Sep 17 00:00:00 2001 1From 9a5d4bf65b658d744d610ee27ecd2ae65b14b158 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 15 Mar 2014 22:42:29 -0700 3Date: Sat, 15 Mar 2014 22:42:29 -0700
4Subject: [PATCH] Fix DATADIRNAME on uclibc/Linux 4Subject: [PATCH] Fix DATADIRNAME on uclibc/Linux
@@ -8,8 +8,6 @@ based systems therefore lets set DATADIRNAME to "share".
8 8
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10Upstream-Status: Pending 10Upstream-Status: Pending
11
12
13--- 11---
14 m4macros/glib-gettext.m4 | 4 ++++ 12 m4macros/glib-gettext.m4 | 4 ++++
15 1 file changed, 4 insertions(+) 13 1 file changed, 4 insertions(+)
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 597864d9ac..ad69f7ec65 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 0015db45cd1bfefc04959dffab5dabeead93136f Mon Sep 17 00:00:00 2001 1From 4933aef791857a5aac650b60af800778658b875b 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
@@ -8,16 +8,15 @@ renamer does not cope with library packages with files in ${bindir}
8 8
9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
10Upstream-Status: Inappropriate [OE specific] 10Upstream-Status: Inappropriate [OE specific]
11
12--- 11---
13 gio/meson.build | 1 + 12 gio/meson.build | 1 +
14 1 file changed, 1 insertion(+) 13 1 file changed, 1 insertion(+)
15 14
16diff --git a/gio/meson.build b/gio/meson.build 15diff --git a/gio/meson.build b/gio/meson.build
17index 2ef60ed..532b086 100644 16index f9fdf6e..5f91586 100644
18--- a/gio/meson.build 17--- a/gio/meson.build
19+++ b/gio/meson.build 18+++ b/gio/meson.build
20@@ -936,6 +936,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu 19@@ -1005,6 +1005,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
21 c_args : gio_c_args, 20 c_args : gio_c_args,
22 # intl.lib is not compatible with SAFESEH 21 # intl.lib is not compatible with SAFESEH
23 link_args : noseh_link_args, 22 link_args : noseh_link_args,
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
index 6fd93526ce..0e3a62af6a 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
@@ -1,4 +1,4 @@
1From 4f47b8a8d650d185aa61aec2f56a283522a723c4 Mon Sep 17 00:00:00 2001 1From 8ae2e9c2a04e089306693a021149dc6b7d1bd679 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 12 Jun 2015 17:08:46 +0300 3Date: Fri, 12 Jun 2015 17:08:46 +0300
4Subject: [PATCH] Remove the warning about deprecated paths in schemas 4Subject: [PATCH] Remove the warning about deprecated paths in schemas
@@ -9,13 +9,12 @@ messages, and meta/lib/oe/rootfs.py complaints about them.
9 9
10Upstream-Status: Inappropriate 10Upstream-Status: Inappropriate
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12
13--- 12---
14 gio/glib-compile-schemas.c | 13 ------------- 13 gio/glib-compile-schemas.c | 13 -------------
15 1 file changed, 13 deletions(-) 14 1 file changed, 13 deletions(-)
16 15
17diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c 16diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
18index 7888120..7acbd5b 100644 17index 04ef404..e791ce2 100644
19--- a/gio/glib-compile-schemas.c 18--- a/gio/glib-compile-schemas.c
20+++ b/gio/glib-compile-schemas.c 19+++ b/gio/glib-compile-schemas.c
21@@ -1232,19 +1232,6 @@ parse_state_start_schema (ParseState *state, 20@@ -1232,19 +1232,6 @@ parse_state_start_schema (ParseState *state,
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 d6765b163b..32b4cea409 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,32 +1,30 @@
1From 333809ded70ad4e3470b7134e3fac1a42ff48e61 Mon Sep 17 00:00:00 2001 1From c0733f7a91dfe13152abc60c5a3064456b3e9d63 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
9--- 8---
10 gio/tests/meson.build | 8 ++++---- 9 gio/tests/meson.build | 8 ++++----
11 glib/tests/meson.build | 2 +- 10 glib/tests/meson.build | 2 +-
12 meson.build | 3 +++ 11 meson.build | 3 +++
13 tests/meson.build | 2 +- 12 3 files changed, 8 insertions(+), 5 deletions(-)
14 4 files changed, 9 insertions(+), 6 deletions(-)
15 13
16diff --git a/gio/tests/meson.build b/gio/tests/meson.build 14diff --git a/gio/tests/meson.build b/gio/tests/meson.build
17index 3a19c82..b762835 100644 15index 4ef3343..e498e7e 100644
18--- a/gio/tests/meson.build 16--- a/gio/tests/meson.build
19+++ b/gio/tests/meson.build 17+++ b/gio/tests/meson.build
20@@ -12,7 +12,7 @@ test_c_args = [ 18@@ -29,7 +29,7 @@ endif
21 '-UG_DISABLE_ASSERT', 19
22 ] 20 test_cpp_args = test_c_args
23 21
24-if host_machine.system() == 'windows' 22-if host_machine.system() == 'windows'
25+if host_system == 'windows' 23+if host_system == 'windows'
26 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] 24 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
27 endif 25 endif
28 26
29@@ -133,7 +133,7 @@ else 27@@ -230,7 +230,7 @@ if have_dbus_daemon
30 endif 28 endif
31 29
32 # Test programs buildable on UNIX only 30 # Test programs buildable on UNIX only
@@ -34,8 +32,8 @@ index 3a19c82..b762835 100644
34+if host_system != 'windows' 32+if host_system != 'windows'
35 gio_tests += { 33 gio_tests += {
36 'file' : {}, 34 'file' : {},
37 'gdbus-peer' : { 35 'gdbus-peer-object-manager' : {},
38@@ -385,7 +385,7 @@ if host_machine.system() != 'windows' 36@@ -562,7 +562,7 @@ if host_machine.system() != 'windows'
39 endif # unix 37 endif # unix
40 38
41 # Test programs buildable on Windows only 39 # Test programs buildable on Windows only
@@ -44,7 +42,7 @@ index 3a19c82..b762835 100644
44 gio_tests += {'win32-streams' : {}} 42 gio_tests += {'win32-streams' : {}}
45 endif 43 endif
46 44
47@@ -455,7 +455,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' 45@@ -632,7 +632,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
48 } 46 }
49 endif 47 endif
50 48
@@ -54,10 +52,10 @@ index 3a19c82..b762835 100644
54 'gdbus-example-unix-fd-client' : { 52 'gdbus-example-unix-fd-client' : {
55 'install' : false, 53 'install' : false,
56diff --git a/glib/tests/meson.build b/glib/tests/meson.build 54diff --git a/glib/tests/meson.build b/glib/tests/meson.build
57index 6eb23e8..36eb919 100644 55index d80c86e..5329cda 100644
58--- a/glib/tests/meson.build 56--- a/glib/tests/meson.build
59+++ b/glib/tests/meson.build 57+++ b/glib/tests/meson.build
60@@ -137,7 +137,7 @@ if glib_conf.has('HAVE_EVENTFD') 58@@ -216,7 +216,7 @@ if glib_conf.has('HAVE_EVENTFD')
61 } 59 }
62 endif 60 endif
63 61
@@ -67,10 +65,10 @@ index 6eb23e8..36eb919 100644
67 glib_tests += { 65 glib_tests += {
68 'gpoll' : { 66 'gpoll' : {
69diff --git a/meson.build b/meson.build 67diff --git a/meson.build b/meson.build
70index 47f3a5c..7ea7ad1 100644 68index 813c9b7..6ee775e 100644
71--- a/meson.build 69--- a/meson.build
72+++ b/meson.build 70+++ b/meson.build
73@@ -32,6 +32,9 @@ else 71@@ -54,6 +54,9 @@ else
74 endif 72 endif
75 73
76 host_system = host_machine.system() 74 host_system = host_machine.system()
@@ -80,16 +78,3 @@ index 47f3a5c..7ea7ad1 100644
80 78
81 if host_system == 'darwin' 79 if host_system == 'darwin'
82 ios_test_code = '''#include <TargetConditionals.h> 80 ios_test_code = '''#include <TargetConditionals.h>
83diff --git a/tests/meson.build b/tests/meson.build
84index 6741f8f..12fdc90 100644
85--- a/tests/meson.build
86+++ b/tests/meson.build
87@@ -73,7 +73,7 @@ test_extra_programs = {
88 'unicode-collate' : {},
89 }
90
91-if host_machine.system() != 'windows'
92+if host_system != 'windows'
93 tests += {
94 'timeloop' : {},
95 'iochannel-test' : {},
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch
new file mode 100644
index 0000000000..b11c283e6d
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch
@@ -0,0 +1,34 @@
1From a8eb944a10353403241608a084787f6efcbb2eb7 Mon Sep 17 00:00:00 2001
2From: Jordan Williams <jordan@jwillikers.com>
3Date: Fri, 1 Dec 2023 09:53:50 -0600
4Subject: [PATCH] Switch from the deprecated distutils module to the packaging
5 module
6
7The distutils module was removed in Python 3.12.
8
9Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291]
10
11Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
12---
13 gio/gdbus-2.0/codegen/utils.py | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
17index 0204610..08f1ba9 100644
18--- a/gio/gdbus-2.0/codegen/utils.py
19+++ b/gio/gdbus-2.0/codegen/utils.py
20@@ -19,7 +19,7 @@
21 #
22 # Author: David Zeuthen <davidz@redhat.com>
23
24-import distutils.version
25+import packaging.version
26 import os
27 import sys
28
29@@ -166,4 +166,4 @@ def version_cmp_key(key):
30 v = str(key[0])
31 else:
32 v = "0"
33- return (distutils.version.LooseVersion(v), key[1])
34+ return (packaging.version.Version(v), key[1])
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch
deleted file mode 100644
index 508c8c3bad..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-codegen.py-bump-timeout-to-100-seconds.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From b833254bcc9fcf4cdc2572027b1154d799535ca4 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sun, 20 Dec 2020 22:01:43 +0100
4Subject: [PATCH] gio/tests/codegen.py: bump timeout to 100 seconds
5
6This may be necessary on overloaded CI systems.
7
8Upstream-Status: Pending
9Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
10---
11 gio/tests/codegen.py | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/gio/tests/codegen.py b/gio/tests/codegen.py
15index 51de0ed..ca98c9d 100644
16--- a/gio/tests/codegen.py
17+++ b/gio/tests/codegen.py
18@@ -51,7 +51,7 @@ class TestCodegen(unittest.TestCase):
19 cwd = ''
20
21 def setUp(self):
22- self.timeout_seconds = 10 # seconds per test
23+ self.timeout_seconds = 100 # seconds per test
24 self.tmpdir = tempfile.TemporaryDirectory()
25 self.cwd = os.getcwd()
26 os.chdir(self.tmpdir.name)
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
index d33fdd4d8b..aee2986033 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
@@ -1,4 +1,4 @@
1From 92de6c7eb30b961b24a2dce812d5276487b7d23d Mon Sep 17 00:00:00 2001 1From 878e51f82100c698236fda0e069e14ea9249350c Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 8 Jan 2020 18:22:46 +0100 3Date: Wed, 8 Jan 2020 18:22:46 +0100
4Subject: [PATCH] gio/tests/resources.c: comment out a build host-only test 4Subject: [PATCH] gio/tests/resources.c: comment out a build host-only test
@@ -8,16 +8,15 @@ not cross-compatible (hardcodes ld and objcopy).
8 8
9Upstream-Status: Inappropriate [oe-core specific] 9Upstream-Status: Inappropriate [oe-core specific]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11
12--- 11---
13 gio/tests/resources.c | 2 +- 12 gio/tests/resources.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
15 14
16diff --git a/gio/tests/resources.c b/gio/tests/resources.c 15diff --git a/gio/tests/resources.c b/gio/tests/resources.c
17index c44d214..e289a01 100644 16index f567914..b21b616 100644
18--- a/gio/tests/resources.c 17--- a/gio/tests/resources.c
19+++ b/gio/tests/resources.c 18+++ b/gio/tests/resources.c
20@@ -993,7 +993,7 @@ main (int argc, 19@@ -1068,7 +1068,7 @@ main (int argc,
21 g_test_add_func ("/resource/automatic", test_resource_automatic); 20 g_test_add_func ("/resource/automatic", test_resource_automatic);
22 /* This only uses automatic resources too, so it tests the constructors and destructors */ 21 /* This only uses automatic resources too, so it tests the constructors and destructors */
23 g_test_add_func ("/resource/module", test_resource_module); 22 g_test_add_func ("/resource/module", test_resource_module);
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
index 44482dd2b7..0b10269114 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch
@@ -1,4 +1,4 @@
1From 4b97f457b7b44117e27d2a218c4b68e7fe3fe4ce Mon Sep 17 00:00:00 2001 1From b4b523160ef550a53705fcc45ac6e10d086ce491 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Oct 2019 17:46:26 -0700 3Date: Sat, 12 Oct 2019 17:46:26 -0700
4Subject: [PATCH] meson: Run atomics test on clang as well 4Subject: [PATCH] meson: Run atomics test on clang as well
@@ -9,16 +9,15 @@ Fixes
9 9
10Upstream-Status: Pending 10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com> 11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13--- 12---
14 meson.build | 2 +- 13 meson.build | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
16 15
17diff --git a/meson.build b/meson.build 16diff --git a/meson.build b/meson.build
18index afb6eaa..6aa70f5 100644 17index 6ee775e..8bc5fa7 100644
19--- a/meson.build 18--- a/meson.build
20+++ b/meson.build 19+++ b/meson.build
21@@ -1692,7 +1692,7 @@ atomicdefine = ''' 20@@ -1938,7 +1938,7 @@ atomicdefine = '''
22 # We know that we can always use real ("lock free") atomic operations with MSVC 21 # We know that we can always use real ("lock free") atomic operations with MSVC
23 if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops') 22 if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops')
24 have_atomic_lock_free = true 23 have_atomic_lock_free = true
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch
new file mode 100644
index 0000000000..14dcb278e0
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch
@@ -0,0 +1,29 @@
1From 294f3e6e9a0a9f4733e85ed6810d1b743055370b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sat, 16 Sep 2023 22:28:27 +0200
4Subject: [PATCH] meson.build: do not enable pidfd features on native glib
5 builds
6
7We still use host distros like alma 8 with kernels older than 5.4,
8where these features are not implemented.
9
10Upstream-Status: Inappropriate [oe-core specific]
11Signed-off-by: Alexander Kanavin <alex@linutronix.de>
12---
13 meson.build | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-)
15
16diff --git a/meson.build b/meson.build
17index 8bc5fa7..df1fa60 100644
18--- a/meson.build
19+++ b/meson.build
20@@ -981,7 +981,8 @@ if cc.links('''#include <sys/syscall.h>
21 waitid (P_PIDFD, 0, &child_info, WEXITED | WNOHANG);
22 return 0;
23 }''', name : 'pidfd_open(2) system call')
24- glib_conf.set('HAVE_PIDFD', 1)
25+ #requires kernel 5.4+
26+ #glib_conf.set('HAVE_PIDFD', 1)
27 endif
28
29 # Check for __uint128_t (gcc) by checking for 128-bit division
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch
deleted file mode 100644
index 40427e0e67..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-tests-codegen.py-removing-unecessary-print-statement.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From 6178df5658045a6253ef806e018fe80d99a8f5fb Mon Sep 17 00:00:00 2001
2From: Yi Fan Yu <yifan.yu@windriver.com>
3Date: Mon, 1 Feb 2021 16:10:28 -0500
4Subject: [PATCH] tests/codegen.py: removing unecessary print statement
5
6A huge amount of output(boiler-plate code) is
7printed to the console screen.
8This is not critical to the test results.
9
10This causes intermittent test failure when another process
11has to parse its output.
12
13Root cause is in ptest-runner, This is a workaround
14
15Uptream-Status: Inappropriate [other]
16
17
18
19Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
20---
21 gio/tests/codegen.py | 1 -
22 1 file changed, 1 deletion(-)
23
24diff --git a/gio/tests/codegen.py b/gio/tests/codegen.py
25index 51de0ede4..cfa4db42e 100644
26--- a/gio/tests/codegen.py
27+++ b/gio/tests/codegen.py
28@@ -250,7 +250,6 @@ class TestCodegen(unittest.TestCase):
29
30 result = Result(info, out, err, subs)
31
32- print('Output:', result.out)
33 return result
34
35 def runCodegenWithInterface(self, interface_contents, *args):
36--
372.29.2
38
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 1c645f3a9a..6dff5179c7 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
@@ -1,11 +1,10 @@
1From 79ce7e545dd3a93f77d2146d50b6fa061fbceed9 Mon Sep 17 00:00:00 2001 1From 50636758c73e5e61212a8f801c6c602b8aab5ba7 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Tue, 3 Oct 2017 10:45:55 +0300 3Date: Tue, 3 Oct 2017 10:45:55 +0300
4Subject: [PATCH] Do not hardcode python path into various tools 4Subject: [PATCH] Do not hardcode python path into various tools
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
9--- 8---
10 gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +- 9 gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +-
11 gobject/glib-genmarshal.in | 2 +- 10 gobject/glib-genmarshal.in | 2 +-
@@ -23,7 +22,7 @@ index 67d3675..4e92a7a 100755
23 # GDBus - GLib D-Bus Library 22 # GDBus - GLib D-Bus Library
24 # 23 #
25diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in 24diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
26index 7380f24..c8abeaa 100755 25index aa5af43..56e8e2e 100755
27--- a/gobject/glib-genmarshal.in 26--- a/gobject/glib-genmarshal.in
28+++ b/gobject/glib-genmarshal.in 27+++ b/gobject/glib-genmarshal.in
29@@ -1,4 +1,4 @@ 28@@ -1,4 +1,4 @@
@@ -33,7 +32,7 @@ index 7380f24..c8abeaa 100755
33 # pylint: disable=too-many-lines, missing-docstring, invalid-name 32 # pylint: disable=too-many-lines, missing-docstring, invalid-name
34 33
35diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in 34diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
36index 91ad779..3ebef62 100755 35index 353e53a..8ed6c39 100755
37--- a/gobject/glib-mkenums.in 36--- a/gobject/glib-mkenums.in
38+++ b/gobject/glib-mkenums.in 37+++ b/gobject/glib-mkenums.in
39@@ -1,4 +1,4 @@ 38@@ -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
deleted file mode 100644
index 41ecfa1df8..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
+++ /dev/null
@@ -1,121 +0,0 @@
1From 7cde170afe6854d674b50e32b4c1d3b511be9abe 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 788cf97..dab65d2 100644
19--- a/gio/tests/meson.build
20+++ b/gio/tests/meson.build
21@@ -203,7 +203,7 @@ if host_machine.system() != 'windows'
22
23 # Test programs that need to bring up a session bus (requires dbus-daemon)
24 have_dbus_daemon = find_program('dbus-daemon', required : false).found()
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@@ -548,12 +548,12 @@ 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 plugin_resources_c = custom_target('plugin-resources.c',
38 input : 'test4.gresource.xml',
39 output : 'plugin-resources.c',
40- command : [glib_compile_resources,
41+ command : ['glib-compile-resources',
42 '--target=@OUTPUT@',
43 '--sourcedir=' + meson.current_source_dir(),
44 '--generate-source',
45@@ -577,7 +577,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
46 test_gresource = custom_target('test.gresource',
47 input : 'test.gresource.xml',
48 output : 'test.gresource',
49- command : [glib_compile_resources,
50+ command : ['glib-compile-resources',
51 '--target=@OUTPUT@',
52 '--sourcedir=' + meson.current_source_dir(),
53 '--sourcedir=' + meson.current_build_dir(),
54@@ -588,7 +588,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
55 test_resources2_c = custom_target('test_resources2.c',
56 input : 'test3.gresource.xml',
57 output : 'test_resources2.c',
58- command : [glib_compile_resources,
59+ command : ['glib-compile-resources',
60 '--target=@OUTPUT@',
61 '--sourcedir=' + meson.current_source_dir(),
62 '--generate',
63@@ -599,7 +599,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
64 test_resources2_h = custom_target('test_resources2.h',
65 input : 'test3.gresource.xml',
66 output : 'test_resources2.h',
67- command : [glib_compile_resources,
68+ command : ['glib-compile-resources',
69 '--target=@OUTPUT@',
70 '--sourcedir=' + meson.current_source_dir(),
71 '--generate',
72@@ -611,7 +611,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
73 input : 'test2.gresource.xml',
74 depends : big_test_resource,
75 output : 'test_resources.c',
76- command : [glib_compile_resources,
77+ command : ['glib-compile-resources',
78 '--target=@OUTPUT@',
79 '--sourcedir=' + meson.current_source_dir(),
80 '--sourcedir=' + meson.current_build_dir(),
81@@ -622,7 +622,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
82 digit_test_resources_c = custom_target('digit_test_resources.c',
83 input : '111_digit_test.gresource.xml',
84 output : 'digit_test_resources.c',
85- command : [glib_compile_resources,
86+ command : ['glib-compile-resources',
87 '--target=@OUTPUT@',
88 '--sourcedir=' + meson.current_source_dir(),
89 '--sourcedir=' + meson.current_build_dir(),
90@@ -633,7 +633,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
91 digit_test_resources_h = custom_target('digit_test_resources.h',
92 input : '111_digit_test.gresource.xml',
93 output : 'digit_test_resources.h',
94- command : [glib_compile_resources,
95+ command : ['glib-compile-resources',
96 '--target=@OUTPUT@',
97 '--sourcedir=' + meson.current_source_dir(),
98 '--generate',
99@@ -668,11 +668,11 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
100
101 ld = find_program('ld', required : false)
102
103- if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
104+ if not meson.is_cross_build()
105 test_gresource_binary = custom_target('test5.gresource',
106 input : 'test5.gresource.xml',
107 output : 'test5.gresource',
108- command : [glib_compile_resources,
109+ command : ['glib-compile-resources',
110 '--target=@OUTPUT@',
111 '--sourcedir=' + meson.current_source_dir(),
112 '--sourcedir=' + meson.current_build_dir(),
113@@ -684,7 +684,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
114 test_resources_binary_c = custom_target('test_resources_binary.c',
115 input : 'test5.gresource.xml',
116 output : 'test_resources_binary.c',
117- command : [glib_compile_resources,
118+ command : ['glib-compile-resources',
119 '--target=@OUTPUT@',
120 '--sourcedir=' + meson.current_source_dir(),
121 '--sourcedir=' + meson.current_build_dir(),
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
new file mode 100644
index 0000000000..bdfbd55899
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
@@ -0,0 +1,54 @@
1From cce3ae98a2c1966719daabff5a4ec6cf94a846f6 Mon Sep 17 00:00:00 2001
2From: Philip Withnall <pwithnall@gnome.org>
3Date: Mon, 26 Feb 2024 16:55:44 +0000
4Subject: [PATCH] tests: Remove variable-length lookbehind tests for GRegex
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9PCRE2 10.43 has now introduced support for variable-length lookbehind,
10so these tests now fail if GLib is built against PCRE2 10.43 or higher.
11
12See
13https://github.com/PCRE2Project/pcre2/blob/e8db6fa7137f4c6f66cb87e0a3c9467252ec1ef7/ChangeLog#L94.
14
15Rather than making the tests conditional on the version of PCRE2 in use,
16just remove them. They are mostly testing the PCRE2 code rather than
17any code in GLib, so don’t have much value.
18
19This should fix CI runs on msys2-mingw32, which updated to PCRE2 10.43 2
20days ago.
21
22Signed-off-by: Philip Withnall <pwithnall@gnome.org>
23
24Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/cce3ae98a2c1966719daabff5a4ec6cf94a846f6]
25Signed-off-by: Alexander Kanavin <alex@linutronix.de>
26---
27 glib/tests/regex.c | 10 ----------
28 1 file changed, 10 deletions(-)
29
30diff --git a/glib/tests/regex.c b/glib/tests/regex.c
31index 1082526292..d7a698ec67 100644
32--- a/glib/tests/regex.c
33+++ b/glib/tests/regex.c
34@@ -1885,16 +1885,6 @@ test_lookbehind (void)
35 g_match_info_free (match);
36 g_regex_unref (regex);
37
38- regex = g_regex_new ("(?<!dogs?|cats?) x", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
39- g_assert (regex == NULL);
40- g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND);
41- g_clear_error (&error);
42-
43- regex = g_regex_new ("(?<=ab(c|de)) foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
44- g_assert (regex == NULL);
45- g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND);
46- g_clear_error (&error);
47-
48 regex = g_regex_new ("(?<=abc|abde)foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
49 g_assert (regex);
50 g_assert_no_error (error);
51--
52GitLab
53
54
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch b/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch
new file mode 100644
index 0000000000..4f38509da6
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch
@@ -0,0 +1,361 @@
1From ce840b6b111e1e109e511f6833d6aa419e2b723a Mon Sep 17 00:00:00 2001
2From: Philip Withnall <philip@tecnocode.co.uk>
3Date: Tue, 23 Jan 2024 11:16:52 +0000
4Subject: [PATCH] Merge branch '2887-memory-monitor-tests' into 'main'
5
6tests: Fix race condition in memory-monitor-dbus.test
7
8Closes #2887
9
10See merge request GNOME/glib!3844
11
12Hopefully these commits fix the occasional failures we've been seeing:
13https://bugzilla.yoctoproject.org/show_bug.cgi?id=15362
14
15Upstream-Status: Backport
16Signed-off-by: Ross Burton <ross.burton@arm.com>
17---
18 gio/tests/memory-monitor-dbus.py.in | 64 +++++++++++++-------
19 gio/tests/memory-monitor-portal.py.in | 54 ++++++++++-------
20 gio/tests/power-profile-monitor-dbus.py.in | 35 ++++++-----
21 gio/tests/power-profile-monitor-portal.py.in | 34 ++++++-----
22 4 files changed, 113 insertions(+), 74 deletions(-)
23
24diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in
25index bf32918..7aae01e 100755
26--- a/gio/tests/memory-monitor-dbus.py.in
27+++ b/gio/tests/memory-monitor-dbus.py.in
28@@ -16,7 +16,6 @@ import sys
29 import subprocess
30 import fcntl
31 import os
32-import time
33
34 import taptestrunner
35
36@@ -57,53 +56,74 @@ try:
37 fcntl.fcntl(self.p_mock.stdout, fcntl.F_SETFL, flags | os.O_NONBLOCK)
38 self.last_warning = -1
39 self.dbusmock = dbus.Interface(self.obj_lmm, dbusmock.MOCK_IFACE)
40+
41+ try:
42+ self.wait_for_bus_object('org.freedesktop.LowMemoryMonitor',
43+ '/org/freedesktop/LowMemoryMonitor',
44+ system_bus=True)
45+ except:
46+ raise
47+
48 self.memory_monitor = Gio.MemoryMonitor.dup_default()
49+ assert("GMemoryMonitorDBus" in str(self.memory_monitor))
50 self.memory_monitor.connect("low-memory-warning", self.memory_warning_cb)
51 self.mainloop = GLib.MainLoop()
52 self.main_context = self.mainloop.get_context()
53
54+ # The LowMemoryMonitor API is stateless: it doesn’t expose any
55+ # properties, just a warning signal. Emit the signal in a loop until
56+ # the GMemoryMonitor instance has initialised and synchronised to
57+ # the right state.
58+ def emit_warning(level):
59+ self.dbusmock.EmitWarning(level)
60+ return GLib.SOURCE_CONTINUE
61+
62+ idle_id = GLib.idle_add(emit_warning, 0)
63+ while self.last_warning != 0:
64+ self.main_context.iteration(True)
65+ GLib.source_remove(idle_id)
66+
67 def tearDown(self):
68 self.p_mock.terminate()
69 self.p_mock.wait()
70
71- def assertEventually(self, condition, message=None, timeout=50):
72+ def assertEventually(self, condition, message=None, timeout=5):
73 '''Assert that condition function eventually returns True.
74
75- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
76+ Timeout is in seconds, defaulting to 5 seconds. message is
77 printed on failure.
78 '''
79- while timeout >= 0:
80- context = GLib.MainContext.default()
81- while context.iteration(False):
82- pass
83- if condition():
84- break
85- timeout -= 1
86- time.sleep(0.1)
87- else:
88- self.fail(message or 'timed out waiting for ' + str(condition))
89+ if not message:
90+ message = 'timed out waiting for ' + str(condition)
91+
92+ def timed_out_cb(message):
93+ self.fail(message)
94+ return GLib.SOURCE_REMOVE
95+
96+ timeout_source = GLib.timeout_source_new_seconds(timeout)
97+ timeout_source.set_callback(timed_out_cb, message)
98+ timeout_source.attach(self.main_context)
99+
100+ while not condition():
101+ self.main_context.iteration(True)
102+
103+ timeout_source.destroy()
104
105 def memory_warning_cb(self, monitor, level):
106+ print("Received memory warning signal, level", level)
107 self.last_warning = level
108 self.main_context.wakeup()
109
110 def test_low_memory_warning_signal(self):
111 '''LowMemoryWarning signal'''
112
113- # Wait 2 seconds
114- timeout = 2
115- while timeout > 0:
116- time.sleep(0.5)
117- timeout -= 0.5
118- self.main_context.iteration(False)
119-
120 self.dbusmock.EmitWarning(100)
121 # Wait 2 seconds or until warning
122- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20)
123+ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 2)
124
125 self.dbusmock.EmitWarning(255)
126 # Wait 2 seconds or until warning
127- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20)
128+ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 2)
129
130 except ImportError as e:
131 @unittest.skip("Cannot import %s" % e.name)
132diff --git a/gio/tests/memory-monitor-portal.py.in b/gio/tests/memory-monitor-portal.py.in
133index 748cee8..f570508 100755
134--- a/gio/tests/memory-monitor-portal.py.in
135+++ b/gio/tests/memory-monitor-portal.py.in
136@@ -16,7 +16,6 @@ import sys
137 import subprocess
138 import fcntl
139 import os
140-import time
141
142 import taptestrunner
143
144@@ -80,26 +79,44 @@ try:
145 self.mainloop = GLib.MainLoop()
146 self.main_context = self.mainloop.get_context()
147
148+ # The LowMemoryMonitor API is stateless: it doesn’t expose any
149+ # properties, just a warning signal. Emit the signal in a loop until
150+ # the GMemoryMonitor instance has initialised and synchronised to
151+ # the right state.
152+ def emit_warning(level):
153+ self.dbusmock.EmitWarning(level)
154+ return GLib.SOURCE_CONTINUE
155+
156+ idle_id = GLib.idle_add(self.emit_warning, 0)
157+ while self.last_warning != 0:
158+ self.main_context.iteration(True)
159+ GLib.source_remove(idle_id)
160+
161 def tearDown(self):
162 self.p_mock.terminate()
163 self.p_mock.wait()
164
165- def assertEventually(self, condition, message=None, timeout=50):
166+ def assertEventually(self, condition, message=None, timeout=5):
167 '''Assert that condition function eventually returns True.
168
169- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
170+ Timeout is in seconds, defaulting to 5 seconds. message is
171 printed on failure.
172 '''
173- while timeout >= 0:
174- context = GLib.MainContext.default()
175- while context.iteration(False):
176- pass
177- if condition():
178- break
179- timeout -= 1
180- time.sleep(0.1)
181- else:
182- self.fail(message or 'timed out waiting for ' + str(condition))
183+ if not message:
184+ message = 'timed out waiting for ' + str(condition)
185+
186+ def timed_out_cb(message):
187+ self.fail(message)
188+ return GLib.SOURCE_REMOVE
189+
190+ timeout_source = GLib.timeout_source_new_seconds(timeout)
191+ timeout_source.set_callback(timed_out_cb, message)
192+ timeout_source.attach(self.main_context)
193+
194+ while not condition():
195+ self.main_context.iteration(True)
196+
197+ timeout_source.destroy()
198
199 def portal_memory_warning_cb(self, monitor, level):
200 self.last_warning = level
201@@ -108,20 +125,13 @@ try:
202 def test_low_memory_warning_portal_signal(self):
203 '''LowMemoryWarning signal'''
204
205- # Wait 2 seconds
206- timeout = 2
207- while timeout > 0:
208- time.sleep(0.5)
209- timeout -= 0.5
210- self.main_context.iteration(False)
211-
212 self.dbusmock.EmitWarning(100)
213 # Wait 2 seconds or until warning
214- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20)
215+ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 2)
216
217 self.dbusmock.EmitWarning(255)
218 # Wait 2 seconds or until warning
219- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20)
220+ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 2)
221
222 except ImportError as e:
223 @unittest.skip("Cannot import %s" % e.name)
224diff --git a/gio/tests/power-profile-monitor-dbus.py.in b/gio/tests/power-profile-monitor-dbus.py.in
225index 06e594f..f955afc 100755
226--- a/gio/tests/power-profile-monitor-dbus.py.in
227+++ b/gio/tests/power-profile-monitor-dbus.py.in
228@@ -16,7 +16,6 @@ import sys
229 import subprocess
230 import fcntl
231 import os
232-import time
233
234 import taptestrunner
235
236@@ -58,6 +57,7 @@ try:
237 self.power_saver_enabled = False
238 self.dbus_props = dbus.Interface(self.obj_ppd, dbus.PROPERTIES_IFACE)
239 self.power_profile_monitor = Gio.PowerProfileMonitor.dup_default()
240+ assert("GPowerProfileMonitorDBus" in str(self.power_profile_monitor))
241 self.power_profile_monitor.connect("notify::power-saver-enabled", self.power_saver_enabled_cb)
242 self.mainloop = GLib.MainLoop()
243 self.main_context = self.mainloop.get_context()
244@@ -66,22 +66,27 @@ try:
245 self.p_mock.terminate()
246 self.p_mock.wait()
247
248- def assertEventually(self, condition, message=None, timeout=50):
249+ def assertEventually(self, condition, message=None, timeout=5):
250 '''Assert that condition function eventually returns True.
251
252- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
253+ Timeout is in seconds, defaulting to 5 seconds. message is
254 printed on failure.
255 '''
256- while timeout >= 0:
257- context = GLib.MainContext.default()
258- while context.iteration(False):
259- pass
260- if condition():
261- break
262- timeout -= 1
263- time.sleep(0.1)
264- else:
265- self.fail(message or 'timed out waiting for ' + str(condition))
266+ if not message:
267+ message = 'timed out waiting for ' + str(condition)
268+
269+ def timed_out_cb(message):
270+ self.fail(message)
271+ return GLib.SOURCE_REMOVE
272+
273+ timeout_source = GLib.timeout_source_new_seconds(timeout)
274+ timeout_source.set_callback(timed_out_cb, message)
275+ timeout_source.attach(self.main_context)
276+
277+ while not condition():
278+ self.main_context.iteration(True)
279+
280+ timeout_source.destroy()
281
282 def power_saver_enabled_cb(self, spec, data):
283 self.power_saver_enabled = self.power_profile_monitor.get_power_saver_enabled()
284@@ -92,10 +97,10 @@ try:
285
286 self.assertEqual(self.power_profile_monitor.get_power_saver_enabled(), False)
287 self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('power-saver', variant_level=1))
288- self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 10)
289+ self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 1)
290
291 self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('balanced', variant_level=1))
292- self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 10)
293+ self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 1)
294
295 except ImportError as e:
296 @unittest.skip("Cannot import %s" % e.name)
297diff --git a/gio/tests/power-profile-monitor-portal.py.in b/gio/tests/power-profile-monitor-portal.py.in
298index 09e9a45..ad2abf6 100755
299--- a/gio/tests/power-profile-monitor-portal.py.in
300+++ b/gio/tests/power-profile-monitor-portal.py.in
301@@ -16,7 +16,6 @@ import sys
302 import subprocess
303 import fcntl
304 import os
305-import time
306
307 import taptestrunner
308
309@@ -90,22 +89,27 @@ try:
310 self.p_mock.terminate()
311 self.p_mock.wait()
312
313- def assertEventually(self, condition, message=None, timeout=50):
314+ def assertEventually(self, condition, message=None, timeout=5):
315 '''Assert that condition function eventually returns True.
316
317- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is
318+ Timeout is in seconds, defaulting to 5 seconds. message is
319 printed on failure.
320 '''
321- while timeout >= 0:
322- context = GLib.MainContext.default()
323- while context.iteration(False):
324- pass
325- if condition():
326- break
327- timeout -= 1
328- time.sleep(0.1)
329- else:
330- self.fail(message or 'timed out waiting for ' + str(condition))
331+ if not message:
332+ message = 'timed out waiting for ' + str(condition)
333+
334+ def timed_out_cb(message):
335+ self.fail(message)
336+ return GLib.SOURCE_REMOVE
337+
338+ timeout_source = GLib.timeout_source_new_seconds(timeout)
339+ timeout_source.set_callback(timed_out_cb, message)
340+ timeout_source.attach(self.main_context)
341+
342+ while not condition():
343+ self.main_context.iteration(True)
344+
345+ timeout_source.destroy()
346
347 def power_saver_enabled_cb(self, spec, data):
348 self.power_saver_enabled = self.power_profile_monitor.get_power_saver_enabled()
349@@ -116,10 +120,10 @@ try:
350
351 self.assertEqual(self.power_profile_monitor.get_power_saver_enabled(), False)
352 self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('power-saver', variant_level=1))
353- self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 10)
354+ self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 1)
355
356 self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('balanced', variant_level=1))
357- self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 10)
358+ self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 1)
359
360 def test_power_profile_power_saver_enabled_portal_default(self):
361 '''power-saver-enabled property default value'''
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
index c4648f58c7..3049e5116e 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
+++ b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
@@ -3,3 +3,4 @@ have_c99_vsnprintf = true
3have_c99_snprintf = true 3have_c99_snprintf = true
4have_unix98_printf = true 4have_unix98_printf = true
5va_val_copy = true 5va_val_copy = true
6have_strlcpy = true
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 4cbcc29a50..3e79bbf679 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 011c9f024b6475d31e7d5432a38d00fb67eaea40 Mon Sep 17 00:00:00 2001 1From f40e89b3852df37959606ee13b1a14ade81fa886 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
@@ -13,38 +13,32 @@ Signed-off-by: Ross Burton <ross.burton@intel.com>
13 13
14Port patch to 2.48 14Port patch to 2.48
15Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 15Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
16
17--- 16---
18 gio/giomodule.c | 12 +++++++++++- 17 gio/giomodule.c | 7 -------
19 1 file changed, 11 insertions(+), 1 deletion(-) 18 1 file changed, 7 deletions(-)
20 19
21diff --git a/gio/giomodule.c b/gio/giomodule.c 20diff --git a/gio/giomodule.c b/gio/giomodule.c
22index dc4d6d3..da46906 100644 21index 17fabe6..8021208 100644
23--- a/gio/giomodule.c 22--- a/gio/giomodule.c
24+++ b/gio/giomodule.c 23+++ b/gio/giomodule.c
25@@ -49,6 +49,8 @@ 24@@ -1271,11 +1271,6 @@ get_gio_module_dir (void)
26 #include "gmemorymonitordbus.h"
27 #ifdef G_OS_WIN32
28 #include "gregistrysettingsbackend.h"
29+#else
30+#include <dlfcn.h>
31 #endif
32 #include <glib/gstdio.h>
33
34@@ -1163,7 +1165,15 @@ get_gio_module_dir (void)
35 NULL);
36 g_free (install_dir); 25 g_free (install_dir);
37 #else 26 #else
38- module_dir = g_strdup (GIO_MODULE_DIR); 27 module_dir = g_strdup (GIO_MODULE_DIR);
39+ Dl_info info; 28-#ifdef __APPLE__
40+ 29-#include "TargetConditionals.h"
41+ if (dladdr (g_io_module_new, &info)) { 30-/* Only auto-relocate on macOS, not watchOS etc; older macOS SDKs only define TARGET_OS_MAC */
42+ char *libdir = g_path_get_dirname (info.dli_fname); 31-#if (defined (TARGET_OS_OSX) && TARGET_OS_OSX) || \
43+ module_dir = g_build_filename (libdir, "gio", "modules", NULL); 32- (!defined (TARGET_OS_OSX) && defined (TARGET_OS_MAC) && TARGET_OS_MAC)
44+ g_free (libdir); 33 #include <dlfcn.h>
45+ } else { 34 {
46+ module_dir = g_strdup (GIO_MODULE_DIR); 35 g_autofree gchar *path = NULL;
47+ } 36@@ -1294,8 +1289,6 @@ get_gio_module_dir (void)
37 }
38 }
39 }
40-#endif
41-#endif
48 #endif 42 #endif
49 } 43 }
50 44
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..831bc3b91f 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
8su glib2-test -c 'gnome-desktop-testing-runner glib' 8cd /tmp
9su glib2-test -c 'G_TEST_TMPDIR=`readlink -f /tmp` gnome-desktop-testing-runner glib'
9userdel glib2-test 10userdel glib2-test
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch b/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch
new file mode 100644
index 0000000000..cd5ac287c3
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch
@@ -0,0 +1,32 @@
1From bb11d1a4ae77d93ec0743e54077cf0f990243fa6 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Thu, 28 Mar 2024 16:27:09 +0000
4Subject: [PATCH] Skip /timeout/rounding test
5
6This test is sensitive to load because it expects certain timeout operations
7to succeed in specific time periods. Whilst these timeouts are fairly large,
8they're still exceeded inside a qemu on a loaded system.
9
10https://bugzilla.yoctoproject.org/show_bug.cgi?id=14464
11
12Upstream-Status: Inappropriate [OE-specific]
13Signed-off-by: Ross Burton <ross.burton@arm.com>
14---
15 glib/tests/timeout.c | 1 -
16 1 file changed, 1 deletion(-)
17
18diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c
19index 1ae3f3a34..85a715b0f 100644
20--- a/glib/tests/timeout.c
21+++ b/glib/tests/timeout.c
22@@ -214,7 +214,6 @@ main (int argc, char *argv[])
23 g_test_add_func ("/timeout/seconds-once", test_seconds_once);
24 g_test_add_func ("/timeout/weeks-overflow", test_weeks_overflow);
25 g_test_add_func ("/timeout/far-future-ready-time", test_far_future_ready_time);
26- g_test_add_func ("/timeout/rounding", test_rounding);
27
28 return g_test_run ();
29 }
30--
312.34.1
32
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb
index 882a89da7a..b1669ead75 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.66.7.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb
@@ -7,22 +7,23 @@ 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-codegen.py-bump-timeout-to-100-seconds.patch \ 17 file://0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch \
20 file://0001-tests-codegen.py-removing-unecessary-print-statement.patch \ 18 file://memory-monitor.patch \
19 file://fix-regex.patch \
20 file://skip-timeout.patch \
21 " 21 "
22SRC_URI:append:class-native = " file://relocate-modules.patch \
23 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
24 "
22 25
23SRC_URI_append_class-native = " file://relocate-modules.patch" 26SRC_URI[sha256sum] = "24b8e0672dca120cc32d394bccb85844e732e04fe75d18bb0573b2dbc7548f63"
24
25SRC_URI[sha256sum] = "09f158769f6f26b31074e15b1ac80ec39b13b53102dfae66cfe826fb2cc65502"
26 27
27# Find any meson cross files in FILESPATH that are relevant for the current 28# Find any meson cross files in FILESPATH that are relevant for the current
28# build (using siteinfo) and add them to EXTRA_OEMESON. 29# build (using siteinfo) and add them to EXTRA_OEMESON.
@@ -31,7 +32,7 @@ def find_meson_cross_files(d):
31 if bb.data.inherits_class('native', d): 32 if bb.data.inherits_class('native', d):
32 return "" 33 return ""
33 34
34 thisdir = d.getVar("THISDIR") 35 thisdir = os.path.normpath(d.getVar("THISDIR"))
35 import collections 36 import collections
36 sitedata = siteinfo_data(d) 37 sitedata = siteinfo_data(d)
37 # filename -> found 38 # filename -> found
@@ -41,7 +42,8 @@ def find_meson_cross_files(d):
41 filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) 42 filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
42 sanitized_path = filename.replace(thisdir, "${THISDIR}") 43 sanitized_path = filename.replace(thisdir, "${THISDIR}")
43 if sanitized_path == filename: 44 if sanitized_path == filename:
44 bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir)) 45 if os.path.exists(filename):
46 bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir))
45 continue 47 continue
46 files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) 48 files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename)
47 49
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index 71777bc459..fac8875d84 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -4,12 +4,11 @@ HOMEPAGE = "https://developer.gnome.org/glib/"
4 4
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 = "LGPLv2.1+ & BSD & 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://glib/pcre/pcre.h;beginline=8;endline=36;md5=3e2977dae4ad05217f58c446237298fc \
13 file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc" 12 file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc"
14BUGTRACKER = "http://bugzilla.gnome.org" 13BUGTRACKER = "http://bugzilla.gnome.org"
15SECTION = "libs" 14SECTION = "libs"
@@ -22,81 +21,75 @@ DEPENDS = "glib-2.0-native \
22 virtual/libintl \ 21 virtual/libintl \
23 virtual/libiconv \ 22 virtual/libiconv \
24 libffi \ 23 libffi \
24 libpcre2 \
25 zlib" 25 zlib"
26 26
27PACKAGES += "${PN}-codegen ${PN}-utils" 27PACKAGES += "${PN}-codegen ${PN}-utils"
28 28
29LEAD_SONAME = "libglib-2.0.*" 29LEAD_SONAME = "libglib-2.0.*"
30 30
31inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages 31inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data
32
33DEPENDS_append_class-target = "${@' gtk-doc' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
34 32
35GTKDOC_MESON_OPTION = "gtk_doc" 33GTKDOC_MESON_OPTION = "gtk_doc"
36 34
37S = "${WORKDIR}/glib-${PV}" 35S = "${WORKDIR}/glib-${PV}"
38 36
39PACKAGECONFIG ??= "system-pcre libmount \ 37PACKAGECONFIG ??= "libmount \
40 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" 38 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
41# To use the system pcre it must be configured with --enable-unicode-properties
42PACKAGECONFIG[system-pcre] = "-Dinternal_pcre=false,-Dinternal_pcre=true,libpcre"
43PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" 39PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux"
44PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" 40PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native"
45# libelf is auto-detected without a configuration option 41PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils"
46PACKAGECONFIG[libelf] = ",,elfutils" 42PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,"
47PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,dbus" 43PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux"
48 44
49EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false -Dselinux=disabled" 45EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false"
50 46
51do_configure_prepend() { 47do_configure:prepend() {
52 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 48 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
53} 49}
54 50
55FILES_${PN} = "${libdir}/lib*${SOLIBS} \ 51FILES:${PN} = "${libdir}/lib*${SOLIBS} \
56 ${libdir}/gio \ 52 ${libdir}/gio \
57 ${libexecdir}/*gio-querymodules \ 53 ${libexecdir}/*gio-querymodules \
54 ${libexecdir}/*gio-launch-desktop \
55 ${datadir}/glib-2.0/dtds \
58 ${datadir}/glib-2.0/schemas" 56 ${datadir}/glib-2.0/schemas"
59 57
60FILES_${PN}-utils += "${bindir}/glib-genmarshal \ 58FILES:${PN}-dev += "${libdir}/glib-2.0/include \
61 ${bindir}/glib-gettextize \
62 ${bindir}/glib-mkenums \
63 ${bindir}/glib-compile-resources"
64
65FILES_${PN}-dev += "${libdir}/glib-2.0/include \
66 ${libdir}/gio/modules/lib*${SOLIBSDEV} \ 59 ${libdir}/gio/modules/lib*${SOLIBSDEV} \
67 ${libdir}/gio/modules/*.la \ 60 ${libdir}/gio/modules/*.la \
68 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ 61 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \
69 ${datadir}/glib-2.0/schemas/gschema.dtd \ 62 ${datadir}/glib-2.0/schemas/gschema.dtd \
70 ${datadir}/glib-2.0/valgrind/glib.supp \ 63 ${datadir}/glib-2.0/valgrind/glib.supp \
71 ${datadir}/gettext/its" 64 ${datadir}/gettext/its"
72FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" 65FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
73FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ 66FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
74 ${bindir}/gdbus-codegen" 67 ${bindir}/gdbus-codegen"
75FILES_${PN}-utils = "${bindir}/*" 68FILES:${PN}-utils = "${bindir}/*"
76 69
77SHAREDMIMEDEP = "shared-mime-info" 70SHAREDMIMEDEP = "shared-mime-info"
78SHAREDMIMEDEP_class-native = "" 71SHAREDMIMEDEP:class-native = ""
79# When cross compiling for Windows we don't want to include this 72# When cross compiling for Windows we don't want to include this
80SHAREDMIMEDEP_mingw32 = "" 73SHAREDMIMEDEP:mingw32 = ""
81 74
82RRECOMMENDS_${PN} += "${SHAREDMIMEDEP}" 75RRECOMMENDS:${PN} += "${SHAREDMIMEDEP}"
83 76
84ARM_INSTRUCTION_SET_armv4 = "arm" 77ARM_INSTRUCTION_SET:armv4 = "arm"
85ARM_INSTRUCTION_SET_armv5 = "arm" 78ARM_INSTRUCTION_SET:armv5 = "arm"
86# Valgrind runtime detection works using hand-written assembly, which 79# Valgrind runtime detection works using hand-written assembly, which
87# doesn't support mips16e 80# doesn't support mips16e
88CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1" 81CPPFLAGS:append:class-target:mips16e = " -DNVALGRIND=1"
89 82
90# GLib generally requires gettext to be present so for USE_NLS to yes. For 83# GLib generally requires gettext to be present so for USE_NLS to yes. For
91# native builds as i18n is disabled globally we have to add a gettext-native dependency. 84# native builds as i18n is disabled globally we have to add a gettext-native dependency.
92USE_NLS_class-target = "yes" 85USE_NLS:class-target = "yes"
93USE_NLS_class-nativesdk = "yes" 86USE_NLS:class-nativesdk = "yes"
94DEPENDS_append_class-native = " gettext-native" 87DEPENDS:append:class-native = " gettext-native"
95 88
96EXEEXT = "" 89EXEEXT = ""
97EXEEXT_mingw32 = ".exe" 90EXEEXT:mingw32 = ".exe"
98 91
99do_install_append () { 92do_install:append () {
100 if [ -f ${D}${bindir}/gtester-report ]; then 93 if [ -f ${D}${bindir}/gtester-report ]; then
101 sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|' 94 sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|'
102 fi 95 fi
@@ -118,7 +111,12 @@ do_install_append () {
118 mkdir -p ${D}${libdir}/gio/modules 111 mkdir -p ${D}${libdir}/gio/modules
119} 112}
120 113
121do_install_append_class-target () { 114do_install:append:class-native () {
115 # Link gio-querymodules into ${bindir} as otherwise tools like meson won't find it
116 ln -rs ${D}${libexecdir}/gio-querymodules ${D}${bindir}
117}
118
119do_install:append:class-target () {
122 # Tests are only installed on targets, not native builds. Separating this out 120 # Tests are only installed on targets, not native builds. Separating this out
123 # keeps glib-2.0-native from depending on DISTRO_FEATURES 121 # keeps glib-2.0-native from depending on DISTRO_FEATURES
124 if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then 122 if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then
@@ -131,24 +129,33 @@ do_install_append_class-target () {
131 mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test 129 mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test
132 fi 130 fi
133 fi 131 fi
132 # https://gitlab.gnome.org/GNOME/glib/-/issues/2810
133 rm -f ${D}${datadir}/installed-tests/glib/thread-pool-slow.test
134}
135do_install:append:class-target:libc-musl () {
136 # Remove failing tests on musl libc systems, this helps set baseline for musl testing
137 # they remain to be rootcaused and fixed but marked known failures here.
138 for t in convert.test collate.test gdatetime.test date.test converter-stream.test option-context.test; do
139 rm -rf ${D}${datadir}/installed-tests/glib/$t
140 done
134} 141}
135
136# As we do not build python3 for windows, makes no sense to ship the script that's using it 142# As we do not build python3 for windows, makes no sense to ship the script that's using it
137do_install_append_mingw32() { 143do_install:append:mingw32() {
138 rm -f ${D}${bindir}/gtester-report 144 rm -f ${D}${bindir}/gtester-report
139} 145}
140 146
141CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" 147CODEGEN_PYTHON_RDEPENDS = "python3 python3-packaging python3-xml"
142CODEGEN_PYTHON_RDEPENDS_mingw32 = "" 148CODEGEN_PYTHON_RDEPENDS:mingw32 = ""
143 149
144RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" 150RDEPENDS:${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}"
145 151
146RDEPENDS_${PN}-ptest += "${PN}-utils" 152RDEPENDS:${PN}-ptest += "${PN}-utils"
147 153
148RDEPENDS_${PN}-ptest += "\ 154RDEPENDS:${PN}-ptest += "\
149 coreutils \ 155 coreutils \
150 libgcc \ 156 libgcc \
151 dbus \ 157 dbus \
158 desktop-file-utils \
152 gnome-desktop-testing \ 159 gnome-desktop-testing \
153 tzdata \ 160 tzdata \
154 tzdata-americas \ 161 tzdata-americas \
@@ -168,9 +175,15 @@ RDEPENDS_${PN}-ptest += "\
168 python3-modules \ 175 python3-modules \
169 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-dbusmock', '', d)} \ 176 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-dbusmock', '', d)} \
170 ${PN}-codegen \ 177 ${PN}-codegen \
178 locale-base-de-de \
179 locale-base-es-es \
180 locale-base-en-gb \
181 locale-base-en-us \
182 locale-base-fr-fr \
183 locale-base-ru-ru \
171 " 184 "
172 185
173RDEPENDS_${PN}-ptest_append_libc-glibc = "\ 186RDEPENDS:${PN}-ptest:append:libc-glibc = "\
174 glibc-gconv-utf-16 \ 187 glibc-gconv-utf-16 \
175 glibc-charmap-utf-8 \ 188 glibc-charmap-utf-8 \
176 glibc-gconv-cp1255 \ 189 glibc-gconv-cp1255 \
@@ -182,18 +195,12 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = "\
182 glibc-gconv-iso8859-15 \ 195 glibc-gconv-iso8859-15 \
183 glibc-charmap-invariant \ 196 glibc-charmap-invariant \
184 glibc-localedata-translit-cjk-variants \ 197 glibc-localedata-translit-cjk-variants \
185 locale-base-tr-tr \
186 locale-base-lt-lt \ 198 locale-base-lt-lt \
187 locale-base-ja-jp.euc-jp \ 199 locale-base-ja-jp.euc-jp \
188 locale-base-fa-ir \ 200 locale-base-fa-ir \
189 locale-base-ru-ru \
190 locale-base-de-de \
191 locale-base-hr-hr \ 201 locale-base-hr-hr \
192 locale-base-el-gr \ 202 locale-base-el-gr \
193 locale-base-fr-fr \
194 locale-base-es-es \
195 locale-base-en-gb \
196 locale-base-en-us \
197 locale-base-pl-pl \ 203 locale-base-pl-pl \
198 locale-base-pl-pl.iso-8859-2 \ 204 locale-base-pl-pl.iso-8859-2 \
205 locale-base-tr-tr \
199 " 206 "