summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2024-04-23 13:41:15 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-04-26 22:11:41 +0100
commit5443f82c78d444af14908afdea65b29bea8f3c32 (patch)
tree3aef17e11555f74decb03d635b79a8d4cdfd441c
parent855a165e7a644ed8b8572ce32498f8ce7243bce9 (diff)
downloadpoky-5443f82c78d444af14908afdea65b29bea8f3c32.tar.gz
glib/gobject-introspection: update 2.78.4 -> 2.80.0, 1.78.1 -> 1.80.0
With these versions, which need to be updated in lockstep, upstream has relocated glib introspection data from g-i tree to glib tree and made its generation a part of the overall glib build. This creates a circular dependency, where g-i tools are linked with glib, but glib needs the tools to build its g-i data. (I don't know why the two source trees couldn't be simply merged into one, or g-i data for glib couldn't be generated inside g-i build against sysroot glib). Upstream is suggesting building glib twice, first without building g-i data, then building g-i and linking it with that version, then building the final glib, and that's what is being done here (via the new glib-initial recipe, which is sysroot-only, and is not pulled in via indirect dependencies either). Other glib changes: 0001-Do-not-write-bindir-into-pkg-config-files.patch restores writing bindir variable into glib.pc file (meson only writes it out if other variables depend on it, and this custom patch removes that dependency). 0001-girepository-introspection-correctly-install-.gir-fi.patch ensures correct installation of .gir into something else than $datadir (useful in multilib). Merge previous glib .bb into .inc, so that glib and glib-initial recipes could be cleanly separated with no duplication. Convert from gtk-doc to gi-docgen, and manpages from xmlto to docutils. (From OE-Core rev: 6fa675a113d279b8bc0355229e61a0cef6d41e18) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/maintainers.inc1
-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.0.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.0.bb1
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc74
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch11
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb (renamed from meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb)8
28 files changed, 221 insertions, 569 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index a11859890e..014cf32e40 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -205,6 +205,7 @@ RECIPE_MAINTAINER:pn-gi-docgen = "Alexander Kanavin <alex.kanavin@gmail.com>"
205RECIPE_MAINTAINER:pn-git = "Robert Yang <liezhi.yang@windriver.com>" 205RECIPE_MAINTAINER:pn-git = "Robert Yang <liezhi.yang@windriver.com>"
206RECIPE_MAINTAINER:pn-glew = "Anuj Mittal <anuj.mittal@intel.com>" 206RECIPE_MAINTAINER:pn-glew = "Anuj Mittal <anuj.mittal@intel.com>"
207RECIPE_MAINTAINER:pn-glib-2.0 = "Anuj Mittal <anuj.mittal@intel.com>" 207RECIPE_MAINTAINER:pn-glib-2.0 = "Anuj Mittal <anuj.mittal@intel.com>"
208RECIPE_MAINTAINER:pn-glib-2.0-initial = "Anuj Mittal <anuj.mittal@intel.com>"
208RECIPE_MAINTAINER:pn-glib-networking = "Anuj Mittal <anuj.mittal@intel.com>" 209RECIPE_MAINTAINER:pn-glib-networking = "Anuj Mittal <anuj.mittal@intel.com>"
209RECIPE_MAINTAINER:pn-glibc = "Khem Raj <raj.khem@gmail.com>" 210RECIPE_MAINTAINER:pn-glibc = "Khem Raj <raj.khem@gmail.com>"
210RECIPE_MAINTAINER:pn-glibc-locale = "Khem Raj <raj.khem@gmail.com>" 211RECIPE_MAINTAINER:pn-glibc-locale = "Khem Raj <raj.khem@gmail.com>"
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..f6eba04fd4 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 0561dcbf0918631d8106c3f6c2d8e92a5ec4b887 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..129bc7f8ae 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 ccb25e8c0bab54eac8ba0e9d7083ce81461ab72a 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..3e12f8abbe 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 caab40411d8520dae77a4b7933ebaffbb00559fe 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..9b0b83afa4 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 65c036b1ede453e89893076f4ece21c946505096 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..a2f9dd9672 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 01810df82fae752428d3756c85edb2eb7bbf3c15 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 232ecca..563298b 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@@ -593,7 +593,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@@ -663,7 +663,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 f6efc59..83eb5a5 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@@ -226,7 +226,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 7534542..2560686 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..bb84f3969e 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 e8b4f53b567339aad90b585673d55a5c6176535a 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..76e5f58748
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch
@@ -0,0 +1,88 @@
1From 4e6be5d15e5d2f8e494d22a3d49b623064f9c1a5 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..2f80529987 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 3dc2e741e18ccb740e98eb4e808ff83153b70e83 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 2560686..5c46d0b 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..82955de671 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 59525eedfbbfe4a16fdd0b340bc3f2479431c7d5 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 5c46d0b..222c1a1 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..a51c186b00 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 e6784ba43af83e22556921786c8f15e4cd246298 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..d6e9019f39 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 47ea2576a13d5bc86692b4ba8cb4a8f2fd38c6ca 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..b1c62cc39c 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 682d8a616ca111c0e45c8a9cb02e992e63c69586 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.0.bb b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.0.bb
new file mode 100644
index 0000000000..7da2838265
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.0.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.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.80.0.bb
new file mode 100644
index 0000000000..e22810a55b
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.80.0.bb
@@ -0,0 +1 @@
require glib.inc
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index fac8875d84..692857892f 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -28,21 +28,25 @@ 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
37PACKAGECONFIG ??= "libmount \ 35PACKAGECONFIG ??= "libmount \
36 ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'introspection', '', d)} \
38 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" 37 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
38PACKAGECONFIG:class-native = ""
39
39PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" 40PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux"
40PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" 41PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, python3-docutils-native"
41PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils" 42PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils"
42PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," 43PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,"
43PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" 44PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux"
45PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,gobject-introspection-native gobject-introspection glib-2.0-initial"
44 46
45EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" 47EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false \
48 ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \
49"
46 50
47do_configure:prepend() { 51do_configure:prepend() {
48 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 52 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -53,14 +57,16 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS} \
53 ${libexecdir}/*gio-querymodules \ 57 ${libexecdir}/*gio-querymodules \
54 ${libexecdir}/*gio-launch-desktop \ 58 ${libexecdir}/*gio-launch-desktop \
55 ${datadir}/glib-2.0/dtds \ 59 ${datadir}/glib-2.0/dtds \
56 ${datadir}/glib-2.0/schemas" 60 ${datadir}/glib-2.0/schemas \
57 61 ${libdir}/girepository-*/*.typelib \
62"
58FILES:${PN}-dev += "${libdir}/glib-2.0/include \ 63FILES:${PN}-dev += "${libdir}/glib-2.0/include \
59 ${libdir}/gio/modules/lib*${SOLIBSDEV} \ 64 ${libdir}/gio/modules/lib*${SOLIBSDEV} \
60 ${libdir}/gio/modules/*.la \ 65 ${libdir}/gio/modules/*.la \
61 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ 66 ${datadir}/glib-2.0/gettext/po/Makefile.in.in \
62 ${datadir}/glib-2.0/schemas/gschema.dtd \ 67 ${datadir}/glib-2.0/schemas/gschema.dtd \
63 ${datadir}/glib-2.0/valgrind/glib.supp \ 68 ${datadir}/glib-2.0/valgrind/glib.supp \
69 ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir \
64 ${datadir}/gettext/its" 70 ${datadir}/gettext/its"
65FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" 71FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
66FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ 72FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
@@ -204,3 +210,57 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\
204 locale-base-pl-pl.iso-8859-2 \ 210 locale-base-pl-pl.iso-8859-2 \
205 locale-base-tr-tr \ 211 locale-base-tr-tr \
206 " 212 "
213
214PE = "1"
215
216SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
217
218SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
219 file://run-ptest \
220 file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \
221 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
222 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
223 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
224 file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \
225 file://0001-Do-not-write-bindir-into-pkg-config-files.patch \
226 file://0001-meson-Run-atomics-test-on-clang-as-well.patch \
227 file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
228 file://skip-timeout.patch \
229 file://0001-girepository-introspection-correctly-install-.gir-fi.patch \
230 "
231SRC_URI:append:class-native = " file://relocate-modules.patch \
232 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
233 "
234
235SRC_URI[sha256sum] = "8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d"
236
237# Find any meson cross files in FILESPATH that are relevant for the current
238# build (using siteinfo) and add them to EXTRA_OEMESON.
239inherit siteinfo
240def find_meson_cross_files(d):
241 if bb.data.inherits_class('native', d):
242 return ""
243
244 thisdir = os.path.normpath(d.getVar("THISDIR"))
245 import collections
246 sitedata = siteinfo_data(d)
247 # filename -> found
248 files = collections.OrderedDict()
249 for path in d.getVar("FILESPATH").split(":"):
250 for element in sitedata:
251 filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
252 sanitized_path = filename.replace(thisdir, "${THISDIR}")
253 if sanitized_path == filename:
254 if os.path.exists(filename):
255 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))
256 continue
257 files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename)
258
259 items = ["--cross-file=" + k for k,v in files.items() if v]
260 d.appendVar("EXTRA_OEMESON", " " + " ".join(items))
261 items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()]
262 d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items))
263
264python () {
265 find_meson_cross_files(d)
266}
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch
index c9e1afffd0..510bc426d1 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch
@@ -1,4 +1,4 @@
1From aeb5532f8be42d42f4e8725ca42e239b36983a4d Mon Sep 17 00:00:00 2001 1From 4e1aa0ddbc43403ff24f644b4c4912b737290c41 Mon Sep 17 00:00:00 2001
2From: Sascha Silbe <x-yo17@se-silbe.de> 2From: Sascha Silbe <x-yo17@se-silbe.de>
3Date: Fri, 8 Jun 2018 13:55:10 +0200 3Date: Fri, 8 Jun 2018 13:55:10 +0200
4Subject: [PATCH] Relocate the repository directory for native builds 4Subject: [PATCH] Relocate the repository directory for native builds
@@ -14,14 +14,13 @@ cache or sstate mirror).
14 14
15Upstream-Status: Inappropriate 15Upstream-Status: Inappropriate
16Signed-off-by: Sascha Silbe <x-yo17@se-silbe.de> 16Signed-off-by: Sascha Silbe <x-yo17@se-silbe.de>
17
18--- 17---
19 girepository/girepository.c | 15 +++++++++++++-- 18 girepository/girepository.c | 15 +++++++++++++--
20 girepository/meson.build | 2 +- 19 girepository/meson.build | 2 +-
21 2 files changed, 14 insertions(+), 3 deletions(-) 20 2 files changed, 14 insertions(+), 3 deletions(-)
22 21
23diff --git a/girepository/girepository.c b/girepository/girepository.c 22diff --git a/girepository/girepository.c b/girepository/girepository.c
24index a0754f4..2d456f9 100644 23index 12eaf36..876382c 100644
25--- a/girepository/girepository.c 24--- a/girepository/girepository.c
26+++ b/girepository/girepository.c 25+++ b/girepository/girepository.c
27@@ -21,6 +21,8 @@ 26@@ -21,6 +21,8 @@
@@ -42,7 +41,7 @@ index a0754f4..2d456f9 100644
42 /** 41 /**
43 * SECTION:girepository 42 * SECTION:girepository
44 * @short_description: GObject Introspection repository manager 43 * @short_description: GObject Introspection repository manager
45@@ -215,9 +219,16 @@ init_globals (void) 44@@ -222,9 +226,16 @@ init_globals (void)
46 g_free (custom_dirs); 45 g_free (custom_dirs);
47 } 46 }
48 47
@@ -62,10 +61,10 @@ index a0754f4..2d456f9 100644
62 typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir); 61 typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir);
63 62
64diff --git a/girepository/meson.build b/girepository/meson.build 63diff --git a/girepository/meson.build b/girepository/meson.build
65index 786749a..15cf2a9 100644 64index 5ced59e..a580d9b 100644
66--- a/girepository/meson.build 65--- a/girepository/meson.build
67+++ b/girepository/meson.build 66+++ b/girepository/meson.build
68@@ -45,7 +45,7 @@ girepo_internals_lib = static_library('girepository-internals', 67@@ -47,7 +47,7 @@ girepo_internals_lib = static_library('girepository-internals',
69 ], 68 ],
70 c_args: gi_hidden_visibility_cflags + custom_c_args, 69 c_args: gi_hidden_visibility_cflags + custom_c_args,
71 include_directories : configinc, 70 include_directories : configinc,
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb
index 05a08a50e0..582ac248fd 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
16SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \ 16SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \
17 " 17 "
18 18
19SRC_URI[sha256sum] = "bd7babd99af7258e76819e45ba4a6bc399608fe762d83fde3cac033c50841bb4" 19SRC_URI[sha256sum] = "a1df7c424e15bda1ab639c00e9051b9adf5cea1a9e512f8a603b53cd199bc6d8"
20 20
21SRC_URI:append:class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch" 21SRC_URI:append:class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch"
22 22
@@ -26,7 +26,9 @@ GTKDOC_MESON_OPTION = "gtk_doc"
26 26
27MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" 27MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner"
28 28
29DEPENDS += " libffi zlib glib-2.0 python3 flex-native bison-native" 29DEPENDS += " libffi zlib python3 flex-native bison-native"
30DEPENDS:append:class-native = " glib-2.0"
31DEPENDS:append:class-target = " glib-2.0-initial"
30 32
31# target build needs qemu to run temporary introspection binaries created 33# target build needs qemu to run temporary introspection binaries created
32# on the fly by g-ir-scanner and a native version of itself to run 34# on the fly by g-ir-scanner and a native version of itself to run
@@ -189,6 +191,6 @@ FILES:${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
189FILES:${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" 191FILES:${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
190 192
191# setuptools can be removed when upstream removes all uses of distutils 193# setuptools can be removed when upstream removes all uses of distutils
192RDEPENDS:${PN} = "python3-pickle python3-xml python3-setuptools" 194RDEPENDS:${PN} = "python3-pickle python3-xml python3-setuptools glib-2.0"
193 195
194BBCLASSEXTEND = "native" 196BBCLASSEXTEND = "native"