diff options
Diffstat (limited to 'meta/recipes-core/glib-2.0')
28 files changed, 485 insertions, 405 deletions
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..ae140b9930 --- /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 bcf62c2e776b9716880ac65e5d553d75d5fddc2e Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +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 <alex.kanavin@gmail.com> +--- + 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..6da9399569 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-Fix-DATADIRNAME-on-uclibc-Linux.patch @@ -0,0 +1,29 @@ +From 1d88f52c42a0ed469cb5976f5788b4ba25bb14f9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +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 <raj.khem@gmail.com> +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..8423f63cbb --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch @@ -0,0 +1,26 @@ +From 75f9eaf2ef760ffb198b0b97a9054f435c79cde9 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +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 <jussi.kukkonen@intel.com> +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/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch b/meta/recipes-core/glib-2.0/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch index 67ca6240bc..bd7ed77642 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch +++ b/meta/recipes-core/glib-2.0/files/0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch @@ -1,7 +1,7 @@ -From 2acf40361eecd17c6981743dabd06e25a9934258 Mon Sep 17 00:00:00 2001 +From 22dcd727203d59a025c8be4280b4654a7054322f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 12 Jun 2015 17:08:46 +0300 -Subject: [PATCH 05/10] Remove the warning about deprecated paths in schemas +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 @@ -9,16 +9,15 @@ messages, and meta/lib/oe/rootfs.py complaints about them. Upstream-Status: Inappropriate Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - --- 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 b8de090..130f89b 100644 +index 04ef404..e791ce2 100644 --- a/gio/glib-compile-schemas.c +++ b/gio/glib-compile-schemas.c -@@ -1219,19 +1219,6 @@ parse_state_start_schema (ParseState *state, +@@ -1232,19 +1232,6 @@ parse_state_start_schema (ParseState *state, return; } @@ -38,6 +37,3 @@ index b8de090..130f89b 100644 state->schema_state = schema_state_new (path, gettext_domain, extends, extends_name, list_of); --- -2.14.1 - 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..8b4304462e --- /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 3f054111f991a9dd224b6201dafad7e2c28cb78d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +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 <alex.kanavin@gmail.com> +--- + 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-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..ea1ab568d1 --- /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 de3eabf9295816b4b4eb7428dee504fd505e723d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +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 <raj.khem@gmail.com> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index b995ebc..a907736 100644 +--- a/meson.build ++++ b/meson.build +@@ -2021,7 +2021,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..82a7a5ad23 --- /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 546aa941d2fd42f69b3e2bd6625d65c145a5e265 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +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 <alex@linutronix.de> +--- + meson.build | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index a907736..53cffb5 100644 +--- a/meson.build ++++ b/meson.build +@@ -1019,7 +1019,8 @@ if cc.links('''#include <sys/syscall.h> + 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/files/0010-Do-not-hardcode-python-path-into-various-tools.patch index 697d63d5fe..4609f1fb2b 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/0010-Do-not-hardcode-python-path-into-various-tools.patch +++ b/meta/recipes-core/glib-2.0/files/0010-Do-not-hardcode-python-path-into-various-tools.patch @@ -1,7 +1,7 @@ -From b9160d951b9af647b97766c57295ca4f45cf9521 Mon Sep 17 00:00:00 2001 +From 20f64ba4b48e46cf238dc638dc3305036358122b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 3 Oct 2017 10:45:55 +0300 -Subject: [PATCH 10/10] Do not hardcode python path into various tools +Subject: [PATCH] Do not hardcode python path into various tools Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> @@ -12,35 +12,32 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 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 8050981..e693ef3 100644 +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@ +-#!@PYTHON@ +#!/usr/bin/env python3 # GDBus - GLib D-Bus Library # diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in -index 09e8408..b2f9d99 100755 +index aa5af43..56e8e2e 100755 --- a/gobject/glib-genmarshal.in +++ b/gobject/glib-genmarshal.in @@ -1,4 +1,4 @@ --#!/usr/bin/env @PYTHON@ +-#!@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 d4bfd11..051fce4 100755 +index e10b910..4b619f8 100755 --- a/gobject/glib-mkenums.in +++ b/gobject/glib-mkenums.in @@ -1,4 +1,4 @@ --#!/usr/bin/env @PYTHON@ +-#!@PYTHON@ +#!/usr/bin/env python3 # If the code below looks horrible and unpythonic, do not panic. # --- -2.14.1 - 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..a00703cef8 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/relocate-modules.patch @@ -0,0 +1,44 @@ +From 41470a56d9ae12912e3f2f9cfb0c126b4f91cd53 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +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 <ross.burton@intel.com> + +Port patch to 2.48 +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + 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 <dlfcn.h> + { + 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..5ede64fd59 --- /dev/null +++ b/meta/recipes-core/glib-2.0/files/skip-timeout.patch @@ -0,0 +1,29 @@ +From 18d6798ba0e4e15d63a63485b729b6ef1b6a4457 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +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 <ross.burton@arm.com> +--- + 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.82.1.bb b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.82.1.bb new file mode 100644 index 0000000000..acec7e9676 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.82.1.bb @@ -0,0 +1,6 @@ +require glib.inc +PACKAGES = "" +PACKAGECONFIG = "" + +inherit nopackages + diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch deleted file mode 100644 index 0ebf138d60..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch +++ /dev/null @@ -1,39 +0,0 @@ -From d250652782b65b071b7cc8f01f2db833df104e0e Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 16 Apr 2016 13:28:59 -0700 -Subject: [PATCH] Do not ignore return value of write() - -gcc warns about ignoring return value when compiling -with fortify turned on. - -assert when write() fails - -Upstream-Status: Submitted -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - glib/tests/unix.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/glib/tests/unix.c b/glib/tests/unix.c -index 9d55a6c..a07f945 100644 ---- a/glib/tests/unix.c -+++ b/glib/tests/unix.c -@@ -32,14 +32,15 @@ test_pipe (void) - GError *error = NULL; - int pipefd[2]; - char buf[1024]; -- gssize bytes_read; -+ gssize bytes_read, bytes_written; - gboolean res; - - res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error); - g_assert (res); - g_assert_no_error (error); - -- write (pipefd[1], "hello", sizeof ("hello")); -+ bytes_written = write (pipefd[1], "hello", sizeof ("hello")); -+ g_assert (bytes_written != -1 && "write() failed"); - memset (buf, 0, sizeof (buf)); - bytes_read = read (pipefd[0], buf, sizeof(buf) - 1); - g_assert_cmpint (bytes_read, >, 0); 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 97d0aff5d6..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 856045927b9ab391165c0ebabf401835f8439eab Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -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 <jussi.kukkonen@intel.com> -Upstream-Status: Inappropriate [OE specific] - ---- - gio/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/gio/Makefile.am b/gio/Makefile.am -index e14cad2..bf2bcc7 100644 ---- a/gio/Makefile.am -+++ b/gio/Makefile.am -@@ -835,7 +835,8 @@ gio.def: libgio-2.0.la - gio-2.0.lib: libgio-2.0.la gio.def - $(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@ - --bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings gio-launch-desktop -+bin_PROGRAMS = glib-compile-schemas glib-compile-resources gsettings gio-launch-desktop -+libexec_PROGRAMS = gio-querymodules - - glib_compile_resources_LDADD = libgio-2.0.la \ - $(top_builddir)/gobject/libgobject-2.0.la \ diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Revert-Use-absolute-paths-in-pkg-config-files.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Revert-Use-absolute-paths-in-pkg-config-files.patch deleted file mode 100644 index f0c5d84ba7..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-Revert-Use-absolute-paths-in-pkg-config-files.patch +++ /dev/null @@ -1,64 +0,0 @@ -From abc26aed7a28678dfcc20b21726a97c7c02ea73b Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <anuj.mittal@intel.com> -Date: Thu, 14 Feb 2019 14:55:15 +0800 -Subject: [PATCH] Revert "Use absolute paths in pkg-config files" - -This reverts commit e7a7c9b97776fa2a638d18ea3a931ba84e778f80. - -The glib pkgconfig files now contain absolute paths, but they're -target paths so when we used them from a sysroot it fails. Upstream -thinks that we should be setting -GLIB_MKENUMS=/path/to/sysroot/usr/bin/glib-mkenums but that really -doesn't scale. - -For now, we just revert the change to put absolute paths into -the sysroot. This should be re-evaluated when we move the recipe to use -meson. - -Upstream-Status: Inappropriate [Revert of an upstream commit] -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - gio-2.0.pc.in | 7 +++---- - glib-2.0.pc.in | 7 +++---- - 2 files changed, 6 insertions(+), 8 deletions(-) - -diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in -index d67e80839..526f0daa0 100644 ---- a/gio-2.0.pc.in -+++ b/gio-2.0.pc.in -@@ -5,11 +5,10 @@ includedir=@includedir@ - - datadir=@datadir@ - schemasdir=${datadir}/glib-2.0/schemas --bindir=@bindir@ - giomoduledir=@GIO_MODULE_DIR@ --glib_compile_schemas=${bindir}/glib-compile-schemas --glib_compile_resources=${bindir}/glib-compile-resources --gdbus_codegen=${bindir}/gdbus-codegen -+glib_compile_schemas=glib-compile-schemas -+glib_compile_resources=glib-compile-resources -+gdbus_codegen=gdbus-codegen - - Name: GIO - Description: glib I/O library -diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in -index 3c5ea81dc..275fc0163 100644 ---- a/glib-2.0.pc.in -+++ b/glib-2.0.pc.in -@@ -3,10 +3,9 @@ exec_prefix=@exec_prefix@ - libdir=@libdir@ - includedir=@includedir@ - --bindir=@bindir@ --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 - - Name: GLib - Description: C Utility Library --- -2.17.1 - diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch deleted file mode 100644 index 5060880926..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 70e462e070f8eb20b7660c1cf88271c0449e43cc Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <jussi.kukkonen@intel.com> -Date: Mon, 9 Nov 2015 11:07:27 +0200 -Subject: [PATCH] Enable more tests while cross-compiling - -Upstream disables a few tests while cross-compiling because their build requires -running other built binaries. This usually makes sense but in the cross-compile -case we can depend on glib-2.0-native. - -Upstream-Status: Inappropriate [OE specific] -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> ---- - gio/tests/Makefile.am | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am -index c4e7a92..633e85c 100644 ---- a/gio/tests/Makefile.am -+++ b/gio/tests/Makefile.am -@@ -583,10 +583,9 @@ test_programs += \ - endif - - # ----------------------------------------------------------------------------- --# The resources test is a bit more complicated, and we cannot build it when --# cross-compiling GIO because it requires running a binary... -+# The resources test is a bit more complicated, and requires glib-native -+# for running a binary - --if !CROSS_COMPILING - test_programs += resources - resources_SOURCES = resources.c - nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h -@@ -611,7 +610,11 @@ if !ENABLE_INSTALLED_TESTS - libresourceplugin_la_LDFLAGS += -rpath / - endif - -+if !CROSS_COMPILING - glib_compile_resources=$(top_builddir)/gio/glib-compile-resources -+else -+glib_compile_resources=glib-compile-resources -+endif - - test-generated.txt: test1.txt - $(AM_V_GEN) echo "Generated" > $@ && \ -@@ -632,7 +635,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) -- - - EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml - CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource --endif # !CROSS_COMPILING - - BUILT_SOURCES += giotypefuncs.inc - diff --git a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch deleted file mode 100644 index 59b891347d..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 1dd1e6ddca5deada049bac2e1ee1fe4ecc5342c5 Mon Sep 17 00:00:00 2001 -From: Martin Jansa <Martin.Jansa@gmail.com> -Date: Sat, 28 Apr 2012 18:24:50 +0200 -Subject: [PATCH 01/10] configure: use $host_alias-libtool instead of libtool - directly - -Poky renames libtool to $host_alias-libtool. -./$host_alias-libtool isn't created until after configure runs with -libtool >= 2.2.2 -so we can't call # it at this point. We can safely assume a version is -available -from PATH though - -Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com> -Rebased to glib-2.32.1 by Martin Jansa <Martin.Jansa@gmail.com> -Rebased to glib-2.31.20+ by Andre McCurdy <armccurdy@gmail.com> - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> - ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 6fa6eb0..b6f78a6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1428,9 +1428,9 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [ - LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" - dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness - echo "void glib_plugin_test(void) { }" > plugin.c -- ${SHELL} ./libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \ -+ ${SHELL} ./$host_alias-libtool --mode=compile --tag=CC ${CC} ${CFLAGS} \ - ${CPPFLAGS} -c -o plugin.lo plugin.c >/dev/null 2>&1 -- ${SHELL} ./libtool --mode=link --tag=CC ${CC} ${CFLAGS} \ -+ ${SHELL} ./$host_alias-libtool --mode=link --tag=CC ${CC} ${CFLAGS} \ - ${LDFLAGS} -module -o plugin.la -export-dynamic \ - -shrext ".o" -avoid-version plugin.lo \ - -rpath /dont/care >/dev/null 2>&1 --- -2.14.1 - 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 9ec011a095..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 43967e85b7a87f9c2e780504ef30f4c9bf56f8f5 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -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 <ross.burton@intel.com> - -Port patch to 2.48 -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> - ---- - gio/giomodule.c | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) - -diff --git a/gio/giomodule.c b/gio/giomodule.c -index 36c0cef..912e490 100644 ---- a/gio/giomodule.c -+++ b/gio/giomodule.c -@@ -40,6 +40,8 @@ - #include "gnetworkmonitor.h" - #ifdef G_OS_WIN32 - #include "gregistrysettingsbackend.h" -+#else -+#include <dlfcn.h> - #endif - #include <glib/gstdio.h> - -@@ -1099,7 +1101,15 @@ get_gio_module_dir (void) - #endif - g_free (install_dir); - #else -- module_dir = g_strdup (GIO_MODULE_DIR); -+ Dl_info info; -+ -+ if (dladdr (g_io_module_new, &info)) { -+ char *libdir = g_path_get_dirname (info.dli_fname); -+ module_dir = g_build_filename (libdir, "gio", "modules", NULL); -+ g_free (libdir); -+ } else { -+ module_dir = g_strdup (GIO_MODULE_DIR); -+ } - #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 5b85e8fabe..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh - -useradd glib2-test -su glib2-test -c gnome-desktop-testing-runner glib -userdel glib2-test diff --git a/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch b/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch deleted file mode 100644 index 7aa6217d69..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch +++ /dev/null @@ -1,22 +0,0 @@ -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 <raj.khem@gmail.com> -Upstream-Status: Pending -Index: glib-2.46.1/m4macros/glib-gettext.m4 -=================================================================== ---- glib-2.46.1.orig/m4macros/glib-gettext.m4 -+++ glib-2.46.1/m4macros/glib-gettext.m4 -@@ -243,6 +243,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_2.58.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb deleted file mode 100644 index 8aad570fa9..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.58.3.bb +++ /dev/null @@ -1,22 +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://configure-libtool.patch \ - file://run-ptest \ - file://uclibc_musl_translation.patch \ - file://Enable-more-tests-while-cross-compiling.patch \ - file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ - file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ - file://0001-Do-not-ignore-return-value-of-write.patch \ - file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ - file://0001-Revert-Use-absolute-paths-in-pkg-config-files.patch \ - " - -SRC_URI_append_class-native = " file://relocate-modules.patch" - -SRC_URI[md5sum] = "8058c7bde846dcffe5fa453eca366d73" -SRC_URI[sha256sum] = "8f43c31767e88a25da72b52a40f3301fefc49a665b56dc10ee7cc9565cbe7481" diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.82.1.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.82.1.bb new file mode 100644 index 0000000000..ef80cc47cf --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.82.1.bb @@ -0,0 +1,2 @@ +require glib.inc + diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index a186c1d9eb..0855e6eb00 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc @@ -4,12 +4,11 @@ HOMEPAGE = "https://developer.gnome.org/glib/" # pcre is under BSD; # docs/reference/COPYING is with a 'public domain'-like license! -LICENSE = "LGPLv2.1+ & BSD & PD" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://glib/glib.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ - file://gmodule/COPYING;md5=4fbd65380cdd255951079008b364516c \ - file://gmodule/gmodule.h;beginline=4;endline=17;md5=b88abb7f3ad09607e71cb9d530155906 \ - file://glib/pcre/pcre.h;beginline=8;endline=36;md5=3e2977dae4ad05217f58c446237298fc \ +LICENSE = "LGPL-2.1-or-later & BSD-3-Clause & PD" +LIC_FILES_CHKSUM = "file://COPYING;md5=41890f71f740302b785c27661123bff5 \ + file://glib/glib.h;beginline=4;endline=17;md5=72f7cc2847407f65d8981ef112e4e630 \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=41890f71f740302b785c27661123bff5 \ + file://gmodule/gmodule.h;beginline=4;endline=17;md5=72f7cc2847407f65d8981ef112e4e630 \ file://docs/reference/COPYING;md5=f51a5100c17af6bae00735cd791e1fcc" BUGTRACKER = "http://bugzilla.gnome.org" SECTION = "libs" @@ -22,84 +21,82 @@ DEPENDS = "glib-2.0-native \ virtual/libintl \ virtual/libiconv \ libffi \ - zlib \ - ${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus', '', d)}" + libpcre2 \ + zlib" PACKAGES += "${PN}-codegen ${PN}-utils" LEAD_SONAME = "libglib-2.0.*" -inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache manpages distro_features_check - -REQUIRED_DISTRO_FEATURES_libc-glibc = "${@'libc-charsets libc-locale-code libc-locales' if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d) else ''}" +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 ??= "system-pcre libmount" -# To use the system pcre it must be configured with --enable-unicode-properties -PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre" -PACKAGECONFIG[libmount] = "--enable-libmount,--disable-libmount,util-linux" -PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native" -PACKAGECONFIG[libelf] = "--enable-libelf,--disable-libelf,elfutils" +GIDOCGEN_MESON_OPTION = "documentation" -CORECONF = "--disable-dtrace --disable-fam --disable-systemtap" +PACKAGECONFIG ??= "libmount \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'introspection', '', d)} \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG:class-native = "" -PRINTF = "--enable-included-printf=no" -PRINTF_darwin = "--enable-included-printf=yes" -PRINTF_mingw32 = "--enable-included-printf=yes" -EXTRA_OECONF = "${PRINTF} ${CORECONF}" -EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux" +PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux" +PACKAGECONFIG[manpages] = "-Dman-pages=enabled, -Dman-pages=disabled, 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" -# Tell configure that we'll have dbus-daemon on the target for the tests -EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' ac_cv_prog_DBUS_DAEMON=dbus-daemon', '', d)}" +EXTRA_OEMESON = "-Ddtrace=false -Dsystemtap=false" +EXTRA_OEMESON:append:class-target = " ${@'-Dgir_dir_prefix=${libdir}' if d.getVar('MULTILIBS') else ''}" -do_configure_prepend() { +do_configure:prepend() { sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in } -FILES_${PN} = "${libdir}/lib*${SOLIBS} \ +FILES:${PN} = "${libdir}/lib*${SOLIBS} \ ${libdir}/gio \ ${libexecdir}/*gio-querymodules \ - ${datadir}/glib-2.0/schemas" -FILES_${PN}-dev += "${libdir}/glib-2.0/include \ + ${libexecdir}/*gio-launch-desktop \ + ${datadir}/glib-2.0/dtds \ + ${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 \ - ${bindir}/glib-genmarshal \ - ${bindir}/glib-gettextize \ - ${bindir}/glib-mkenums \ - ${bindir}/glib-compile-resources \ ${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 \ +FILES:${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb" +FILES:${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \ ${bindir}/gdbus-codegen" -FILES_${PN}-utils = "${bindir}/*" +FILES:${PN}-utils = "${bindir}/*" SHAREDMIMEDEP = "shared-mime-info" -SHAREDMIMEDEP_class-native = "" +SHAREDMIMEDEP:class-native = "" # When cross compiling for Windows we don't want to include this -SHAREDMIMEDEP_mingw32 = "" +SHAREDMIMEDEP:mingw32 = "" -RRECOMMENDS_${PN} += "${SHAREDMIMEDEP}" +RRECOMMENDS:${PN} += "${SHAREDMIMEDEP}" -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" # Valgrind runtime detection works using hand-written assembly, which # doesn't support mips16e -CPPFLAGS_append_class-target_mips16e = " -DNVALGRIND=1" +CPPFLAGS:append:class-target:mips16e = " -DNVALGRIND=1" # GLib generally requires gettext to be present so for USE_NLS to yes. For # native builds as i18n is disabled globally we have to add a gettext-native dependency. -USE_NLS_class-target = "yes" -USE_NLS_class-nativesdk = "yes" -DEPENDS_append_class-native = " gettext-native" +USE_NLS:class-target = "yes" +USE_NLS:class-nativesdk = "yes" +DEPENDS:append:class-native = " gettext-native" EXEEXT = "" -EXEEXT_mingw32 = ".exe" +EXEEXT:mingw32 = ".exe" -do_install_append () { +do_install:append () { if [ -f ${D}${bindir}/gtester-report ]; then sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|' fi @@ -117,9 +114,16 @@ do_install_append () { if test "x${MLPREFIX}" != "x"; then mv ${D}${libexecdir}/gio-querymodules${EXEEXT} ${D}${libexecdir}/${MLPREFIX}gio-querymodules${EXEEXT} fi + # Autotools does this, meson does not + mkdir -p ${D}${libdir}/gio/modules +} + +do_install:append:class-native () { + # Link gio-querymodules into ${bindir} as otherwise tools like meson won't find it + ln -rs ${D}${libexecdir}/gio-querymodules ${D}${bindir} } -do_install_append_class-target () { +do_install:append:class-target () { # Tests are only installed on targets, not native builds. Separating this out # keeps glib-2.0-native from depending on DISTRO_FEATURES if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then @@ -127,15 +131,38 @@ do_install_append_class-target () { rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test fi fi + if [ -f ${D}${datadir}/installed-tests/glib/static-link.test ]; then + if test "x${MLPREFIX}" != "x"; then + mv ${D}${datadir}/installed-tests/glib/static-link.test ${D}${datadir}/installed-tests/glib/${MLPREFIX}static-link.test + fi + fi + # https://gitlab.gnome.org/GNOME/glib/-/issues/2810 + rm -f ${D}${datadir}/installed-tests/glib/thread-pool-slow.test +} +do_install:append:class-target:libc-musl () { + # Remove failing tests on musl libc systems, this helps set baseline for musl testing + # they remain to be rootcaused and fixed but marked known failures here. + for t in convert.test collate.test gdatetime.test date.test converter-stream.test option-context.test; do + rm -rf ${D}${datadir}/installed-tests/glib/$t + done +} +# As we do not build python3 for windows, makes no sense to ship the script that's using it +do_install:append:mingw32() { + rm -f ${D}${bindir}/gtester-report } -CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml" -CODEGEN_PYTHON_RDEPENDS_mingw32 = "" +CODEGEN_PYTHON_RDEPENDS = "python3 python3-packaging python3-xml" +CODEGEN_PYTHON_RDEPENDS:mingw32 = "" -RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" +RDEPENDS:${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}" -RDEPENDS_${PN}-ptest += "\ +RDEPENDS:${PN}-ptest += "${PN}-utils" + +RDEPENDS:${PN}-ptest += "\ + coreutils \ + libgcc \ dbus \ + desktop-file-utils \ gnome-desktop-testing \ tzdata \ tzdata-americas \ @@ -143,9 +170,27 @@ RDEPENDS_${PN}-ptest += "\ tzdata-europe \ tzdata-posix \ shared-mime-info \ + ${PN}-locale-ja \ + ${PN}-locale-fr \ + ${PN}-locale-el \ + ${PN}-locale-hr \ + ${PN}-locale-lt \ + ${PN}-locale-pl \ + ${PN}-locale-ru \ + ${PN}-locale-th \ + python3-core \ + python3-modules \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-dbusmock', '', d)} \ + ${PN}-codegen \ + locale-base-de-de \ + locale-base-es-es \ + locale-base-en-gb \ + locale-base-en-us \ + locale-base-fr-fr \ + locale-base-ru-ru \ " -RDEPENDS_${PN}-ptest_append_libc-glibc = "\ +RDEPENDS:${PN}-ptest:append:libc-glibc = "\ glibc-gconv-utf-16 \ glibc-charmap-utf-8 \ glibc-gconv-cp1255 \ @@ -157,16 +202,64 @@ RDEPENDS_${PN}-ptest_append_libc-glibc = "\ glibc-gconv-iso8859-15 \ glibc-charmap-invariant \ glibc-localedata-translit-cjk-variants \ - locale-base-tr-tr \ locale-base-lt-lt \ locale-base-ja-jp.euc-jp \ locale-base-fa-ir \ - locale-base-ru-ru \ - locale-base-de-de \ locale-base-hr-hr \ locale-base-el-gr \ - locale-base-fr-fr \ - locale-base-es-es \ - locale-base-en-gb \ locale-base-pl-pl \ + 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://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://0010-Do-not-hardcode-python-path-into-various-tools.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] = "478634440bf52ee4ec4428d558787398c0be6b043c521beb308334b3db4489a6" + +# 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) +} |