diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-05-09 19:23:21 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-22 10:53:47 +0100 |
commit | e805f3c6124e56e90176aace7b989dff9ae2c095 (patch) | |
tree | 44ccd9f2dd3c8c64c044f952fd6638e2f4ecc525 /meta | |
parent | 35e5d29a7d654fc79bdb898d0f1fb277270dbfd5 (diff) | |
download | poky-e805f3c6124e56e90176aace7b989dff9ae2c095.tar.gz |
glib-2.0: upgrade 2.74.6 -> 2.76.2
Drop backports.
Refactor relocate-modules.patch; upstream has implemented the same
logic, but made it os x only - we can simply drop those ifdef guards:
https://gitlab.gnome.org/GNOME/glib/-/commit/af83c6571e47d06468b8162dd29ad57bcf4967a8
(From OE-Core rev: 5627068ab335229cef6fb295f995e8547d591944)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch | 50 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch | 48 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch | 77 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch | 31 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch | 47 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.76.2.bb (renamed from meta/recipes-core/glib-2.0/glib-2.0_2.74.6.bb) | 6 |
6 files changed, 22 insertions, 237 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch deleted file mode 100644 index 57ada66907..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 3c56ff21b9a5fe18f9cec9b97ae1788fdf5d563e Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@arm.com> | ||
3 | Date: Tue, 6 Jul 2021 19:26:03 +0100 | ||
4 | Subject: [PATCH] gio/tests/g-file-info: don't assume million-in-one events | ||
5 | |||
6 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2990] | ||
7 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
8 | |||
9 | don't happen | ||
10 | |||
11 | The access and creation time tests create a file, gets the time in | ||
12 | seconds, then gets the time in microseconds and assumes that the | ||
13 | difference between the two has to be above 0. | ||
14 | |||
15 | As rare as this may be, it can happen: | ||
16 | |||
17 | $ stat g-file-info-test-50A450 -c %y | ||
18 | 2021-07-06 18:24:56.000000767 +0100 | ||
19 | |||
20 | Change the test to simply assert that the difference not negative to | ||
21 | handle this case. | ||
22 | |||
23 | This is the same fix as 289f8b, but that was just modification time. | ||
24 | |||
25 | --- | ||
26 | gio/tests/g-file-info.c | 4 ++-- | ||
27 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
28 | |||
29 | diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c | ||
30 | index d9ad045..c9b12b0 100644 | ||
31 | --- a/gio/tests/g-file-info.c | ||
32 | +++ b/gio/tests/g-file-info.c | ||
33 | @@ -307,7 +307,7 @@ test_g_file_info_access_time (void) | ||
34 | g_assert_nonnull (dt_usecs); | ||
35 | |||
36 | ts = g_date_time_difference (dt_usecs, dt); | ||
37 | - g_assert_cmpint (ts, >, 0); | ||
38 | + g_assert_cmpint (ts, >=, 0); | ||
39 | g_assert_cmpint (ts, <, G_USEC_PER_SEC); | ||
40 | |||
41 | /* Try again with nanosecond precision. */ | ||
42 | @@ -442,7 +442,7 @@ test_g_file_info_creation_time (void) | ||
43 | g_assert_nonnull (dt_usecs); | ||
44 | |||
45 | ts = g_date_time_difference (dt_usecs, dt); | ||
46 | - g_assert_cmpint (ts, >, 0); | ||
47 | + g_assert_cmpint (ts, >=, 0); | ||
48 | g_assert_cmpint (ts, <, G_USEC_PER_SEC); | ||
49 | |||
50 | /* Try again with nanosecond precision. */ | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch deleted file mode 100644 index db08b5af55..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From fdbffaea2fa85c203cc6aacb5734acac65aeaa19 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Fri, 11 Nov 2022 13:12:42 +0100 | ||
4 | Subject: [PATCH] tests/meson.build: do not use can_run_host_binaries() | ||
5 | |||
6 | can_run_host_binaries() returns true even when cross compiling, | ||
7 | if there is an executable wrapper defined that can run | ||
8 | cross-binaries under some kind of emulation. | ||
9 | |||
10 | Unfortunately, custom_target() will not use the wrapper | ||
11 | and will attempt to execute the command directly. Until | ||
12 | this is addressed in meson upstream, we have to disable | ||
13 | these targets in cross scenarios. | ||
14 | |||
15 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3067] | ||
16 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
17 | |||
18 | --- | ||
19 | gio/tests/meson.build | 2 +- | ||
20 | glib/tests/meson.build | 2 +- | ||
21 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/gio/tests/meson.build b/gio/tests/meson.build | ||
24 | index 49cfa25ce..ea59656f9 100644 | ||
25 | --- a/gio/tests/meson.build | ||
26 | +++ b/gio/tests/meson.build | ||
27 | @@ -652,7 +652,7 @@ if installed_tests_enabled | ||
28 | endforeach | ||
29 | endif | ||
30 | |||
31 | -if meson.can_run_host_binaries() | ||
32 | +if not meson.is_cross_build() | ||
33 | |||
34 | compiler_type = '--compiler=@0@'.format(cc.get_id()) | ||
35 | |||
36 | diff --git a/glib/tests/meson.build b/glib/tests/meson.build | ||
37 | index 69508178e..e4f75f302 100644 | ||
38 | --- a/glib/tests/meson.build | ||
39 | +++ b/glib/tests/meson.build | ||
40 | @@ -411,7 +411,7 @@ executable('testing-helper', 'testing-helper.c', | ||
41 | ) | ||
42 | |||
43 | # some testing of gtester functionality | ||
44 | -if meson.can_run_host_binaries() and host_system != 'windows' | ||
45 | +if not meson.is_cross_build() and host_system != 'windows' | ||
46 | xmllint = find_program('xmllint', required: false) | ||
47 | if xmllint.found() | ||
48 | tmpsample_xml = custom_target('tmpsample.xml', | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch b/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch deleted file mode 100644 index 63cbf90ab2..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/cpp-null.patch +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | From 0ca5254c5d92aec675b76b4bfa72a6885cde6066 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net> | ||
3 | Date: Sat, 29 Oct 2022 04:30:52 +0200 | ||
4 | Subject: [PATCH] glib/gmacros: Always define NULL as nullptr in C++11 and | ||
5 | newer | ||
6 | |||
7 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/0ca5254c5d92aec675b76b4bfa72a6885cde6066] | ||
8 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
9 | --- | ||
10 | glib/gmacros.h | 9 ++++++++- | ||
11 | glib/tests/cxx.cpp | 13 ------------- | ||
12 | 2 files changed, 8 insertions(+), 14 deletions(-) | ||
13 | |||
14 | diff --git a/glib/gmacros.h b/glib/gmacros.h | ||
15 | index 5302841105..9fe8270822 100644 | ||
16 | --- a/glib/gmacros.h | ||
17 | +++ b/glib/gmacros.h | ||
18 | @@ -870,10 +870,17 @@ | ||
19 | */ | ||
20 | #ifndef NULL | ||
21 | # ifdef __cplusplus | ||
22 | -# define NULL (0L) | ||
23 | +# if __cplusplus >= 201103L | ||
24 | +# define NULL (nullptr) | ||
25 | +# else | ||
26 | +# define NULL (0L) | ||
27 | +# endif /* __cplusplus >= 201103L */ | ||
28 | # else /* !__cplusplus */ | ||
29 | # define NULL ((void*) 0) | ||
30 | # endif /* !__cplusplus */ | ||
31 | +#elif defined (__cplusplus) && __cplusplus >= 201103L | ||
32 | +# undef NULL | ||
33 | +# define NULL (nullptr) | ||
34 | #endif | ||
35 | |||
36 | #ifndef FALSE | ||
37 | diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp | ||
38 | index 6ac60791c8..045457c6e2 100644 | ||
39 | --- a/glib/tests/cxx.cpp | ||
40 | +++ b/glib/tests/cxx.cpp | ||
41 | @@ -34,21 +34,12 @@ test_typeof (void) | ||
42 | MyObject *obj3 = g_atomic_pointer_get (&obj2); | ||
43 | g_assert_true (obj3 == obj); | ||
44 | |||
45 | -#if __cplusplus >= 201103L | ||
46 | - MyObject *obj4 = nullptr; | ||
47 | -#else | ||
48 | MyObject *obj4 = NULL; | ||
49 | -#endif | ||
50 | g_atomic_pointer_set (&obj4, obj3); | ||
51 | g_assert_true (obj4 == obj); | ||
52 | |||
53 | -#if __cplusplus >= 201103L | ||
54 | - MyObject *obj5 = nullptr; | ||
55 | - g_atomic_pointer_compare_and_exchange (&obj5, nullptr, obj4); | ||
56 | -#else | ||
57 | MyObject *obj5 = NULL; | ||
58 | g_atomic_pointer_compare_and_exchange (&obj5, NULL, obj4); | ||
59 | -#endif | ||
60 | g_assert_true (obj5 == obj); | ||
61 | |||
62 | MyObject *obj6 = g_steal_pointer (&obj5); | ||
63 | @@ -195,11 +186,7 @@ test_steal_pointer (void) | ||
64 | int | ||
65 | main (int argc, char *argv[]) | ||
66 | { | ||
67 | -#if __cplusplus >= 201103L | ||
68 | - g_test_init (&argc, &argv, nullptr); | ||
69 | -#else | ||
70 | g_test_init (&argc, &argv, NULL); | ||
71 | -#endif | ||
72 | |||
73 | g_test_add_func ("/C++/typeof", test_typeof); | ||
74 | g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange); | ||
75 | -- | ||
76 | GitLab | ||
77 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch b/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch deleted file mode 100644 index 763d5ce539..0000000000 --- a/meta/recipes-core/glib-2.0/glib-2.0/cpp-null2.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 7dc19632f3115e3f517c6bc80436fe72c1dcdeb4 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net> | ||
3 | Date: Sat, 29 Oct 2022 04:16:00 +0200 | ||
4 | Subject: [PATCH] glib/tests/cxx: Ensure NULL is always casted to a pointer | ||
5 | type | ||
6 | |||
7 | Otherwise it may not be recognized as valid sentinel | ||
8 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/7dc19632f3115e3f517c6bc80436fe72c1dcdeb4] | ||
9 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
10 | --- | ||
11 | glib/tests/cxx.cpp | 4 ++++ | ||
12 | 1 file changed, 4 insertions(+) | ||
13 | |||
14 | diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp | ||
15 | index 045457c6e2..aa5e0cb576 100644 | ||
16 | --- a/glib/tests/cxx.cpp | ||
17 | +++ b/glib/tests/cxx.cpp | ||
18 | @@ -186,7 +186,11 @@ test_steal_pointer (void) | ||
19 | int | ||
20 | main (int argc, char *argv[]) | ||
21 | { | ||
22 | +#if __cplusplus >= 201103L | ||
23 | g_test_init (&argc, &argv, NULL); | ||
24 | +#else | ||
25 | + g_test_init (&argc, &argv, static_cast<void *>(NULL)); | ||
26 | +#endif | ||
27 | |||
28 | g_test_add_func ("/C++/typeof", test_typeof); | ||
29 | g_test_add_func ("/C++/atomic-pointer-compare-and-exchange", test_atomic_pointer_compare_and_exchange); | ||
30 | -- | ||
31 | GitLab | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch index ae6881b61e..3dba599fc0 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +++ b/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From a3cdf17643bf33d532ec269913974195e136b7fc Mon Sep 17 00:00:00 2001 | 1 | From 38e401969a2ff8269919cbeacec733a67f041735 Mon Sep 17 00:00:00 2001 |
2 | From: Ross Burton <ross.burton@intel.com> | 2 | From: Ross Burton <ross.burton@intel.com> |
3 | Date: Fri, 11 Mar 2016 15:35:55 +0000 | 3 | Date: Fri, 11 Mar 2016 15:35:55 +0000 |
4 | Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds | 4 | Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds |
@@ -13,38 +13,33 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> | |||
13 | 13 | ||
14 | Port patch to 2.48 | 14 | Port patch to 2.48 |
15 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | 15 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> |
16 | |||
17 | --- | 16 | --- |
18 | gio/giomodule.c | 12 +++++++++++- | 17 | gio/giomodule.c | 5 ----- |
19 | 1 file changed, 11 insertions(+), 1 deletion(-) | 18 | 1 file changed, 5 deletions(-) |
20 | 19 | ||
21 | diff --git a/gio/giomodule.c b/gio/giomodule.c | 20 | diff --git a/gio/giomodule.c b/gio/giomodule.c |
22 | index f5dbb45..c926e77 100644 | 21 | index 11ce7d8..cc27ecd 100644 |
23 | --- a/gio/giomodule.c | 22 | --- a/gio/giomodule.c |
24 | +++ b/gio/giomodule.c | 23 | +++ b/gio/giomodule.c |
25 | @@ -58,6 +58,8 @@ | 24 | @@ -1271,9 +1271,6 @@ get_gio_module_dir (void) |
26 | #ifdef G_OS_WIN32 | ||
27 | #include "gregistrysettingsbackend.h" | ||
28 | #include "giowin32-priv.h" | ||
29 | +#else | ||
30 | +#include <dlfcn.h> | ||
31 | #endif | ||
32 | #include <glib/gstdio.h> | ||
33 | |||
34 | @@ -1261,7 +1263,15 @@ get_gio_module_dir (void) | ||
35 | NULL); | ||
36 | g_free (install_dir); | 25 | g_free (install_dir); |
37 | #else | 26 | #else |
38 | - module_dir = g_strdup (GIO_MODULE_DIR); | 27 | module_dir = g_strdup (GIO_MODULE_DIR); |
39 | + Dl_info info; | 28 | -#ifdef __APPLE__ |
40 | + | 29 | -#include "TargetConditionals.h" |
41 | + if (dladdr (g_io_module_new, &info)) { | 30 | -#if TARGET_OS_OSX |
42 | + char *libdir = g_path_get_dirname (info.dli_fname); | 31 | #include <dlfcn.h> |
43 | + module_dir = g_build_filename (libdir, "gio", "modules", NULL); | 32 | { |
44 | + g_free (libdir); | 33 | g_autofree gchar *path = NULL; |
45 | + } else { | 34 | @@ -1292,8 +1289,6 @@ get_gio_module_dir (void) |
46 | + module_dir = g_strdup (GIO_MODULE_DIR); | 35 | } |
47 | + } | 36 | } |
37 | } | ||
38 | -#endif | ||
39 | -#endif | ||
48 | #endif | 40 | #endif |
49 | } | 41 | } |
50 | 42 | ||
43 | -- | ||
44 | 2.30.2 | ||
45 | |||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.74.6.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.76.2.bb index 5b79ae481c..224f2c262e 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.74.6.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.76.2.bb | |||
@@ -14,14 +14,10 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | |||
14 | file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ | 14 | file://0001-Do-not-write-bindir-into-pkg-config-files.patch \ |
15 | file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ | 15 | file://0001-meson-Run-atomics-test-on-clang-as-well.patch \ |
16 | file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ | 16 | file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \ |
17 | file://0001-gio-tests-g-file-info-don-t-assume-million-in-one-ev.patch \ | ||
18 | file://0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch \ | ||
19 | file://cpp-null.patch \ | ||
20 | file://cpp-null2.patch \ | ||
21 | " | 17 | " |
22 | SRC_URI:append:class-native = " file://relocate-modules.patch" | 18 | SRC_URI:append:class-native = " file://relocate-modules.patch" |
23 | 19 | ||
24 | SRC_URI[sha256sum] = "069cf7e51cd261eb163aaf06c8d1754c6835f31252180aff5814e5afc7757fbc" | 20 | SRC_URI[sha256sum] = "24f3847857b1d8674cdb0389a36edec0f13c666cd3ce727ecd340eb9da8aca9e" |
25 | 21 | ||
26 | # Find any meson cross files in FILESPATH that are relevant for the current | 22 | # Find any meson cross files in FILESPATH that are relevant for the current |
27 | # build (using siteinfo) and add them to EXTRA_OEMESON. | 23 | # build (using siteinfo) and add them to EXTRA_OEMESON. |