From 393ff343014ef819f7b74bc189e6d59b32e3f8be Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 2 May 2024 12:32:52 +0200 Subject: 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: 57c307536f67dcfb5d4a5488ca1e77a943ba1368) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/conf/distro/include/maintainers.inc | 1 + ...Do-not-write-bindir-into-pkg-config-files.patch | 65 ++++ .../0001-Fix-DATADIRNAME-on-uclibc-Linux.patch | 29 ++ ...stall-gio-querymodules-as-libexec_PROGRAM.patch | 26 ++ ...warning-about-deprecated-paths-in-schemas.patch | 39 +++ ...chine-correctly-when-building-with-mingw3.patch | 80 +++++ ...esources.c-comment-out-a-build-host-only-.patch | 27 ++ ...y-introspection-correctly-install-.gir-fi.patch | 88 +++++ ...1-meson-Run-atomics-test-on-clang-as-well.patch | 28 ++ ...-do-not-enable-pidfd-features-on-native-g.patch | 29 ++ ...t-hardcode-python-path-into-various-tools.patch | 43 +++ .../glib-2.0/files/meson.cross.d/common | 3 + .../glib-2.0/files/meson.cross.d/common-glibc | 6 + .../glib-2.0/files/meson.cross.d/common-linux | 5 + .../glib-2.0/files/meson.cross.d/common-mingw | 6 + .../glib-2.0/files/meson.cross.d/common-musl | 6 + .../glib-2.0/files/relocate-modules.patch | 44 +++ meta/recipes-core/glib-2.0/files/run-ptest | 10 + .../recipes-core/glib-2.0/files/skip-timeout.patch | 29 ++ .../glib-2.0/glib-2.0-initial_2.80.0.bb | 5 + ...Do-not-write-bindir-into-pkg-config-files.patch | 60 ---- .../0001-Fix-DATADIRNAME-on-uclibc-Linux.patch | 29 -- ...stall-gio-querymodules-as-libexec_PROGRAM.patch | 26 -- ...warning-about-deprecated-paths-in-schemas.patch | 39 --- ...chine-correctly-when-building-with-mingw3.patch | 80 ----- ...-the-deprecated-distutils-module-to-the-p.patch | 34 -- ...esources.c-comment-out-a-build-host-only-.patch | 27 -- ...1-meson-Run-atomics-test-on-clang-as-well.patch | 28 -- ...-do-not-enable-pidfd-features-on-native-g.patch | 29 -- ...t-hardcode-python-path-into-various-tools.patch | 43 --- .../recipes-core/glib-2.0/glib-2.0/fix-regex.patch | 54 --- .../glib-2.0/glib-2.0/memory-monitor.patch | 361 --------------------- .../glib-2.0/glib-2.0/meson.cross.d/common | 3 - .../glib-2.0/glib-2.0/meson.cross.d/common-glibc | 6 - .../glib-2.0/glib-2.0/meson.cross.d/common-linux | 5 - .../glib-2.0/glib-2.0/meson.cross.d/common-mingw | 6 - .../glib-2.0/glib-2.0/meson.cross.d/common-musl | 6 - .../glib-2.0/glib-2.0/relocate-modules.patch | 44 --- meta/recipes-core/glib-2.0/glib-2.0/run-ptest | 10 - .../glib-2.0/glib-2.0/skip-timeout.patch | 32 -- meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb | 57 ---- meta/recipes-core/glib-2.0/glib-2.0_2.80.0.bb | 1 + meta/recipes-core/glib-2.0/glib.inc | 71 +++- ...he-repository-directory-for-native-builds.patch | 11 +- .../gobject-introspection_1.78.1.bb | 194 ----------- .../gobject-introspection_1.80.1.bb | 196 +++++++++++ 46 files changed, 836 insertions(+), 1185 deletions(-) create mode 100644 meta/recipes-core/glib-2.0/files/0001-Do-not-write-bindir-into-pkg-config-files.patch create mode 100644 meta/recipes-core/glib-2.0/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch create mode 100644 meta/recipes-core/glib-2.0/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch create mode 100644 meta/recipes-core/glib-2.0/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch create mode 100644 meta/recipes-core/glib-2.0/files/0001-Set-host_machine-correctly-when-building-with-mingw3.patch create mode 100644 meta/recipes-core/glib-2.0/files/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch create mode 100644 meta/recipes-core/glib-2.0/files/0001-girepository-introspection-correctly-install-.gir-fi.patch create mode 100644 meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch create mode 100644 meta/recipes-core/glib-2.0/files/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch create mode 100644 meta/recipes-core/glib-2.0/files/0010-Do-not-hardcode-python-path-into-various-tools.patch create mode 100644 meta/recipes-core/glib-2.0/files/meson.cross.d/common create mode 100644 meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc create mode 100644 meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux create mode 100644 meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw create mode 100644 meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl create mode 100644 meta/recipes-core/glib-2.0/files/relocate-modules.patch create mode 100644 meta/recipes-core/glib-2.0/files/run-ptest create mode 100644 meta/recipes-core/glib-2.0/files/skip-timeout.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0-initial_2.80.0.bb delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/memory-monitor.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/run-ptest delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb create mode 100644 meta/recipes-core/glib-2.0/glib-2.0_2.80.0.bb delete mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb create mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb 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 " RECIPE_MAINTAINER:pn-git = "Robert Yang " RECIPE_MAINTAINER:pn-glew = "Anuj Mittal " RECIPE_MAINTAINER:pn-glib-2.0 = "Anuj Mittal " +RECIPE_MAINTAINER:pn-glib-2.0-initial = "Anuj Mittal " RECIPE_MAINTAINER:pn-glib-networking = "Anuj Mittal " RECIPE_MAINTAINER:pn-glibc = "Khem Raj " RECIPE_MAINTAINER:pn-glibc-locale = "Khem Raj " diff --git a/meta/recipes-core/glib-2.0/files/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 new file mode 100644 index 0000000000..f6eba04fd4 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-Do-not-write-bindir-into-pkg-config-files.patch @@ -0,0 +1,65 @@ +From 0561dcbf0918631d8106c3f6c2d8e92a5ec4b887 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 15 Feb 2019 11:17:27 +0100 +Subject: [PATCH] Do not prefix executables with $bindir in pkg-config files + +This would otherwise break when using the executables to build other target +components (we need to rely on PATH containing the paths to utilities, +rather than use target paths). + +Upstream-Status: Inappropriate [upstream wants the paths in .pc files] +Signed-off-by: Alexander Kanavin +--- + gio/meson.build | 17 +++++++++-------- + glib/meson.build | 7 ++++--- + 2 files changed, 13 insertions(+), 11 deletions(-) + +diff --git a/gio/meson.build b/gio/meson.build +index 77cba7b..25d709e 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -883,17 +883,18 @@ libgio_dep = declare_dependency(link_with : libgio, + pkg.generate(libgio, + requires : ['glib-2.0', 'gobject-2.0'], + variables : [ ++ 'bindir=' + '${prefix}' / get_option('bindir'), + 'schemasdir=' + '${datadir}' / schemas_subdir, + 'dtdsdir=' + '${datadir}' / dtds_subdir, + 'giomoduledir=' + pkgconfig_giomodulesdir, +- 'gio=' + '${bindir}' / 'gio', +- 'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules', +- 'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas', +- 'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources', +- 'gdbus=' + '${bindir}' /'gdbus', +- 'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen', +- 'gresource=' + '${bindir}' / 'gresource', +- 'gsettings=' + '${bindir}' / 'gsettings', ++ 'gio=gio', ++ 'gio_querymodules=gio-querymodules', ++ 'glib_compile_schemas=glib-compile-schemas', ++ 'glib_compile_resources=glib-compile-resources', ++ 'gdbus=gdbus', ++ 'gdbus_codegen=gdbus-codegen', ++ 'gresource=gresource', ++ 'gsettings=gsettings', + ], + version : glib_version, + install_dir : glib_pkgconfigreldir, +diff --git a/glib/meson.build b/glib/meson.build +index d2efeba..5f5841d 100644 +--- a/glib/meson.build ++++ b/glib/meson.build +@@ -447,9 +447,10 @@ pkg.generate(libglib, + subdirs : ['glib-2.0'], + extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, + variables : [ +- 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal', +- 'gobject_query=' + '${bindir}' / 'gobject-query', +- 'glib_mkenums=' + '${bindir}' / 'glib-mkenums', ++ 'bindir=' + '${prefix}' / get_option('bindir'), ++ 'glib_genmarshal=glib-genmarshal', ++ 'gobject_query=gobject-query', ++ 'glib_mkenums=glib-mkenums', + 'glib_valgrind_suppressions=' + '${datadir}' / + valgrind_suppression_file_install_subdir / + fs.name(valgrind_suppression_file), diff --git a/meta/recipes-core/glib-2.0/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch b/meta/recipes-core/glib-2.0/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch new file mode 100644 index 0000000000..129bc7f8ae --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch @@ -0,0 +1,29 @@ +From ccb25e8c0bab54eac8ba0e9d7083ce81461ab72a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 15 Mar 2014 22:42:29 -0700 +Subject: [PATCH] Fix DATADIRNAME on uclibc/Linux + +translation files are always installed under PREFIX/share/locale in uclibc +based systems therefore lets set DATADIRNAME to "share". + +Signed-off-by: Khem Raj +Upstream-Status: Pending +--- + m4macros/glib-gettext.m4 | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4 +index df6fbf0..47db864 100644 +--- a/m4macros/glib-gettext.m4 ++++ b/m4macros/glib-gettext.m4 +@@ -293,6 +293,10 @@ msgstr "" + CATOBJEXT=.mo + DATADIRNAME=share + ;; ++ *-*-musl* | *-*-linux-uclibc*) ++ CATOBJEXT=.gmo ++ DATADIRNAME=share ++ ;; + *) + CATOBJEXT=.mo + DATADIRNAME=lib diff --git a/meta/recipes-core/glib-2.0/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch b/meta/recipes-core/glib-2.0/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch new file mode 100644 index 0000000000..3e12f8abbe --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch @@ -0,0 +1,26 @@ +From caab40411d8520dae77a4b7933ebaffbb00559fe Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Tue, 22 Mar 2016 15:14:58 +0200 +Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM + +We want to install this binary with the gio library, and debian +renamer does not cope with library packages with files in ${bindir} + +Signed-off-by: Jussi Kukkonen +Upstream-Status: Inappropriate [OE specific] +--- + gio/meson.build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gio/meson.build b/gio/meson.build +index 59c2b0f..77cba7b 100644 +--- a/gio/meson.build ++++ b/gio/meson.build +@@ -1007,6 +1007,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu + c_args : gio_c_args, + # intl.lib is not compatible with SAFESEH + link_args : noseh_link_args, ++ install_dir: glib_libexecdir, + dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) + + glib_compile_schemas = executable('glib-compile-schemas', diff --git a/meta/recipes-core/glib-2.0/files/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 new file mode 100644 index 0000000000..9b0b83afa4 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch @@ -0,0 +1,39 @@ +From 65c036b1ede453e89893076f4ece21c946505096 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 12 Jun 2015 17:08:46 +0300 +Subject: [PATCH] Remove the warning about deprecated paths in schemas + +Some schemas in gsettings-desktop-schemas (such as proxy and locale) +are still using deprecated paths, as of 3.16.1. This causes warning +messages, and meta/lib/oe/rootfs.py complaints about them. + +Upstream-Status: Inappropriate +Signed-off-by: Alexander Kanavin +--- + gio/glib-compile-schemas.c | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c +index 04ef404..e791ce2 100644 +--- a/gio/glib-compile-schemas.c ++++ b/gio/glib-compile-schemas.c +@@ -1232,19 +1232,6 @@ parse_state_start_schema (ParseState *state, + return; + } + +- if (path && (g_str_has_prefix (path, "/apps/") || +- g_str_has_prefix (path, "/desktop/") || +- g_str_has_prefix (path, "/system/"))) +- { +- gchar *message = NULL; +- message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”. " +- "Paths starting with " +- "“/apps/”, “/desktop/” or “/system/” are deprecated."), +- id, path); +- g_printerr ("%s\n", message); +- g_free (message); +- } +- + state->schema_state = schema_state_new (path, gettext_domain, + extends, extends_name, list_of); + diff --git a/meta/recipes-core/glib-2.0/files/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 new file mode 100644 index 0000000000..a2f9dd9672 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-Set-host_machine-correctly-when-building-with-mingw3.patch @@ -0,0 +1,80 @@ +From 01810df82fae752428d3756c85edb2eb7bbf3c15 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 13 Feb 2019 15:32:05 +0100 +Subject: [PATCH] Set host_machine correctly when building with mingw32 + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + gio/tests/meson.build | 8 ++++---- + glib/tests/meson.build | 2 +- + meson.build | 3 +++ + 3 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/gio/tests/meson.build b/gio/tests/meson.build +index 232ecca..563298b 100644 +--- a/gio/tests/meson.build ++++ b/gio/tests/meson.build +@@ -29,7 +29,7 @@ endif + + test_cpp_args = test_c_args + +-if host_machine.system() == 'windows' ++if host_system == 'windows' + common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] + endif + +@@ -244,7 +244,7 @@ if have_dbus_daemon + endif + + # Test programs buildable on UNIX only +-if host_machine.system() != 'windows' ++if host_system != 'windows' + gio_tests += { + 'file' : { + # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148 +@@ -593,7 +593,7 @@ if host_machine.system() != 'windows' + endif # unix + + # Test programs buildable on Windows only +-if host_machine.system() == 'windows' ++if host_system == 'windows' + gio_tests += {'win32-streams' : {}} + endif + +@@ -663,7 +663,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' + } + endif + +-if host_machine.system() != 'windows' ++if host_system != 'windows' + test_extra_programs += { + 'gdbus-example-unix-fd-client' : { + 'install' : false, +diff --git a/glib/tests/meson.build b/glib/tests/meson.build +index f6efc59..83eb5a5 100644 +--- a/glib/tests/meson.build ++++ b/glib/tests/meson.build +@@ -226,7 +226,7 @@ if glib_conf.has('HAVE_EVENTFD') + } + endif + +-if host_machine.system() == 'windows' ++if host_system == 'windows' + if winsock2.found() + glib_tests += { + 'gpoll' : { +diff --git a/meson.build b/meson.build +index 7534542..2560686 100644 +--- a/meson.build ++++ b/meson.build +@@ -54,6 +54,9 @@ else + endif + + host_system = host_machine.system() ++if host_system == 'mingw32' ++ host_system = 'windows' ++endif + + if host_system == 'darwin' + ios_test_code = '''#include diff --git a/meta/recipes-core/glib-2.0/files/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 new file mode 100644 index 0000000000..bb84f3969e --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch @@ -0,0 +1,27 @@ +From e8b4f53b567339aad90b585673d55a5c6176535a Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 8 Jan 2020 18:22:46 +0100 +Subject: [PATCH] gio/tests/resources.c: comment out a build host-only test + +This test requires building resources in a way that is +not cross-compatible (hardcodes ld and objcopy). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + gio/tests/resources.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gio/tests/resources.c b/gio/tests/resources.c +index f7dc039..f708876 100644 +--- a/gio/tests/resources.c ++++ b/gio/tests/resources.c +@@ -1068,7 +1068,7 @@ main (int argc, + g_test_add_func ("/resource/automatic", test_resource_automatic); + /* This only uses automatic resources too, so it tests the constructors and destructors */ + g_test_add_func ("/resource/module", test_resource_module); +- g_test_add_func ("/resource/binary-linked", test_resource_binary_linked); ++ /* g_test_add_func ("/resource/binary-linked", test_resource_binary_linked); */ + #endif + g_test_add_func ("/resource/uri/query-info", test_uri_query_info); + g_test_add_func ("/resource/uri/file", test_uri_file); 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 @@ +From 4e6be5d15e5d2f8e494d22a3d49b623064f9c1a5 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 23 Apr 2024 11:24:34 +0200 +Subject: [PATCH] girepository/introspection: correctly install .gir files into + custom locations provided via meson option + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4020] +Signed-off-by: Alexander Kanavin +--- + girepository/introspection/meson.build | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/girepository/introspection/meson.build b/girepository/introspection/meson.build +index 9405686..862ca61 100644 +--- a/girepository/introspection/meson.build ++++ b/girepository/introspection/meson.build +@@ -49,6 +49,7 @@ glib_gir = gnome.generate_gir(libglib, + export_packages: 'glib-2.0', + header: 'glib.h', + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libgobject_dep, + ], +@@ -76,6 +77,7 @@ if host_system == 'windows' + header: 'glib.h', + includes: [ glib_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libgobject_dep, + ], +@@ -104,6 +106,7 @@ else + header: 'glib.h', + includes: [ glib_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libgobject_dep, + ], +@@ -137,6 +140,7 @@ gobject_gir = gnome.generate_gir(libgobject, + header: 'glib-object.h', + includes: [ glib_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + env: gi_gen_env_variables, + extra_args: gir_args + [ + '-DGOBJECT_COMPILATION', +@@ -162,6 +166,7 @@ gmodule_gir = gnome.generate_gir(libgmodule, + header: 'gmodule.h', + includes: [ glib_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libglib_dep, + ], +@@ -224,6 +229,7 @@ gio_gir = gnome.generate_gir(libgio, + header: 'gio/gio.h', + includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libglib_dep, + libgobject_dep, +@@ -249,6 +255,7 @@ if host_system == 'windows' + header: 'gio/gio.h', + includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libglib_dep, + libgobject_dep, +@@ -277,6 +284,7 @@ else + header: 'gio/gio.h', + includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ + libglib_dep, + libgobject_dep, +@@ -314,6 +322,7 @@ girepository_gir = gnome.generate_gir(libgirepository, + header: 'girepository/girepository.h', + includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ], + install: true, ++ install_dir_gir: glib_girdir, + dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep ], + extra_args: gir_args + libgirepository_gir_args, + ) diff --git a/meta/recipes-core/glib-2.0/files/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 new file mode 100644 index 0000000000..2f80529987 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-meson-Run-atomics-test-on-clang-as-well.patch @@ -0,0 +1,28 @@ +From 3dc2e741e18ccb740e98eb4e808ff83153b70e83 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 12 Oct 2019 17:46:26 -0700 +Subject: [PATCH] meson: Run atomics test on clang as well + +Fixes +./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics. +^ + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 2560686..5c46d0b 100644 +--- a/meson.build ++++ b/meson.build +@@ -2024,7 +2024,7 @@ atomicdefine = ''' + # We know that we can always use real ("lock free") atomic operations with MSVC + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops') + have_atomic_lock_free = true +- if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define') ++ if (cc.get_id() == 'gcc' or cc.get_id() == 'clang') and not cc.compiles(atomicdefine, name : 'atomic ops define') + # Old gcc release may provide + # __sync_bool_compare_and_swap but doesn't define + # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 diff --git a/meta/recipes-core/glib-2.0/files/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 new file mode 100644 index 0000000000..82955de671 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch @@ -0,0 +1,29 @@ +From 59525eedfbbfe4a16fdd0b340bc3f2479431c7d5 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sat, 16 Sep 2023 22:28:27 +0200 +Subject: [PATCH] meson.build: do not enable pidfd features on native glib + builds + +We still use host distros like alma 8 with kernels older than 5.4, +where these features are not implemented. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + meson.build | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 5c46d0b..222c1a1 100644 +--- a/meson.build ++++ b/meson.build +@@ -1022,7 +1022,8 @@ if cc.links('''#include + waitid (P_PIDFD, 0, &child_info, WEXITED | WNOHANG); + return 0; + }''', name : 'pidfd_open(2) system call') +- glib_conf.set('HAVE_PIDFD', 1) ++ #requires kernel 5.4+ ++ #glib_conf.set('HAVE_PIDFD', 1) + endif + + # Check for __uint128_t (gcc) by checking for 128-bit division diff --git a/meta/recipes-core/glib-2.0/files/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 new file mode 100644 index 0000000000..a51c186b00 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0010-Do-not-hardcode-python-path-into-various-tools.patch @@ -0,0 +1,43 @@ +From e6784ba43af83e22556921786c8f15e4cd246298 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 3 Oct 2017 10:45:55 +0300 +Subject: [PATCH] Do not hardcode python path into various tools + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +- + gobject/glib-genmarshal.in | 2 +- + gobject/glib-mkenums.in | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in +index 67d3675..4e92a7a 100755 +--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in ++++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env @PYTHON@ ++#!/usr/bin/env python3 + + # GDBus - GLib D-Bus Library + # +diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in +index aa5af43..56e8e2e 100755 +--- a/gobject/glib-genmarshal.in ++++ b/gobject/glib-genmarshal.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env @PYTHON@ ++#!/usr/bin/env python3 + + # pylint: disable=too-many-lines, missing-docstring, invalid-name + +diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in +index e10b910..4b619f8 100755 +--- a/gobject/glib-mkenums.in ++++ b/gobject/glib-mkenums.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env @PYTHON@ ++#!/usr/bin/env python3 + + # If the code below looks horrible and unpythonic, do not panic. + # diff --git a/meta/recipes-core/glib-2.0/files/meson.cross.d/common b/meta/recipes-core/glib-2.0/files/meson.cross.d/common new file mode 100644 index 0000000000..0d7c5fa3f8 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common @@ -0,0 +1,3 @@ +[properties] +# On all known supported architectures the stack grows down +growing_stack = false diff --git a/meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc new file mode 100644 index 0000000000..3049e5116e --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-glibc @@ -0,0 +1,6 @@ +[properties] +have_c99_vsnprintf = true +have_c99_snprintf = true +have_unix98_printf = true +va_val_copy = true +have_strlcpy = true diff --git a/meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux new file mode 100644 index 0000000000..adad7e62ee --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-linux @@ -0,0 +1,5 @@ +[properties] +have_proc_self_cmdline = true + +[binaries] +env = '/usr/bin/env' diff --git a/meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw new file mode 100644 index 0000000000..75f911ba1e --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-mingw @@ -0,0 +1,6 @@ +[properties] +have_c99_vsnprintf = false +have_c99_snprintf = false +have_unix98_printf = false +va_val_copy = true +have_proc_self_cmdline = false diff --git a/meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl new file mode 100644 index 0000000000..3049e5116e --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/meson.cross.d/common-musl @@ -0,0 +1,6 @@ +[properties] +have_c99_vsnprintf = true +have_c99_snprintf = true +have_unix98_printf = true +va_val_copy = true +have_strlcpy = true diff --git a/meta/recipes-core/glib-2.0/files/relocate-modules.patch b/meta/recipes-core/glib-2.0/files/relocate-modules.patch new file mode 100644 index 0000000000..d6e9019f39 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/relocate-modules.patch @@ -0,0 +1,44 @@ +From 47ea2576a13d5bc86692b4ba8cb4a8f2fd38c6ca Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Fri, 11 Mar 2016 15:35:55 +0000 +Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds + +Instead of hard-coding GIO_MODULE_PATH when glib is built, use dladdr() to +determine where libglib.so is and use that path to calculate GIO_MODULES_DIR. + +This solves relocation problems with GIOModule for native builds of glib. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +Port patch to 2.48 +Signed-off-by: Jussi Kukkonen +--- + gio/giomodule.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/gio/giomodule.c b/gio/giomodule.c +index 1e14955..3c09bb5 100644 +--- a/gio/giomodule.c ++++ b/gio/giomodule.c +@@ -1259,11 +1259,6 @@ get_gio_module_dir (void) + g_free (install_dir); + #else + module_dir = g_strdup (GIO_MODULE_DIR); +-#ifdef __APPLE__ +-#include "TargetConditionals.h" +-/* Only auto-relocate on macOS, not watchOS etc; older macOS SDKs only define TARGET_OS_MAC */ +-#if (defined (TARGET_OS_OSX) && TARGET_OS_OSX) || \ +- (!defined (TARGET_OS_OSX) && defined (TARGET_OS_MAC) && TARGET_OS_MAC) + #include + { + g_autofree gchar *path = NULL; +@@ -1282,8 +1277,6 @@ get_gio_module_dir (void) + } + } + } +-#endif +-#endif + #endif + } + diff --git a/meta/recipes-core/glib-2.0/files/run-ptest b/meta/recipes-core/glib-2.0/files/run-ptest new file mode 100644 index 0000000000..831bc3b91f --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/run-ptest @@ -0,0 +1,10 @@ +#! /bin/sh + +set -eux +if id -u glib2-test; then + userdel glib2-test +fi +useradd glib2-test +cd /tmp +su glib2-test -c 'G_TEST_TMPDIR=`readlink -f /tmp` gnome-desktop-testing-runner glib' +userdel glib2-test diff --git a/meta/recipes-core/glib-2.0/files/skip-timeout.patch b/meta/recipes-core/glib-2.0/files/skip-timeout.patch new file mode 100644 index 0000000000..b1c62cc39c --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/skip-timeout.patch @@ -0,0 +1,29 @@ +From 682d8a616ca111c0e45c8a9cb02e992e63c69586 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Thu, 28 Mar 2024 16:27:09 +0000 +Subject: [PATCH] Skip /timeout/rounding test + +This test is sensitive to load because it expects certain timeout operations +to succeed in specific time periods. Whilst these timeouts are fairly large, +they're still exceeded inside a qemu on a loaded system. + +https://bugzilla.yoctoproject.org/show_bug.cgi?id=14464 + +Upstream-Status: Inappropriate [OE-specific] +Signed-off-by: Ross Burton +--- + glib/tests/timeout.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c +index 1ae3f3a..85a715b 100644 +--- a/glib/tests/timeout.c ++++ b/glib/tests/timeout.c +@@ -214,7 +214,6 @@ main (int argc, char *argv[]) + g_test_add_func ("/timeout/seconds-once", test_seconds_once); + g_test_add_func ("/timeout/weeks-overflow", test_weeks_overflow); + g_test_add_func ("/timeout/far-future-ready-time", test_far_future_ready_time); +- g_test_add_func ("/timeout/rounding", test_rounding); + + return g_test_run (); + } 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 @@ +require glib.inc +PACKAGES = "" +PACKAGECONFIG = "" + + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch deleted file mode 100644 index 8e6598fbef..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-write-bindir-into-pkg-config-files.patch +++ /dev/null @@ -1,60 +0,0 @@ -From e7077aa23bfcd31a8e72e39dc93ce4f854678376 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 15 Feb 2019 11:17:27 +0100 -Subject: [PATCH] Do not write $bindir into pkg-config files - -This would otherwise break when using the files to build other target -components (we need to rely on PATH containing the paths to utilities, -rather than use target paths). - -Upstream-Status: Inappropriate [upstream wants the paths in .pc files] -Signed-off-by: Alexander Kanavin ---- - gio/meson.build | 16 ++++++++-------- - glib/meson.build | 6 +++--- - 2 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/gio/meson.build b/gio/meson.build -index 5f91586..1a95f4f 100644 ---- a/gio/meson.build -+++ b/gio/meson.build -@@ -884,14 +884,14 @@ pkg.generate(libgio, - 'dtdsdir=' + '${datadir}' / dtds_subdir, - 'bindir=' + '${prefix}' / get_option('bindir'), - 'giomoduledir=' + pkgconfig_giomodulesdir, -- 'gio=' + '${bindir}' / 'gio', -- 'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules', -- 'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas', -- 'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources', -- 'gdbus=' + '${bindir}' /'gdbus', -- 'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen', -- 'gresource=' + '${bindir}' / 'gresource', -- 'gsettings=' + '${bindir}' / 'gsettings', -+ 'gio=gio', -+ 'gio_querymodules=gio-querymodules', -+ 'glib_compile_schemas=glib-compile-schemas', -+ 'glib_compile_resources=glib-compile-resources', -+ 'gdbus=gdbus', -+ 'gdbus_codegen=gdbus-codegen', -+ 'gresource=gresource', -+ 'gsettings=gsettings', - ], - version : glib_version, - install_dir : glib_pkgconfigreldir, -diff --git a/glib/meson.build b/glib/meson.build -index c26a35e..1d8ca6b 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -447,9 +447,9 @@ pkg.generate(libglib, - variables : [ - 'bindir=' + '${prefix}' / get_option('bindir'), - 'datadir=' + '${prefix}' / get_option('datadir'), -- 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal', -- 'gobject_query=' + '${bindir}' / 'gobject-query', -- 'glib_mkenums=' + '${bindir}' / 'glib-mkenums', -+ 'glib_genmarshal=glib-genmarshal', -+ 'gobject_query=gobject-query', -+ 'glib_mkenums=glib-mkenums', - 'glib_valgrind_suppressions=' + '${datadir}' / - valgrind_suppression_file_install_subdir / - fs.name(valgrind_suppression_file), diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch deleted file mode 100644 index eb9dfdbcf9..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 9a5d4bf65b658d744d610ee27ecd2ae65b14b158 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 15 Mar 2014 22:42:29 -0700 -Subject: [PATCH] Fix DATADIRNAME on uclibc/Linux - -translation files are always installed under PREFIX/share/locale in uclibc -based systems therefore lets set DATADIRNAME to "share". - -Signed-off-by: Khem Raj -Upstream-Status: Pending ---- - m4macros/glib-gettext.m4 | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4 -index df6fbf0..47db864 100644 ---- a/m4macros/glib-gettext.m4 -+++ b/m4macros/glib-gettext.m4 -@@ -293,6 +293,10 @@ msgstr "" - CATOBJEXT=.mo - DATADIRNAME=share - ;; -+ *-*-musl* | *-*-linux-uclibc*) -+ CATOBJEXT=.gmo -+ DATADIRNAME=share -+ ;; - *) - CATOBJEXT=.mo - DATADIRNAME=lib diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch deleted file mode 100644 index ad69f7ec65..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 4933aef791857a5aac650b60af800778658b875b Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen -Date: Tue, 22 Mar 2016 15:14:58 +0200 -Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM - -We want to install this binary with the gio library, and debian -renamer does not cope with library packages with files in ${bindir} - -Signed-off-by: Jussi Kukkonen -Upstream-Status: Inappropriate [OE specific] ---- - gio/meson.build | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gio/meson.build b/gio/meson.build -index f9fdf6e..5f91586 100644 ---- a/gio/meson.build -+++ b/gio/meson.build -@@ -1005,6 +1005,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu - c_args : gio_c_args, - # intl.lib is not compatible with SAFESEH - link_args : noseh_link_args, -+ install_dir: glib_libexecdir, - dependencies : [libgio_dep, libgobject_dep, libgmodule_dep, libglib_dep]) - - glib_compile_schemas = executable('glib-compile-schemas', diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch deleted file mode 100644 index 0e3a62af6a..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 8ae2e9c2a04e089306693a021149dc6b7d1bd679 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 12 Jun 2015 17:08:46 +0300 -Subject: [PATCH] Remove the warning about deprecated paths in schemas - -Some schemas in gsettings-desktop-schemas (such as proxy and locale) -are still using deprecated paths, as of 3.16.1. This causes warning -messages, and meta/lib/oe/rootfs.py complaints about them. - -Upstream-Status: Inappropriate -Signed-off-by: Alexander Kanavin ---- - gio/glib-compile-schemas.c | 13 ------------- - 1 file changed, 13 deletions(-) - -diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c -index 04ef404..e791ce2 100644 ---- a/gio/glib-compile-schemas.c -+++ b/gio/glib-compile-schemas.c -@@ -1232,19 +1232,6 @@ parse_state_start_schema (ParseState *state, - return; - } - -- if (path && (g_str_has_prefix (path, "/apps/") || -- g_str_has_prefix (path, "/desktop/") || -- g_str_has_prefix (path, "/system/"))) -- { -- gchar *message = NULL; -- message = g_strdup_printf (_("Warning: Schema “%s” has path “%s”. " -- "Paths starting with " -- "“/apps/”, “/desktop/” or “/system/” are deprecated."), -- id, path); -- g_printerr ("%s\n", message); -- g_free (message); -- } -- - state->schema_state = schema_state_new (path, gettext_domain, - extends, extends_name, list_of); - diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch deleted file mode 100644 index 32b4cea409..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch +++ /dev/null @@ -1,80 +0,0 @@ -From c0733f7a91dfe13152abc60c5a3064456b3e9d63 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Wed, 13 Feb 2019 15:32:05 +0100 -Subject: [PATCH] Set host_machine correctly when building with mingw32 - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - gio/tests/meson.build | 8 ++++---- - glib/tests/meson.build | 2 +- - meson.build | 3 +++ - 3 files changed, 8 insertions(+), 5 deletions(-) - -diff --git a/gio/tests/meson.build b/gio/tests/meson.build -index 4ef3343..e498e7e 100644 ---- a/gio/tests/meson.build -+++ b/gio/tests/meson.build -@@ -29,7 +29,7 @@ endif - - test_cpp_args = test_c_args - --if host_machine.system() == 'windows' -+if host_system == 'windows' - common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')] - endif - -@@ -230,7 +230,7 @@ if have_dbus_daemon - endif - - # Test programs buildable on UNIX only --if host_machine.system() != 'windows' -+if host_system != 'windows' - gio_tests += { - 'file' : {}, - 'gdbus-peer-object-manager' : {}, -@@ -562,7 +562,7 @@ if host_machine.system() != 'windows' - endif # unix - - # Test programs buildable on Windows only --if host_machine.system() == 'windows' -+if host_system == 'windows' - gio_tests += {'win32-streams' : {}} - endif - -@@ -632,7 +632,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' - } - endif - --if host_machine.system() != 'windows' -+if host_system != 'windows' - test_extra_programs += { - 'gdbus-example-unix-fd-client' : { - 'install' : false, -diff --git a/glib/tests/meson.build b/glib/tests/meson.build -index d80c86e..5329cda 100644 ---- a/glib/tests/meson.build -+++ b/glib/tests/meson.build -@@ -216,7 +216,7 @@ if glib_conf.has('HAVE_EVENTFD') - } - endif - --if host_machine.system() == 'windows' -+if host_system == 'windows' - if winsock2.found() - glib_tests += { - 'gpoll' : { -diff --git a/meson.build b/meson.build -index 813c9b7..6ee775e 100644 ---- a/meson.build -+++ b/meson.build -@@ -54,6 +54,9 @@ else - endif - - host_system = host_machine.system() -+if host_system == 'mingw32' -+ host_system = 'windows' -+endif - - if host_system == 'darwin' - ios_test_code = '''#include 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 @@ -From a8eb944a10353403241608a084787f6efcbb2eb7 Mon Sep 17 00:00:00 2001 -From: Jordan Williams -Date: Fri, 1 Dec 2023 09:53:50 -0600 -Subject: [PATCH] Switch from the deprecated distutils module to the packaging - module - -The distutils module was removed in Python 3.12. - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291] - -Signed-off-by: Martin Jansa ---- - gio/gdbus-2.0/codegen/utils.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py -index 0204610..08f1ba9 100644 ---- a/gio/gdbus-2.0/codegen/utils.py -+++ b/gio/gdbus-2.0/codegen/utils.py -@@ -19,7 +19,7 @@ - # - # Author: David Zeuthen - --import distutils.version -+import packaging.version - import os - import sys - -@@ -166,4 +166,4 @@ def version_cmp_key(key): - v = str(key[0]) - else: - v = "0" -- return (distutils.version.LooseVersion(v), key[1]) -+ return (packaging.version.Version(v), key[1]) diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch deleted file mode 100644 index aee2986033..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 878e51f82100c698236fda0e069e14ea9249350c Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Wed, 8 Jan 2020 18:22:46 +0100 -Subject: [PATCH] gio/tests/resources.c: comment out a build host-only test - -This test requires building resources in a way that is -not cross-compatible (hardcodes ld and objcopy). - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - gio/tests/resources.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gio/tests/resources.c b/gio/tests/resources.c -index f567914..b21b616 100644 ---- a/gio/tests/resources.c -+++ b/gio/tests/resources.c -@@ -1068,7 +1068,7 @@ main (int argc, - g_test_add_func ("/resource/automatic", test_resource_automatic); - /* This only uses automatic resources too, so it tests the constructors and destructors */ - g_test_add_func ("/resource/module", test_resource_module); -- g_test_add_func ("/resource/binary-linked", test_resource_binary_linked); -+ /* g_test_add_func ("/resource/binary-linked", test_resource_binary_linked); */ - #endif - g_test_add_func ("/resource/uri/query-info", test_uri_query_info); - g_test_add_func ("/resource/uri/file", test_uri_file); diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch deleted file mode 100644 index 0b10269114..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson-Run-atomics-test-on-clang-as-well.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b4b523160ef550a53705fcc45ac6e10d086ce491 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 12 Oct 2019 17:46:26 -0700 -Subject: [PATCH] meson: Run atomics test on clang as well - -Fixes -./glib-2.62.1/glib/gatomic.c:675:2: error: G_ATOMIC_LOCK_FREE defined, but incapable of lock-free atomics. -^ - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 6ee775e..8bc5fa7 100644 ---- a/meson.build -+++ b/meson.build -@@ -1938,7 +1938,7 @@ atomicdefine = ''' - # We know that we can always use real ("lock free") atomic operations with MSVC - if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops') - have_atomic_lock_free = true -- if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define') -+ if (cc.get_id() == 'gcc' or cc.get_id() == 'clang') and not cc.compiles(atomicdefine, name : 'atomic ops define') - # Old gcc release may provide - # __sync_bool_compare_and_swap but doesn't define - # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch deleted file mode 100644 index 14dcb278e0..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 294f3e6e9a0a9f4733e85ed6810d1b743055370b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Sat, 16 Sep 2023 22:28:27 +0200 -Subject: [PATCH] meson.build: do not enable pidfd features on native glib - builds - -We still use host distros like alma 8 with kernels older than 5.4, -where these features are not implemented. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - meson.build | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 8bc5fa7..df1fa60 100644 ---- a/meson.build -+++ b/meson.build -@@ -981,7 +981,8 @@ if cc.links('''#include - waitid (P_PIDFD, 0, &child_info, WEXITED | WNOHANG); - return 0; - }''', name : 'pidfd_open(2) system call') -- glib_conf.set('HAVE_PIDFD', 1) -+ #requires kernel 5.4+ -+ #glib_conf.set('HAVE_PIDFD', 1) - endif - - # Check for __uint128_t (gcc) by checking for 128-bit division diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch b/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch deleted file mode 100644 index 6dff5179c7..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 50636758c73e5e61212a8f801c6c602b8aab5ba7 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 3 Oct 2017 10:45:55 +0300 -Subject: [PATCH] Do not hardcode python path into various tools - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - gio/gdbus-2.0/codegen/gdbus-codegen.in | 2 +- - gobject/glib-genmarshal.in | 2 +- - gobject/glib-mkenums.in | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in -index 67d3675..4e92a7a 100755 ---- a/gio/gdbus-2.0/codegen/gdbus-codegen.in -+++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in -@@ -1,4 +1,4 @@ --#!/usr/bin/env @PYTHON@ -+#!/usr/bin/env python3 - - # GDBus - GLib D-Bus Library - # -diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in -index aa5af43..56e8e2e 100755 ---- a/gobject/glib-genmarshal.in -+++ b/gobject/glib-genmarshal.in -@@ -1,4 +1,4 @@ --#!/usr/bin/env @PYTHON@ -+#!/usr/bin/env python3 - - # pylint: disable=too-many-lines, missing-docstring, invalid-name - -diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in -index 353e53a..8ed6c39 100755 ---- a/gobject/glib-mkenums.in -+++ b/gobject/glib-mkenums.in -@@ -1,4 +1,4 @@ --#!/usr/bin/env @PYTHON@ -+#!/usr/bin/env python3 - - # If the code below looks horrible and unpythonic, do not panic. - # 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 @@ -From cce3ae98a2c1966719daabff5a4ec6cf94a846f6 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Mon, 26 Feb 2024 16:55:44 +0000 -Subject: [PATCH] tests: Remove variable-length lookbehind tests for GRegex -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -PCRE2 10.43 has now introduced support for variable-length lookbehind, -so these tests now fail if GLib is built against PCRE2 10.43 or higher. - -See -https://github.com/PCRE2Project/pcre2/blob/e8db6fa7137f4c6f66cb87e0a3c9467252ec1ef7/ChangeLog#L94. - -Rather than making the tests conditional on the version of PCRE2 in use, -just remove them. They are mostly testing the PCRE2 code rather than -any code in GLib, so don’t have much value. - -This should fix CI runs on msys2-mingw32, which updated to PCRE2 10.43 2 -days ago. - -Signed-off-by: Philip Withnall - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/cce3ae98a2c1966719daabff5a4ec6cf94a846f6] -Signed-off-by: Alexander Kanavin ---- - glib/tests/regex.c | 10 ---------- - 1 file changed, 10 deletions(-) - -diff --git a/glib/tests/regex.c b/glib/tests/regex.c -index 1082526292..d7a698ec67 100644 ---- a/glib/tests/regex.c -+++ b/glib/tests/regex.c -@@ -1885,16 +1885,6 @@ test_lookbehind (void) - g_match_info_free (match); - g_regex_unref (regex); - -- regex = g_regex_new ("(? -Date: Tue, 23 Jan 2024 11:16:52 +0000 -Subject: [PATCH] Merge branch '2887-memory-monitor-tests' into 'main' - -tests: Fix race condition in memory-monitor-dbus.test - -Closes #2887 - -See merge request GNOME/glib!3844 - -Hopefully these commits fix the occasional failures we've been seeing: -https://bugzilla.yoctoproject.org/show_bug.cgi?id=15362 - -Upstream-Status: Backport -Signed-off-by: Ross Burton ---- - gio/tests/memory-monitor-dbus.py.in | 64 +++++++++++++------- - gio/tests/memory-monitor-portal.py.in | 54 ++++++++++------- - gio/tests/power-profile-monitor-dbus.py.in | 35 ++++++----- - gio/tests/power-profile-monitor-portal.py.in | 34 ++++++----- - 4 files changed, 113 insertions(+), 74 deletions(-) - -diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in -index bf32918..7aae01e 100755 ---- a/gio/tests/memory-monitor-dbus.py.in -+++ b/gio/tests/memory-monitor-dbus.py.in -@@ -16,7 +16,6 @@ import sys - import subprocess - import fcntl - import os --import time - - import taptestrunner - -@@ -57,53 +56,74 @@ try: - fcntl.fcntl(self.p_mock.stdout, fcntl.F_SETFL, flags | os.O_NONBLOCK) - self.last_warning = -1 - self.dbusmock = dbus.Interface(self.obj_lmm, dbusmock.MOCK_IFACE) -+ -+ try: -+ self.wait_for_bus_object('org.freedesktop.LowMemoryMonitor', -+ '/org/freedesktop/LowMemoryMonitor', -+ system_bus=True) -+ except: -+ raise -+ - self.memory_monitor = Gio.MemoryMonitor.dup_default() -+ assert("GMemoryMonitorDBus" in str(self.memory_monitor)) - self.memory_monitor.connect("low-memory-warning", self.memory_warning_cb) - self.mainloop = GLib.MainLoop() - self.main_context = self.mainloop.get_context() - -+ # The LowMemoryMonitor API is stateless: it doesn’t expose any -+ # properties, just a warning signal. Emit the signal in a loop until -+ # the GMemoryMonitor instance has initialised and synchronised to -+ # the right state. -+ def emit_warning(level): -+ self.dbusmock.EmitWarning(level) -+ return GLib.SOURCE_CONTINUE -+ -+ idle_id = GLib.idle_add(emit_warning, 0) -+ while self.last_warning != 0: -+ self.main_context.iteration(True) -+ GLib.source_remove(idle_id) -+ - def tearDown(self): - self.p_mock.terminate() - self.p_mock.wait() - -- def assertEventually(self, condition, message=None, timeout=50): -+ def assertEventually(self, condition, message=None, timeout=5): - '''Assert that condition function eventually returns True. - -- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is -+ Timeout is in seconds, defaulting to 5 seconds. message is - printed on failure. - ''' -- while timeout >= 0: -- context = GLib.MainContext.default() -- while context.iteration(False): -- pass -- if condition(): -- break -- timeout -= 1 -- time.sleep(0.1) -- else: -- self.fail(message or 'timed out waiting for ' + str(condition)) -+ if not message: -+ message = 'timed out waiting for ' + str(condition) -+ -+ def timed_out_cb(message): -+ self.fail(message) -+ return GLib.SOURCE_REMOVE -+ -+ timeout_source = GLib.timeout_source_new_seconds(timeout) -+ timeout_source.set_callback(timed_out_cb, message) -+ timeout_source.attach(self.main_context) -+ -+ while not condition(): -+ self.main_context.iteration(True) -+ -+ timeout_source.destroy() - - def memory_warning_cb(self, monitor, level): -+ print("Received memory warning signal, level", level) - self.last_warning = level - self.main_context.wakeup() - - def test_low_memory_warning_signal(self): - '''LowMemoryWarning signal''' - -- # Wait 2 seconds -- timeout = 2 -- while timeout > 0: -- time.sleep(0.5) -- timeout -= 0.5 -- self.main_context.iteration(False) -- - self.dbusmock.EmitWarning(100) - # Wait 2 seconds or until warning -- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20) -+ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 2) - - self.dbusmock.EmitWarning(255) - # Wait 2 seconds or until warning -- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20) -+ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 2) - - except ImportError as e: - @unittest.skip("Cannot import %s" % e.name) -diff --git a/gio/tests/memory-monitor-portal.py.in b/gio/tests/memory-monitor-portal.py.in -index 748cee8..f570508 100755 ---- a/gio/tests/memory-monitor-portal.py.in -+++ b/gio/tests/memory-monitor-portal.py.in -@@ -16,7 +16,6 @@ import sys - import subprocess - import fcntl - import os --import time - - import taptestrunner - -@@ -80,26 +79,44 @@ try: - self.mainloop = GLib.MainLoop() - self.main_context = self.mainloop.get_context() - -+ # The LowMemoryMonitor API is stateless: it doesn’t expose any -+ # properties, just a warning signal. Emit the signal in a loop until -+ # the GMemoryMonitor instance has initialised and synchronised to -+ # the right state. -+ def emit_warning(level): -+ self.dbusmock.EmitWarning(level) -+ return GLib.SOURCE_CONTINUE -+ -+ idle_id = GLib.idle_add(self.emit_warning, 0) -+ while self.last_warning != 0: -+ self.main_context.iteration(True) -+ GLib.source_remove(idle_id) -+ - def tearDown(self): - self.p_mock.terminate() - self.p_mock.wait() - -- def assertEventually(self, condition, message=None, timeout=50): -+ def assertEventually(self, condition, message=None, timeout=5): - '''Assert that condition function eventually returns True. - -- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is -+ Timeout is in seconds, defaulting to 5 seconds. message is - printed on failure. - ''' -- while timeout >= 0: -- context = GLib.MainContext.default() -- while context.iteration(False): -- pass -- if condition(): -- break -- timeout -= 1 -- time.sleep(0.1) -- else: -- self.fail(message or 'timed out waiting for ' + str(condition)) -+ if not message: -+ message = 'timed out waiting for ' + str(condition) -+ -+ def timed_out_cb(message): -+ self.fail(message) -+ return GLib.SOURCE_REMOVE -+ -+ timeout_source = GLib.timeout_source_new_seconds(timeout) -+ timeout_source.set_callback(timed_out_cb, message) -+ timeout_source.attach(self.main_context) -+ -+ while not condition(): -+ self.main_context.iteration(True) -+ -+ timeout_source.destroy() - - def portal_memory_warning_cb(self, monitor, level): - self.last_warning = level -@@ -108,20 +125,13 @@ try: - def test_low_memory_warning_portal_signal(self): - '''LowMemoryWarning signal''' - -- # Wait 2 seconds -- timeout = 2 -- while timeout > 0: -- time.sleep(0.5) -- timeout -= 0.5 -- self.main_context.iteration(False) -- - self.dbusmock.EmitWarning(100) - # Wait 2 seconds or until warning -- self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 20) -+ self.assertEventually(lambda: self.last_warning == 100, "'100' low-memory warning not received", 2) - - self.dbusmock.EmitWarning(255) - # Wait 2 seconds or until warning -- self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 20) -+ self.assertEventually(lambda: self.last_warning == 255, "'255' low-memory warning not received", 2) - - except ImportError as e: - @unittest.skip("Cannot import %s" % e.name) -diff --git a/gio/tests/power-profile-monitor-dbus.py.in b/gio/tests/power-profile-monitor-dbus.py.in -index 06e594f..f955afc 100755 ---- a/gio/tests/power-profile-monitor-dbus.py.in -+++ b/gio/tests/power-profile-monitor-dbus.py.in -@@ -16,7 +16,6 @@ import sys - import subprocess - import fcntl - import os --import time - - import taptestrunner - -@@ -58,6 +57,7 @@ try: - self.power_saver_enabled = False - self.dbus_props = dbus.Interface(self.obj_ppd, dbus.PROPERTIES_IFACE) - self.power_profile_monitor = Gio.PowerProfileMonitor.dup_default() -+ assert("GPowerProfileMonitorDBus" in str(self.power_profile_monitor)) - self.power_profile_monitor.connect("notify::power-saver-enabled", self.power_saver_enabled_cb) - self.mainloop = GLib.MainLoop() - self.main_context = self.mainloop.get_context() -@@ -66,22 +66,27 @@ try: - self.p_mock.terminate() - self.p_mock.wait() - -- def assertEventually(self, condition, message=None, timeout=50): -+ def assertEventually(self, condition, message=None, timeout=5): - '''Assert that condition function eventually returns True. - -- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is -+ Timeout is in seconds, defaulting to 5 seconds. message is - printed on failure. - ''' -- while timeout >= 0: -- context = GLib.MainContext.default() -- while context.iteration(False): -- pass -- if condition(): -- break -- timeout -= 1 -- time.sleep(0.1) -- else: -- self.fail(message or 'timed out waiting for ' + str(condition)) -+ if not message: -+ message = 'timed out waiting for ' + str(condition) -+ -+ def timed_out_cb(message): -+ self.fail(message) -+ return GLib.SOURCE_REMOVE -+ -+ timeout_source = GLib.timeout_source_new_seconds(timeout) -+ timeout_source.set_callback(timed_out_cb, message) -+ timeout_source.attach(self.main_context) -+ -+ while not condition(): -+ self.main_context.iteration(True) -+ -+ timeout_source.destroy() - - def power_saver_enabled_cb(self, spec, data): - self.power_saver_enabled = self.power_profile_monitor.get_power_saver_enabled() -@@ -92,10 +97,10 @@ try: - - self.assertEqual(self.power_profile_monitor.get_power_saver_enabled(), False) - self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('power-saver', variant_level=1)) -- self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 10) -+ self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 1) - - self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('balanced', variant_level=1)) -- self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 10) -+ self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 1) - - except ImportError as e: - @unittest.skip("Cannot import %s" % e.name) -diff --git a/gio/tests/power-profile-monitor-portal.py.in b/gio/tests/power-profile-monitor-portal.py.in -index 09e9a45..ad2abf6 100755 ---- a/gio/tests/power-profile-monitor-portal.py.in -+++ b/gio/tests/power-profile-monitor-portal.py.in -@@ -16,7 +16,6 @@ import sys - import subprocess - import fcntl - import os --import time - - import taptestrunner - -@@ -90,22 +89,27 @@ try: - self.p_mock.terminate() - self.p_mock.wait() - -- def assertEventually(self, condition, message=None, timeout=50): -+ def assertEventually(self, condition, message=None, timeout=5): - '''Assert that condition function eventually returns True. - -- Timeout is in deciseconds, defaulting to 50 (5 seconds). message is -+ Timeout is in seconds, defaulting to 5 seconds. message is - printed on failure. - ''' -- while timeout >= 0: -- context = GLib.MainContext.default() -- while context.iteration(False): -- pass -- if condition(): -- break -- timeout -= 1 -- time.sleep(0.1) -- else: -- self.fail(message or 'timed out waiting for ' + str(condition)) -+ if not message: -+ message = 'timed out waiting for ' + str(condition) -+ -+ def timed_out_cb(message): -+ self.fail(message) -+ return GLib.SOURCE_REMOVE -+ -+ timeout_source = GLib.timeout_source_new_seconds(timeout) -+ timeout_source.set_callback(timed_out_cb, message) -+ timeout_source.attach(self.main_context) -+ -+ while not condition(): -+ self.main_context.iteration(True) -+ -+ timeout_source.destroy() - - def power_saver_enabled_cb(self, spec, data): - self.power_saver_enabled = self.power_profile_monitor.get_power_saver_enabled() -@@ -116,10 +120,10 @@ try: - - self.assertEqual(self.power_profile_monitor.get_power_saver_enabled(), False) - self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('power-saver', variant_level=1)) -- self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 10) -+ self.assertEventually(lambda: self.power_saver_enabled == True, "power-saver didn't become enabled", 1) - - self.dbus_props.Set('net.hadess.PowerProfiles', 'ActiveProfile', dbus.String('balanced', variant_level=1)) -- self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 10) -+ self.assertEventually(lambda: self.power_saver_enabled == False, "power-saver didn't become disabled", 1) - - def test_power_profile_power_saver_enabled_portal_default(self): - '''power-saver-enabled property default value''' diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common deleted file mode 100644 index 0d7c5fa3f8..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common +++ /dev/null @@ -1,3 +0,0 @@ -[properties] -# On all known supported architectures the stack grows down -growing_stack = false diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc deleted file mode 100644 index 3049e5116e..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-glibc +++ /dev/null @@ -1,6 +0,0 @@ -[properties] -have_c99_vsnprintf = true -have_c99_snprintf = true -have_unix98_printf = true -va_val_copy = true -have_strlcpy = true diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux deleted file mode 100644 index adad7e62ee..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-linux +++ /dev/null @@ -1,5 +0,0 @@ -[properties] -have_proc_self_cmdline = true - -[binaries] -env = '/usr/bin/env' diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw deleted file mode 100644 index 75f911ba1e..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-mingw +++ /dev/null @@ -1,6 +0,0 @@ -[properties] -have_c99_vsnprintf = false -have_c99_snprintf = false -have_unix98_printf = false -va_val_copy = true -have_proc_self_cmdline = false diff --git a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl b/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl deleted file mode 100644 index 3049e5116e..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/meson.cross.d/common-musl +++ /dev/null @@ -1,6 +0,0 @@ -[properties] -have_c99_vsnprintf = true -have_c99_snprintf = true -have_unix98_printf = true -va_val_copy = true -have_strlcpy = true diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch deleted file mode 100644 index 3e79bbf679..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f40e89b3852df37959606ee13b1a14ade81fa886 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Fri, 11 Mar 2016 15:35:55 +0000 -Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds - -Instead of hard-coding GIO_MODULE_PATH when glib is built, use dladdr() to -determine where libglib.so is and use that path to calculate GIO_MODULES_DIR. - -This solves relocation problems with GIOModule for native builds of glib. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton - -Port patch to 2.48 -Signed-off-by: Jussi Kukkonen ---- - gio/giomodule.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/gio/giomodule.c b/gio/giomodule.c -index 17fabe6..8021208 100644 ---- a/gio/giomodule.c -+++ b/gio/giomodule.c -@@ -1271,11 +1271,6 @@ get_gio_module_dir (void) - g_free (install_dir); - #else - module_dir = g_strdup (GIO_MODULE_DIR); --#ifdef __APPLE__ --#include "TargetConditionals.h" --/* Only auto-relocate on macOS, not watchOS etc; older macOS SDKs only define TARGET_OS_MAC */ --#if (defined (TARGET_OS_OSX) && TARGET_OS_OSX) || \ -- (!defined (TARGET_OS_OSX) && defined (TARGET_OS_MAC) && TARGET_OS_MAC) - #include - { - g_autofree gchar *path = NULL; -@@ -1294,8 +1289,6 @@ get_gio_module_dir (void) - } - } - } --#endif --#endif - #endif - } - diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest deleted file mode 100644 index 831bc3b91f..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh - -set -eux -if id -u glib2-test; then - userdel glib2-test -fi -useradd glib2-test -cd /tmp -su glib2-test -c 'G_TEST_TMPDIR=`readlink -f /tmp` gnome-desktop-testing-runner glib' -userdel glib2-test diff --git a/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch b/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch deleted file mode 100644 index cd5ac287c3..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/skip-timeout.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bb11d1a4ae77d93ec0743e54077cf0f990243fa6 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Thu, 28 Mar 2024 16:27:09 +0000 -Subject: [PATCH] Skip /timeout/rounding test - -This test is sensitive to load because it expects certain timeout operations -to succeed in specific time periods. Whilst these timeouts are fairly large, -they're still exceeded inside a qemu on a loaded system. - -https://bugzilla.yoctoproject.org/show_bug.cgi?id=14464 - -Upstream-Status: Inappropriate [OE-specific] -Signed-off-by: Ross Burton ---- - glib/tests/timeout.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c -index 1ae3f3a34..85a715b0f 100644 ---- a/glib/tests/timeout.c -+++ b/glib/tests/timeout.c -@@ -214,7 +214,6 @@ main (int argc, char *argv[]) - g_test_add_func ("/timeout/seconds-once", test_seconds_once); - g_test_add_func ("/timeout/weeks-overflow", test_weeks_overflow); - g_test_add_func ("/timeout/far-future-ready-time", test_far_future_ready_time); -- g_test_add_func ("/timeout/rounding", test_rounding); - - return g_test_run (); - } --- -2.34.1 - 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 @@ -require glib.inc - -PE = "1" - -SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" - -SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ - file://run-ptest \ - file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ - file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ - file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ - file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ - file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ - file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ - file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ - file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ - file://0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch \ - file://memory-monitor.patch \ - file://fix-regex.patch \ - file://skip-timeout.patch \ - " -SRC_URI:append:class-native = " file://relocate-modules.patch \ - file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ - " - -SRC_URI[sha256sum] = "24b8e0672dca120cc32d394bccb85844e732e04fe75d18bb0573b2dbc7548f63" - -# Find any meson cross files in FILESPATH that are relevant for the current -# build (using siteinfo) and add them to EXTRA_OEMESON. -inherit siteinfo -def find_meson_cross_files(d): - if bb.data.inherits_class('native', d): - return "" - - thisdir = os.path.normpath(d.getVar("THISDIR")) - import collections - sitedata = siteinfo_data(d) - # filename -> found - files = collections.OrderedDict() - for path in d.getVar("FILESPATH").split(":"): - for element in sitedata: - filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) - sanitized_path = filename.replace(thisdir, "${THISDIR}") - if sanitized_path == filename: - if os.path.exists(filename): - 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)) - continue - files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) - - items = ["--cross-file=" + k for k,v in files.items() if v] - d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) - items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] - d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) - -python () { - find_meson_cross_files(d) -} 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..780aa24573 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc @@ -28,21 +28,24 @@ PACKAGES += "${PN}-codegen ${PN}-utils" LEAD_SONAME = "libglib-2.0.*" -inherit meson gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data - -GTKDOC_MESON_OPTION = "gtk_doc" +inherit meson gettext gi-docgen pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages gobject-introspection-data S = "${WORKDIR}/glib-${PV}" PACKAGECONFIG ??= "libmount \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'introspection', '', d)} \ ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG:class-native = "" + PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" -PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native" +PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, python3-docutils-native" PACKAGECONFIG[libelf] = "-Dlibelf=enabled,-Dlibelf=disabled,elfutils" PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false," PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux" +PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,gobject-introspection-native gobject-introspection glib-2.0-initial" EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" +EXTRA_OEMESON:append:class-target = " ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''}" do_configure:prepend() { sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in @@ -53,14 +56,16 @@ FILES:${PN} = "${libdir}/lib*${SOLIBS} \ ${libexecdir}/*gio-querymodules \ ${libexecdir}/*gio-launch-desktop \ ${datadir}/glib-2.0/dtds \ - ${datadir}/glib-2.0/schemas" - + ${datadir}/glib-2.0/schemas \ + ${libdir}/girepository-*/*.typelib \ +" FILES:${PN}-dev += "${libdir}/glib-2.0/include \ ${libdir}/gio/modules/lib*${SOLIBSDEV} \ ${libdir}/gio/modules/*.la \ ${datadir}/glib-2.0/gettext/po/Makefile.in.in \ ${datadir}/glib-2.0/schemas/gschema.dtd \ ${datadir}/glib-2.0/valgrind/glib.supp \ + ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir \ ${datadir}/gettext/its" FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ @@ -204,3 +209,57 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\ locale-base-pl-pl.iso-8859-2 \ locale-base-tr-tr \ " + +PE = "1" + +SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}" + +SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ + file://run-ptest \ + file://0001-Fix-DATADIRNAME-on-uclibc-Linux.patch \ + file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ + file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ + file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ + file://0001-Set-host_machine-correctly-when-building-with-mingw3.patch \ + file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ + file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ + file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ + file://skip-timeout.patch \ + file://0001-girepository-introspection-correctly-install-.gir-fi.patch \ + " +SRC_URI:append:class-native = " file://relocate-modules.patch \ + file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ + " + +SRC_URI[sha256sum] = "8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d" + +# Find any meson cross files in FILESPATH that are relevant for the current +# build (using siteinfo) and add them to EXTRA_OEMESON. +inherit siteinfo +def find_meson_cross_files(d): + if bb.data.inherits_class('native', d): + return "" + + thisdir = os.path.normpath(d.getVar("THISDIR")) + import collections + sitedata = siteinfo_data(d) + # filename -> found + files = collections.OrderedDict() + for path in d.getVar("FILESPATH").split(":"): + for element in sitedata: + filename = os.path.normpath(os.path.join(path, "meson.cross.d", element)) + sanitized_path = filename.replace(thisdir, "${THISDIR}") + if sanitized_path == filename: + if os.path.exists(filename): + 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)) + continue + files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename) + + items = ["--cross-file=" + k for k,v in files.items() if v] + d.appendVar("EXTRA_OEMESON", " " + " ".join(items)) + items = ["%s:%s" % (k, "True" if v else "False") for k,v in files.items()] + d.appendVarFlag("do_configure", "file-checksums", " " + " ".join(items)) + +python () { + find_meson_cross_files(d) +} 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 @@ -From aeb5532f8be42d42f4e8725ca42e239b36983a4d Mon Sep 17 00:00:00 2001 +From 4e1aa0ddbc43403ff24f644b4c4912b737290c41 Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Fri, 8 Jun 2018 13:55:10 +0200 Subject: [PATCH] Relocate the repository directory for native builds @@ -14,14 +14,13 @@ cache or sstate mirror). Upstream-Status: Inappropriate Signed-off-by: Sascha Silbe - --- girepository/girepository.c | 15 +++++++++++++-- girepository/meson.build | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/girepository/girepository.c b/girepository/girepository.c -index a0754f4..2d456f9 100644 +index 12eaf36..876382c 100644 --- a/girepository/girepository.c +++ b/girepository/girepository.c @@ -21,6 +21,8 @@ @@ -42,7 +41,7 @@ index a0754f4..2d456f9 100644 /** * SECTION:girepository * @short_description: GObject Introspection repository manager -@@ -215,9 +219,16 @@ init_globals (void) +@@ -222,9 +226,16 @@ init_globals (void) g_free (custom_dirs); } @@ -62,10 +61,10 @@ index a0754f4..2d456f9 100644 typelib_search_path = g_slist_prepend (typelib_search_path, typelib_dir); diff --git a/girepository/meson.build b/girepository/meson.build -index 786749a..15cf2a9 100644 +index 5ced59e..a580d9b 100644 --- a/girepository/meson.build +++ b/girepository/meson.build -@@ -45,7 +45,7 @@ girepo_internals_lib = static_library('girepository-internals', +@@ -47,7 +47,7 @@ girepo_internals_lib = static_library('girepository-internals', ], c_args: gi_hidden_visibility_cflags + custom_c_args, 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.78.1.bb deleted file mode 100644 index 05a08a50e0..0000000000 --- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.78.1.bb +++ /dev/null @@ -1,194 +0,0 @@ -SUMMARY = "Middleware layer between GObject-using C libraries and language bindings" -DESCRIPTION = "GObject Introspection is a project for providing machine \ -readable introspection data of the API of C libraries. This introspection \ -data can be used in several different use cases, for example automatic code \ -generation for bindings, API verification and documentation generation." -HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection" -BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues" -SECTION = "libs" -LICENSE = "LGPL-2.0-or-later & GPL-2.0-or-later & MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \ - file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \ - file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \ - file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27 \ - " - -SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \ - " - -SRC_URI[sha256sum] = "bd7babd99af7258e76819e45ba4a6bc399608fe762d83fde3cac033c50841bb4" - -SRC_URI:append:class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch" - -inherit meson pkgconfig gtk-doc python3targetconfig qemu gobject-introspection-data upstream-version-is-even multilib_script - -GTKDOC_MESON_OPTION = "gtk_doc" - -MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" - -DEPENDS += " libffi zlib glib-2.0 python3 flex-native bison-native" - -# target build needs qemu to run temporary introspection binaries created -# on the fly by g-ir-scanner and a native version of itself to run -# native versions of its own tools during build. -DEPENDS:append:class-target = " gobject-introspection-native qemu-native" - -# needed for writing out the qemu wrapper script -export STAGING_DIR_HOST -export B - -PACKAGECONFIG ?= "" -PACKAGECONFIG[doctool] = "-Ddoctool=enabled,-Ddoctool=disabled,python3-mako," - -# Configure target build to use native tools of itself and to use a qemu wrapper -# and optionally to generate introspection data -EXTRA_OEMESON:class-target = " \ - -Dgi_cross_use_prebuilt_gi=true \ - -Dgi_cross_binary_wrapper=${B}/g-ir-scanner-qemuwrapper \ - -Dgi_cross_ldd_wrapper=${B}/g-ir-scanner-lddwrapper \ - -Dgi_cross_pkgconfig_sysroot_path=${PKG_CONFIG_SYSROOT_DIR} \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dbuild_introspection_data=true', '-Dbuild_introspection_data=false', d)} \ - ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \ -" - -do_configure:prepend:class-native() { - # Tweak the native python scripts so that they don't refer to the - # full path of native python binary (the solution is taken from glib-2.0 recipe) - # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes) - sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in -} - -do_configure:prepend:class-target() { - # Write out a qemu wrapper that will be given to gi-scanner so that it - # can run target helper binaries through that. - qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" - cat > ${B}/g-ir-scanner-qemuwrapper << EOF -#!/bin/sh -# Use a modules directory which doesn't exist so we don't load random things -# which may then get deleted (or their dependencies) and potentially segfault -export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy - -$qemu_binary "\$@" -if [ \$? -ne 0 ]; then - echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help." - echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )" - exit 1 -fi -EOF - chmod +x ${B}/g-ir-scanner-qemuwrapper - - # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files - # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use - # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory - # from the target sysroot. - cat > ${B}/g-ir-scanner-wrapper << EOF -#!/bin/sh -# This prevents g-ir-scanner from writing cache data to user's HOME dir -export GI_SCANNER_DISABLE_CACHE=1 - -g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 --add-include-path=${STAGING_LIBDIR}/gir-1.0 "\$@" -EOF - chmod +x ${B}/g-ir-scanner-wrapper - - # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu. - # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent. - cat > ${B}/g-ir-compiler-wrapper << EOF -#!/bin/sh -${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@" -EOF - chmod +x ${B}/g-ir-compiler-wrapper - - # Write out a wrapper to use instead of ldd, which does not work when a binary is built - # for a different architecture - cat > ${B}/g-ir-scanner-lddwrapper << EOF -#!/bin/sh -\$OBJDUMP -p "\$@" -EOF - chmod +x ${B}/g-ir-scanner-lddwrapper - - # Also tweak the target python scripts so that they don't refer to the - # native version of python binary (the solution is taken from glib-2.0 recipe) - sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in -} - -do_compile:prepend() { - # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise - export GIR_EXTRA_LIBS_PATH=$B/.libs -} - -do_install:prepend() { - # This prevents g-ir-scanner from writing cache data to $HOME - export GI_SCANNER_DISABLE_CACHE=1 -} - -# Our wrappers need to be available system-wide, because they will be used -# to build introspection files for all other gobject-based packages -do_install:append:class-target() { - install -d ${D}${bindir}/ - install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/ - install ${B}/g-ir-scanner-wrapper ${D}${bindir}/ - install ${B}/g-ir-compiler-wrapper ${D}${bindir}/ - install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/ -} - -# we need target versions of introspection tools in sysroot so that they can be run via qemu -# when building introspection files in other packages -SYSROOT_DIRS:append:class-target = " ${bindir}" - -SYSROOT_PREPROCESS_FUNCS:append:class-target = " gi_binaries_sysroot_preprocess" -gi_binaries_sysroot_preprocess() { - # Tweak the binary names in the introspection pkgconfig file, so that it - # picks up our wrappers which do the cross-compile and qemu magic. - sed -i \ - -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \ - -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \ - ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc -} - -SYSROOT_PREPROCESS_FUNCS:append = " gi_ldsoconf_sysroot_preprocess" -gi_ldsoconf_sysroot_preprocess () { - mkdir -p ${SYSROOT_DESTDIR}${bindir} - dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN} - echo "#!/bin/sh" > $dest - echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest - echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest - echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest - chmod 755 $dest -} - -# Remove wrapper files from the package, only used for cross-compiling -PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess" -gi_package_preprocess() { - rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper - rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper - rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper - rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper -} - -SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}" - -# .typelib files are needed at runtime and so they go to the main package -FILES:${PN}:append = " ${libdir}/girepository-*/*.typelib" - -# .gir files go to dev package, as they're needed for developing (but not for running) -# things that depends on introspection. -FILES:${PN}-dev:append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir" -FILES:${PN}-dev:append = " ${datadir}/gir-*/*.rnc" - -# These are used by gobject-based packages -# to generate transient introspection binaries -FILES:${PN}-dev:append = " ${datadir}/gobject-introspection-1.0/gdump.c \ - ${datadir}/gobject-introspection-1.0/Makefile.introspection" - -# These are used by dependent packages (e.g. pygobject) to build their -# testsuites. -FILES:${PN}-dev:append = " ${datadir}/gobject-introspection-1.0/tests/*.c \ - ${datadir}/gobject-introspection-1.0/tests/*.h" - -FILES:${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/" -FILES:${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" - -# setuptools can be removed when upstream removes all uses of distutils -RDEPENDS:${PN} = "python3-pickle python3-xml python3-setuptools" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb new file mode 100644 index 0000000000..582ac248fd --- /dev/null +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.80.1.bb @@ -0,0 +1,196 @@ +SUMMARY = "Middleware layer between GObject-using C libraries and language bindings" +DESCRIPTION = "GObject Introspection is a project for providing machine \ +readable introspection data of the API of C libraries. This introspection \ +data can be used in several different use cases, for example automatic code \ +generation for bindings, API verification and documentation generation." +HOMEPAGE = "https://wiki.gnome.org/action/show/Projects/GObjectIntrospection" +BUGTRACKER = "https://gitlab.gnome.org/GNOME/gobject-introspection/issues" +SECTION = "libs" +LICENSE = "LGPL-2.0-or-later & GPL-2.0-or-later & MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \ + file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \ + file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \ + file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27 \ + " + +SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \ + " + +SRC_URI[sha256sum] = "a1df7c424e15bda1ab639c00e9051b9adf5cea1a9e512f8a603b53cd199bc6d8" + +SRC_URI:append:class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch" + +inherit meson pkgconfig gtk-doc python3targetconfig qemu gobject-introspection-data upstream-version-is-even multilib_script + +GTKDOC_MESON_OPTION = "gtk_doc" + +MULTILIB_SCRIPTS = "${PN}:${bindir}/g-ir-annotation-tool ${PN}:${bindir}/g-ir-scanner" + +DEPENDS += " libffi zlib python3 flex-native bison-native" +DEPENDS:append:class-native = " glib-2.0" +DEPENDS:append:class-target = " glib-2.0-initial" + +# target build needs qemu to run temporary introspection binaries created +# on the fly by g-ir-scanner and a native version of itself to run +# native versions of its own tools during build. +DEPENDS:append:class-target = " gobject-introspection-native qemu-native" + +# needed for writing out the qemu wrapper script +export STAGING_DIR_HOST +export B + +PACKAGECONFIG ?= "" +PACKAGECONFIG[doctool] = "-Ddoctool=enabled,-Ddoctool=disabled,python3-mako," + +# Configure target build to use native tools of itself and to use a qemu wrapper +# and optionally to generate introspection data +EXTRA_OEMESON:class-target = " \ + -Dgi_cross_use_prebuilt_gi=true \ + -Dgi_cross_binary_wrapper=${B}/g-ir-scanner-qemuwrapper \ + -Dgi_cross_ldd_wrapper=${B}/g-ir-scanner-lddwrapper \ + -Dgi_cross_pkgconfig_sysroot_path=${PKG_CONFIG_SYSROOT_DIR} \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-Dbuild_introspection_data=true', '-Dbuild_introspection_data=false', d)} \ + ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''} \ +" + +do_configure:prepend:class-native() { + # Tweak the native python scripts so that they don't refer to the + # full path of native python binary (the solution is taken from glib-2.0 recipe) + # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes) + sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in +} + +do_configure:prepend:class-target() { + # Write out a qemu wrapper that will be given to gi-scanner so that it + # can run target helper binaries through that. + qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" + cat > ${B}/g-ir-scanner-qemuwrapper << EOF +#!/bin/sh +# Use a modules directory which doesn't exist so we don't load random things +# which may then get deleted (or their dependencies) and potentially segfault +export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy + +$qemu_binary "\$@" +if [ \$? -ne 0 ]; then + echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help." + echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )" + exit 1 +fi +EOF + chmod +x ${B}/g-ir-scanner-qemuwrapper + + # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files + # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use + # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory + # from the target sysroot. + cat > ${B}/g-ir-scanner-wrapper << EOF +#!/bin/sh +# This prevents g-ir-scanner from writing cache data to user's HOME dir +export GI_SCANNER_DISABLE_CACHE=1 + +g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 --add-include-path=${STAGING_LIBDIR}/gir-1.0 "\$@" +EOF + chmod +x ${B}/g-ir-scanner-wrapper + + # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu. + # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent. + cat > ${B}/g-ir-compiler-wrapper << EOF +#!/bin/sh +${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@" +EOF + chmod +x ${B}/g-ir-compiler-wrapper + + # Write out a wrapper to use instead of ldd, which does not work when a binary is built + # for a different architecture + cat > ${B}/g-ir-scanner-lddwrapper << EOF +#!/bin/sh +\$OBJDUMP -p "\$@" +EOF + chmod +x ${B}/g-ir-scanner-lddwrapper + + # Also tweak the target python scripts so that they don't refer to the + # native version of python binary (the solution is taken from glib-2.0 recipe) + sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/tools/g-ir-tool-template.in +} + +do_compile:prepend() { + # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise + export GIR_EXTRA_LIBS_PATH=$B/.libs +} + +do_install:prepend() { + # This prevents g-ir-scanner from writing cache data to $HOME + export GI_SCANNER_DISABLE_CACHE=1 +} + +# Our wrappers need to be available system-wide, because they will be used +# to build introspection files for all other gobject-based packages +do_install:append:class-target() { + install -d ${D}${bindir}/ + install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/ + install ${B}/g-ir-scanner-wrapper ${D}${bindir}/ + install ${B}/g-ir-compiler-wrapper ${D}${bindir}/ + install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/ +} + +# we need target versions of introspection tools in sysroot so that they can be run via qemu +# when building introspection files in other packages +SYSROOT_DIRS:append:class-target = " ${bindir}" + +SYSROOT_PREPROCESS_FUNCS:append:class-target = " gi_binaries_sysroot_preprocess" +gi_binaries_sysroot_preprocess() { + # Tweak the binary names in the introspection pkgconfig file, so that it + # picks up our wrappers which do the cross-compile and qemu magic. + sed -i \ + -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \ + -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \ + ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc +} + +SYSROOT_PREPROCESS_FUNCS:append = " gi_ldsoconf_sysroot_preprocess" +gi_ldsoconf_sysroot_preprocess () { + mkdir -p ${SYSROOT_DESTDIR}${bindir} + dest=${SYSROOT_DESTDIR}${bindir}/postinst-ldsoconf-${PN} + echo "#!/bin/sh" > $dest + echo "mkdir -p ${STAGING_DIR_TARGET}${sysconfdir}" >> $dest + echo "echo ${base_libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest + echo "echo ${libdir} >> ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf" >> $dest + chmod 755 $dest +} + +# Remove wrapper files from the package, only used for cross-compiling +PACKAGE_PREPROCESS_FUNCS += "gi_package_preprocess" +gi_package_preprocess() { + rm -f ${PKGD}${bindir}/g-ir-scanner-qemuwrapper + rm -f ${PKGD}${bindir}/g-ir-scanner-wrapper + rm -f ${PKGD}${bindir}/g-ir-compiler-wrapper + rm -f ${PKGD}${bindir}/g-ir-scanner-lddwrapper +} + +SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir postinst-ldsoconf-${PN}" + +# .typelib files are needed at runtime and so they go to the main package +FILES:${PN}:append = " ${libdir}/girepository-*/*.typelib" + +# .gir files go to dev package, as they're needed for developing (but not for running) +# things that depends on introspection. +FILES:${PN}-dev:append = " ${datadir}/gir-*/*.gir ${libdir}/gir-*/*.gir" +FILES:${PN}-dev:append = " ${datadir}/gir-*/*.rnc" + +# These are used by gobject-based packages +# to generate transient introspection binaries +FILES:${PN}-dev:append = " ${datadir}/gobject-introspection-1.0/gdump.c \ + ${datadir}/gobject-introspection-1.0/Makefile.introspection" + +# These are used by dependent packages (e.g. pygobject) to build their +# testsuites. +FILES:${PN}-dev:append = " ${datadir}/gobject-introspection-1.0/tests/*.c \ + ${datadir}/gobject-introspection-1.0/tests/*.h" + +FILES:${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/" +FILES:${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a" + +# setuptools can be removed when upstream removes all uses of distutils +RDEPENDS:${PN} = "python3-pickle python3-xml python3-setuptools glib-2.0" + +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf