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/files/0001-Do-not-write-bindir-into-pkg-config-files.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch)31
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch)2
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch)6
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch)2
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-Set-host_machine-correctly-when-building-with-mingw3.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch)20
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch)4
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch88
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch)6
-rw-r--r--meta/recipes-core/glib-2.0/files/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch)6
-rw-r--r--meta/recipes-core/glib-2.0/files/0010-Do-not-hardcode-python-path-into-various-tools.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch)4
-rw-r--r--meta/recipes-core/glib-2.0/files/meson.cross.d/common (renamed from meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common)0
-rw-r--r--meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc (renamed from meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc)0
-rw-r--r--meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux (renamed from meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux)0
-rw-r--r--meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw (renamed from meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw)0
-rw-r--r--meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl (renamed from meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl)0
-rw-r--r--meta/recipes-core/glib-2.0/files/relocate-modules.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch)8
-rw-r--r--meta/recipes-core/glib-2.0/files/run-ptest (renamed from meta/recipes-core/glib-2.0/glib-2.0/run-ptest)0
-rw-r--r--meta/recipes-core/glib-2.0/files/skip-timeout.patch (renamed from meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch)7
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.2.bb5
-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/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_2.78.4.bb57
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.80.2.bb2
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc73
25 files changed, 211 insertions, 559 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch b/meta/recipes-core/glib-2.0/files/0001-Do-not-write-bindir-into-pkg-config-files.patch
index 8e6598fbef..10568b7c9f 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/files/0001-Do-not-write-bindir-into-pkg-config-files.patch
@@ -1,26 +1,30 @@
1From e7077aa23bfcd31a8e72e39dc93ce4f854678376 Mon Sep 17 00:00:00 2001 1From 10b08af6c7dcb03f954da29b6c4f9636b8796f30 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 prefix executables with $bindir in pkg-config files
5 5
6This would otherwise break when using the files to build other target 6This would otherwise break when using the executables to build other target
7components (we need to rely on PATH containing the paths to utilities, 7components (we need to rely on PATH containing the paths to utilities,
8rather than use target paths). 8rather 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--- 12---
13 gio/meson.build | 16 ++++++++-------- 13 gio/meson.build | 17 +++++++++--------
14 glib/meson.build | 6 +++--- 14 glib/meson.build | 7 ++++---
15 2 files changed, 11 insertions(+), 11 deletions(-) 15 2 files changed, 13 insertions(+), 11 deletions(-)
16 16
17diff --git a/gio/meson.build b/gio/meson.build 17diff --git a/gio/meson.build b/gio/meson.build
18index 5f91586..1a95f4f 100644 18index 77cba7b..25d709e 100644
19--- a/gio/meson.build 19--- a/gio/meson.build
20+++ b/gio/meson.build 20+++ b/gio/meson.build
21@@ -884,14 +884,14 @@ pkg.generate(libgio, 21@@ -883,17 +883,18 @@ libgio_dep = declare_dependency(link_with : libgio,
22 pkg.generate(libgio,
23 requires : ['glib-2.0', 'gobject-2.0'],
24 variables : [
25+ 'bindir=' + '${prefix}' / get_option('bindir'),
26 'schemasdir=' + '${datadir}' / schemas_subdir,
22 'dtdsdir=' + '${datadir}' / dtds_subdir, 27 'dtdsdir=' + '${datadir}' / dtds_subdir,
23 'bindir=' + '${prefix}' / get_option('bindir'),
24 'giomoduledir=' + pkgconfig_giomodulesdir, 28 'giomoduledir=' + pkgconfig_giomodulesdir,
25- 'gio=' + '${bindir}' / 'gio', 29- 'gio=' + '${bindir}' / 'gio',
26- 'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules', 30- 'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
@@ -42,16 +46,17 @@ index 5f91586..1a95f4f 100644
42 version : glib_version, 46 version : glib_version,
43 install_dir : glib_pkgconfigreldir, 47 install_dir : glib_pkgconfigreldir,
44diff --git a/glib/meson.build b/glib/meson.build 48diff --git a/glib/meson.build b/glib/meson.build
45index c26a35e..1d8ca6b 100644 49index d2efeba..5f5841d 100644
46--- a/glib/meson.build 50--- a/glib/meson.build
47+++ b/glib/meson.build 51+++ b/glib/meson.build
48@@ -447,9 +447,9 @@ pkg.generate(libglib, 52@@ -447,9 +447,10 @@ pkg.generate(libglib,
53 subdirs : ['glib-2.0'],
54 extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
49 variables : [ 55 variables : [
50 'bindir=' + '${prefix}' / get_option('bindir'),
51 'datadir=' + '${prefix}' / get_option('datadir'),
52- 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal', 56- 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal',
53- 'gobject_query=' + '${bindir}' / 'gobject-query', 57- 'gobject_query=' + '${bindir}' / 'gobject-query',
54- 'glib_mkenums=' + '${bindir}' / 'glib-mkenums', 58- 'glib_mkenums=' + '${bindir}' / 'glib-mkenums',
59+ 'bindir=' + '${prefix}' / get_option('bindir'),
55+ 'glib_genmarshal=glib-genmarshal', 60+ 'glib_genmarshal=glib-genmarshal',
56+ 'gobject_query=gobject-query', 61+ 'gobject_query=gobject-query',
57+ 'glib_mkenums=glib-mkenums', 62+ 'glib_mkenums=glib-mkenums',
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/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
index eb9dfdbcf9..b9c9706fc4 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/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch
@@ -1,4 +1,4 @@
1From 9a5d4bf65b658d744d610ee27ecd2ae65b14b158 Mon Sep 17 00:00:00 2001 1From 55c49c51d8db5af15132653003d2b65a5215eebf 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
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/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
index ad69f7ec65..bc539fe3e8 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/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
@@ -1,4 +1,4 @@
1From 4933aef791857a5aac650b60af800778658b875b Mon Sep 17 00:00:00 2001 1From 53333cf3ec787cb7e60585237327390e2ca89f4c 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
@@ -13,10 +13,10 @@ Upstream-Status: Inappropriate [OE specific]
13 1 file changed, 1 insertion(+) 13 1 file changed, 1 insertion(+)
14 14
15diff --git a/gio/meson.build b/gio/meson.build 15diff --git a/gio/meson.build b/gio/meson.build
16index f9fdf6e..5f91586 100644 16index 59c2b0f..77cba7b 100644
17--- a/gio/meson.build 17--- a/gio/meson.build
18+++ b/gio/meson.build 18+++ b/gio/meson.build
19@@ -1005,6 +1005,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu 19@@ -1007,6 +1007,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
20 c_args : gio_c_args, 20 c_args : gio_c_args,
21 # intl.lib is not compatible with SAFESEH 21 # intl.lib is not compatible with SAFESEH
22 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/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
index 0e3a62af6a..5e543339d8 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/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch
@@ -1,4 +1,4 @@
1From 8ae2e9c2a04e089306693a021149dc6b7d1bd679 Mon Sep 17 00:00:00 2001 1From 3db055ce8029372096be534c5cfc385f068bab17 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
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/files/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
index 32b4cea409..7ac03aa6ac 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/files/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
@@ -1,4 +1,4 @@
1From c0733f7a91dfe13152abc60c5a3064456b3e9d63 Mon Sep 17 00:00:00 2001 1From 3f85d7dfb25666aef43dd6d58b4151e523f83693 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
@@ -12,7 +12,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12 3 files changed, 8 insertions(+), 5 deletions(-) 12 3 files changed, 8 insertions(+), 5 deletions(-)
13 13
14diff --git a/gio/tests/meson.build b/gio/tests/meson.build 14diff --git a/gio/tests/meson.build b/gio/tests/meson.build
15index 4ef3343..e498e7e 100644 15index 3bfb333..60e3d3d 100644
16--- a/gio/tests/meson.build 16--- a/gio/tests/meson.build
17+++ b/gio/tests/meson.build 17+++ b/gio/tests/meson.build
18@@ -29,7 +29,7 @@ endif 18@@ -29,7 +29,7 @@ endif
@@ -24,16 +24,16 @@ index 4ef3343..e498e7e 100644
24 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] 24 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
25 endif 25 endif
26 26
27@@ -230,7 +230,7 @@ if have_dbus_daemon 27@@ -244,7 +244,7 @@ if have_dbus_daemon
28 endif 28 endif
29 29
30 # Test programs buildable on UNIX only 30 # Test programs buildable on UNIX only
31-if host_machine.system() != 'windows' 31-if host_machine.system() != 'windows'
32+if host_system != 'windows' 32+if host_system != 'windows'
33 gio_tests += { 33 gio_tests += {
34 'file' : {}, 34 'file' : {
35 'gdbus-peer-object-manager' : {}, 35 # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
36@@ -562,7 +562,7 @@ if host_machine.system() != 'windows' 36@@ -599,7 +599,7 @@ if host_machine.system() != 'windows'
37 endif # unix 37 endif # unix
38 38
39 # Test programs buildable on Windows only 39 # Test programs buildable on Windows only
@@ -42,7 +42,7 @@ index 4ef3343..e498e7e 100644
42 gio_tests += {'win32-streams' : {}} 42 gio_tests += {'win32-streams' : {}}
43 endif 43 endif
44 44
45@@ -632,7 +632,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' 45@@ -669,7 +669,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
46 } 46 }
47 endif 47 endif
48 48
@@ -52,10 +52,10 @@ index 4ef3343..e498e7e 100644
52 'gdbus-example-unix-fd-client' : { 52 'gdbus-example-unix-fd-client' : {
53 'install' : false, 53 'install' : false,
54diff --git a/glib/tests/meson.build b/glib/tests/meson.build 54diff --git a/glib/tests/meson.build b/glib/tests/meson.build
55index d80c86e..5329cda 100644 55index 85f40d2..39de732 100644
56--- a/glib/tests/meson.build 56--- a/glib/tests/meson.build
57+++ b/glib/tests/meson.build 57+++ b/glib/tests/meson.build
58@@ -216,7 +216,7 @@ if glib_conf.has('HAVE_EVENTFD') 58@@ -230,7 +230,7 @@ if glib_conf.has('HAVE_EVENTFD')
59 } 59 }
60 endif 60 endif
61 61
@@ -65,7 +65,7 @@ index d80c86e..5329cda 100644
65 glib_tests += { 65 glib_tests += {
66 'gpoll' : { 66 'gpoll' : {
67diff --git a/meson.build b/meson.build 67diff --git a/meson.build b/meson.build
68index 813c9b7..6ee775e 100644 68index b995ebc..257afb5 100644
69--- a/meson.build 69--- a/meson.build
70+++ b/meson.build 70+++ b/meson.build
71@@ -54,6 +54,9 @@ else 71@@ -54,6 +54,9 @@ else
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/files/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
index aee2986033..aa7127b65b 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/files/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch
@@ -1,4 +1,4 @@
1From 878e51f82100c698236fda0e069e14ea9249350c Mon Sep 17 00:00:00 2001 1From 97b4f18c65c52c9e6412ecf8affc22f6f42d3465 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
@@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
14 14
15diff --git a/gio/tests/resources.c b/gio/tests/resources.c 15diff --git a/gio/tests/resources.c b/gio/tests/resources.c
16index f567914..b21b616 100644 16index f7dc039..f708876 100644
17--- a/gio/tests/resources.c 17--- a/gio/tests/resources.c
18+++ b/gio/tests/resources.c 18+++ b/gio/tests/resources.c
19@@ -1068,7 +1068,7 @@ main (int argc, 19@@ -1068,7 +1068,7 @@ main (int argc,
diff --git a/meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch b/meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch
new file mode 100644
index 0000000000..7be9cd8b84
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch
@@ -0,0 +1,88 @@
1From f1beef5c2d09fae3a5e5a314f984cb3f20abe732 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 23 Apr 2024 11:24:34 +0200
4Subject: [PATCH] girepository/introspection: correctly install .gir files into
5 custom locations provided via meson option
6
7Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4020]
8Signed-off-by: Alexander Kanavin <alex@linutronix.de>
9---
10 girepository/introspection/meson.build | 9 +++++++++
11 1 file changed, 9 insertions(+)
12
13diff --git a/girepository/introspection/meson.build b/girepository/introspection/meson.build
14index 9405686..862ca61 100644
15--- a/girepository/introspection/meson.build
16+++ b/girepository/introspection/meson.build
17@@ -49,6 +49,7 @@ glib_gir = gnome.generate_gir(libglib,
18 export_packages: 'glib-2.0',
19 header: 'glib.h',
20 install: true,
21+ install_dir_gir: glib_girdir,
22 dependencies: [
23 libgobject_dep,
24 ],
25@@ -76,6 +77,7 @@ if host_system == 'windows'
26 header: 'glib.h',
27 includes: [ glib_gir[0] ],
28 install: true,
29+ install_dir_gir: glib_girdir,
30 dependencies: [
31 libgobject_dep,
32 ],
33@@ -104,6 +106,7 @@ else
34 header: 'glib.h',
35 includes: [ glib_gir[0] ],
36 install: true,
37+ install_dir_gir: glib_girdir,
38 dependencies: [
39 libgobject_dep,
40 ],
41@@ -137,6 +140,7 @@ gobject_gir = gnome.generate_gir(libgobject,
42 header: 'glib-object.h',
43 includes: [ glib_gir[0] ],
44 install: true,
45+ install_dir_gir: glib_girdir,
46 env: gi_gen_env_variables,
47 extra_args: gir_args + [
48 '-DGOBJECT_COMPILATION',
49@@ -162,6 +166,7 @@ gmodule_gir = gnome.generate_gir(libgmodule,
50 header: 'gmodule.h',
51 includes: [ glib_gir[0] ],
52 install: true,
53+ install_dir_gir: glib_girdir,
54 dependencies: [
55 libglib_dep,
56 ],
57@@ -224,6 +229,7 @@ gio_gir = gnome.generate_gir(libgio,
58 header: 'gio/gio.h',
59 includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0] ],
60 install: true,
61+ install_dir_gir: glib_girdir,
62 dependencies: [
63 libglib_dep,
64 libgobject_dep,
65@@ -249,6 +255,7 @@ if host_system == 'windows'
66 header: 'gio/gio.h',
67 includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
68 install: true,
69+ install_dir_gir: glib_girdir,
70 dependencies: [
71 libglib_dep,
72 libgobject_dep,
73@@ -277,6 +284,7 @@ else
74 header: 'gio/gio.h',
75 includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
76 install: true,
77+ install_dir_gir: glib_girdir,
78 dependencies: [
79 libglib_dep,
80 libgobject_dep,
81@@ -314,6 +322,7 @@ girepository_gir = gnome.generate_gir(libgirepository,
82 header: 'girepository/girepository.h',
83 includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
84 install: true,
85+ install_dir_gir: glib_girdir,
86 dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep ],
87 extra_args: gir_args + libgirepository_gir_args,
88 )
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/files/0001-meson-Run-atomics-test-on-clang-as-well.patch
index 0b10269114..3a8d3596b0 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/files/0001-meson-Run-atomics-test-on-clang-as-well.patch
@@ -1,4 +1,4 @@
1From b4b523160ef550a53705fcc45ac6e10d086ce491 Mon Sep 17 00:00:00 2001 1From f04ea29f9f96892ada81bd0acfcef70183138229 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
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
15 15
16diff --git a/meson.build b/meson.build 16diff --git a/meson.build b/meson.build
17index 6ee775e..8bc5fa7 100644 17index 257afb5..5caa6e6 100644
18--- a/meson.build 18--- a/meson.build
19+++ b/meson.build 19+++ b/meson.build
20@@ -1938,7 +1938,7 @@ atomicdefine = ''' 20@@ -2024,7 +2024,7 @@ atomicdefine = '''
21 # 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
22 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')
23 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/files/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch
index 14dcb278e0..9be04960aa 100644
--- 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/files/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch
@@ -1,4 +1,4 @@
1From 294f3e6e9a0a9f4733e85ed6810d1b743055370b Mon Sep 17 00:00:00 2001 1From a63c865aa9a24f3230e8e2bcb5bce88f179c7e2b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de> 2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sat, 16 Sep 2023 22:28:27 +0200 3Date: Sat, 16 Sep 2023 22:28:27 +0200
4Subject: [PATCH] meson.build: do not enable pidfd features on native glib 4Subject: [PATCH] meson.build: do not enable pidfd features on native glib
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de>
14 1 file changed, 2 insertions(+), 1 deletion(-) 14 1 file changed, 2 insertions(+), 1 deletion(-)
15 15
16diff --git a/meson.build b/meson.build 16diff --git a/meson.build b/meson.build
17index 8bc5fa7..df1fa60 100644 17index 5caa6e6..688f214 100644
18--- a/meson.build 18--- a/meson.build
19+++ b/meson.build 19+++ b/meson.build
20@@ -981,7 +981,8 @@ if cc.links('''#include <sys/syscall.h> 20@@ -1022,7 +1022,8 @@ if cc.links('''#include <sys/syscall.h>
21 waitid (P_PIDFD, 0, &child_info, WEXITED | WNOHANG); 21 waitid (P_PIDFD, 0, &child_info, WEXITED | WNOHANG);
22 return 0; 22 return 0;
23 }''', name : 'pidfd_open(2) system call') 23 }''', name : 'pidfd_open(2) system call')
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/files/0010-Do-not-hardcode-python-path-into-various-tools.patch
index 6dff5179c7..4dec252c1f 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/files/0010-Do-not-hardcode-python-path-into-various-tools.patch
@@ -1,4 +1,4 @@
1From 50636758c73e5e61212a8f801c6c602b8aab5ba7 Mon Sep 17 00:00:00 2001 1From dc7f09c4f52638a70768c528d186da6f83dedc97 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
@@ -32,7 +32,7 @@ index aa5af43..56e8e2e 100755
32 # pylint: disable=too-many-lines, missing-docstring, invalid-name 32 # pylint: disable=too-many-lines, missing-docstring, invalid-name
33 33
34diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in 34diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
35index 353e53a..8ed6c39 100755 35index e10b910..4b619f8 100755
36--- a/gobject/glib-mkenums.in 36--- a/gobject/glib-mkenums.in
37+++ b/gobject/glib-mkenums.in 37+++ b/gobject/glib-mkenums.in
38@@ -1,4 +1,4 @@ 38@@ -1,4 +1,4 @@
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common b/meta/recipes-core/glib-2.0/files/meson.cross.d/common
index 0d7c5fa3f8..0d7c5fa3f8 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common
+++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc
index 3049e5116e..3049e5116e 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc
+++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux
index adad7e62ee..adad7e62ee 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux
+++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw
index 75f911ba1e..75f911ba1e 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw
+++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl
index 3049e5116e..3049e5116e 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl
+++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/meta/recipes-core/glib-2.0/files/relocate-modules.patch
index 3e79bbf679..a1ff198aa6 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
+++ b/meta/recipes-core/glib-2.0/files/relocate-modules.patch
@@ -1,4 +1,4 @@
1From f40e89b3852df37959606ee13b1a14ade81fa886 Mon Sep 17 00:00:00 2001 1From 0133aeabd37a9137722abd86039d7d0797b5896f 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
@@ -18,10 +18,10 @@ Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
18 1 file changed, 7 deletions(-) 18 1 file changed, 7 deletions(-)
19 19
20diff --git a/gio/giomodule.c b/gio/giomodule.c 20diff --git a/gio/giomodule.c b/gio/giomodule.c
21index 17fabe6..8021208 100644 21index 1e14955..3c09bb5 100644
22--- a/gio/giomodule.c 22--- a/gio/giomodule.c
23+++ b/gio/giomodule.c 23+++ b/gio/giomodule.c
24@@ -1271,11 +1271,6 @@ get_gio_module_dir (void) 24@@ -1259,11 +1259,6 @@ get_gio_module_dir (void)
25 g_free (install_dir); 25 g_free (install_dir);
26 #else 26 #else
27 module_dir = g_strdup (GIO_MODULE_DIR); 27 module_dir = g_strdup (GIO_MODULE_DIR);
@@ -33,7 +33,7 @@ index 17fabe6..8021208 100644
33 #include <dlfcn.h> 33 #include <dlfcn.h>
34 { 34 {
35 g_autofree gchar *path = NULL; 35 g_autofree gchar *path = NULL;
36@@ -1294,8 +1289,6 @@ get_gio_module_dir (void) 36@@ -1282,8 +1277,6 @@ get_gio_module_dir (void)
37 } 37 }
38 } 38 }
39 } 39 }
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/files/run-ptest
index 831bc3b91f..831bc3b91f 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/meta/recipes-core/glib-2.0/files/run-ptest
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch b/meta/recipes-core/glib-2.0/files/skip-timeout.patch
index cd5ac287c3..0f8b51294b 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch
+++ b/meta/recipes-core/glib-2.0/files/skip-timeout.patch
@@ -1,4 +1,4 @@
1From bb11d1a4ae77d93ec0743e54077cf0f990243fa6 Mon Sep 17 00:00:00 2001 1From ac75f5d9206e52eec64fef0db4cd91b58a764c99 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com> 2From: Ross Burton <ross.burton@arm.com>
3Date: Thu, 28 Mar 2024 16:27:09 +0000 3Date: Thu, 28 Mar 2024 16:27:09 +0000
4Subject: [PATCH] Skip /timeout/rounding test 4Subject: [PATCH] Skip /timeout/rounding test
@@ -16,7 +16,7 @@ Signed-off-by: Ross Burton <ross.burton@arm.com>
16 1 file changed, 1 deletion(-) 16 1 file changed, 1 deletion(-)
17 17
18diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c 18diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c
19index 1ae3f3a34..85a715b0f 100644 19index 1ae3f3a..85a715b 100644
20--- a/glib/tests/timeout.c 20--- a/glib/tests/timeout.c
21+++ b/glib/tests/timeout.c 21+++ b/glib/tests/timeout.c
22@@ -214,7 +214,6 @@ main (int argc, char *argv[]) 22@@ -214,7 +214,6 @@ main (int argc, char *argv[])
@@ -27,6 +27,3 @@ index 1ae3f3a34..85a715b0f 100644
27 27
28 return g_test_run (); 28 return g_test_run ();
29 } 29 }
30--
312.34.1
32
diff --git a/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.2.bb b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.2.bb
new file mode 100644
index 0000000000..7da2838265
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.2.bb
@@ -0,0 +1,5 @@
1require glib.inc
2PACKAGES = ""
3PACKAGECONFIG = ""
4
5
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
deleted file mode 100644
index b11c283e6d..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch
+++ /dev/null
@@ -1,34 +0,0 @@
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/fix-regex.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
deleted file mode 100644
index bdfbd55899..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
+++ /dev/null
@@ -1,54 +0,0 @@
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
deleted file mode 100644
index 4f38509da6..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch
+++ /dev/null
@@ -1,361 +0,0 @@
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_2.78.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb
deleted file mode 100644
index b1669ead75..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb
+++ /dev/null
@@ -1,57 +0,0 @@
1require glib.inc
2
3PE = "1"
4
5SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
6
7SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
8 file://run-ptest \
9 file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
10 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
11 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
12 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
13 file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
14 file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
15 file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
16 file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
17 file://0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch \
18 file://memory-monitor.patch \
19 file://fix-regex.patch \
20 file://skip-timeout.patch \
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 "
25
26SRC_URI[sha256sum] = "24b8e0672dca120cc32d394bccb85844e732e04fe75d18bb0573b2dbc7548f63"
27
28# Find any meson cross files in FILESPATH that are relevant for the current
29# build (using siteinfo) and add them to EXTRA_OEMESON.
30inherit siteinfo
31def find_meson_cross_files(d):
32 if bb.data.inherits_class('native', d):
33 return ""
34
35 thisdir = os.path.normpath(d.getVar("THISDIR"))
36 import collections
37 sitedata = siteinfo_data(d)
38 # filename -> found
39 files = collections.OrderedDict()
40 for path in d.getVar("FILESPATH").split(":"):
41 for element in sitedata:
42 filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
43 sanitized_path = filename.replace(thisdir, "${THISDIR}")
44 if sanitized_path == filename:
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))
47 continue
48 files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename)
49
50 items = ["--cross-file=" + k for k,v in files.items() if v]
51 d.appendVar("EXTRA_OEMESON", " " + " ".join(items))
52 items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()]
53 d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items))
54
55python () {
56 find_meson_cross_files(d)
57}
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.80.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.80.2.bb
new file mode 100644
index 0000000000..ef80cc47cf
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.80.2.bb
@@ -0,0 +1,2 @@
1require glib.inc
2
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index fac8875d84..fbd2b18684 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -28,21 +28,26 @@ PACKAGES += "${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 gobject-introspection-data 31inherit meson gettext gi-docgen pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data
32
33GTKDOC_MESON_OPTION = "gtk_doc"
34 32
35S = "${WORKDIR}/glib-${PV}" 33S = "${WORKDIR}/glib-${PV}"
36 34
35GIDOCGEN_MESON_OPTION = "documentation"
36
37PACKAGECONFIG ??= "libmount \ 37PACKAGECONFIG ??= "libmount \
38 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'introspection', '', d)} \
38 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" 39 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
40PACKAGECONFIG:class-native = ""
41
39PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" 42PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux"
40PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" 43PACKAGECONFIG[manpages] = "-Dman-pages=enabled, -Dman-pages=disabled, python3-docutils-native"
41PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils" 44PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils"
42PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," 45PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,"
43PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" 46PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux"
47PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,gobject-introspection-native gobject-introspection glib-2.0-initial"
44 48
45EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" 49EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false"
50EXTRA_OEMESON:append:class-target = " ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''}"
46 51
47do_configure:prepend() { 52do_configure:prepend() {
48 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 53 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -53,14 +58,16 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS} \
53 ${libexecdir}/*gio-querymodules \ 58 ${libexecdir}/*gio-querymodules \
54 ${libexecdir}/*gio-launch-desktop \ 59 ${libexecdir}/*gio-launch-desktop \
55 ${datadir}/glib-2.0/dtds \ 60 ${datadir}/glib-2.0/dtds \
56 ${datadir}/glib-2.0/schemas" 61 ${datadir}/glib-2.0/schemas \
57 62 ${libdir}/girepository-*/*.typelib \
63"
58FILES:${PN}-dev += "${libdir}/glib-2.0/include \ 64FILES:${PN}-dev += "${libdir}/glib-2.0/include \
59 ${libdir}/gio/modules/lib*${SOLIBSDEV} \ 65 ${libdir}/gio/modules/lib*${SOLIBSDEV} \
60 ${libdir}/gio/modules/*.la \ 66 ${libdir}/gio/modules/*.la \
61 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ 67 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \
62 ${datadir}/glib-2.0/schemas/gschema.dtd \ 68 ${datadir}/glib-2.0/schemas/gschema.dtd \
63 ${datadir}/glib-2.0/valgrind/glib.supp \ 69 ${datadir}/glib-2.0/valgrind/glib.supp \
70 ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir \
64 ${datadir}/gettext/its" 71 ${datadir}/gettext/its"
65FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" 72FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
66FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ 73FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
@@ -204,3 +211,57 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\
204 locale-base-pl-pl.iso-8859-2 \ 211 locale-base-pl-pl.iso-8859-2 \
205 locale-base-tr-tr \ 212 locale-base-tr-tr \
206 " 213 "
214
215PE = "1"
216
217SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
218
219SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
220 file://run-ptest \
221 file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
222 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
223 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
224 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
225 file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
226 file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
227 file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
228 file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
229 file://skip-timeout.patch \
230 file://0001-girepository-introspection-correctly-install-.gir-fi.patch \
231 "
232SRC_URI:append:class-native = " file://relocate-modules.patch \
233 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
234 "
235
236SRC_URI[sha256sum] = "b9cfb6f7a5bd5b31238fd5d56df226b2dda5ea37611475bf89f6a0f9400fe8bd"
237
238# Find any meson cross files in FILESPATH that are relevant for the current
239# build (using siteinfo) and add them to EXTRA_OEMESON.
240inherit siteinfo
241def find_meson_cross_files(d):
242 if bb.data.inherits_class('native', d):
243 return ""
244
245 thisdir = os.path.normpath(d.getVar("THISDIR"))
246 import collections
247 sitedata = siteinfo_data(d)
248 # filename -> found
249 files = collections.OrderedDict()
250 for path in d.getVar("FILESPATH").split(":"):
251 for element in sitedata:
252 filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
253 sanitized_path = filename.replace(thisdir, "${THISDIR}")
254 if sanitized_path == filename:
255 if os.path.exists(filename):
256 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))
257 continue
258 files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename)
259
260 items = ["--cross-file=" + k for k,v in files.items() if v]
261 d.appendVar("EXTRA_OEMESON", " " + " ".join(items))
262 items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()]
263 d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items))
264
265python () {
266 find_meson_cross_files(d)
267}