diff options
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf')
9 files changed, 111 insertions, 311 deletions
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch deleted file mode 100644 index e461404918..0000000000 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch +++ /dev/null @@ -1,38 +0,0 @@ -From be8a47e0c21e5577d4f5669d339dfec6299b25be Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 14 Feb 2019 18:06:25 +0100 -Subject: [PATCH] Generate loaders.cache using a native tool when - cross-compiling - -Otherwise meson would attempt to run a target binary. - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - gdk-pixbuf/meson.build | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build -index 5cddbec..78c8bd3 100644 ---- a/gdk-pixbuf/meson.build -+++ b/gdk-pixbuf/meson.build -@@ -324,8 +324,16 @@ if not meson.is_cross_build() - build_by_default: true) - loaders_dep = declare_dependency(sources: [ loaders_cache ]) - else -- loaders_cache = [] -- loaders_dep = declare_dependency() -+ loaders_cache = custom_target('loaders.cache', -+ output: 'loaders.cache', -+ capture: true, -+ command: [ -+ 'gdk-pixbuf-query-loaders', -+ dynamic_loaders, -+ ], -+ depends: dynamic_loaders_dep, -+ build_by_default: true) -+ loaders_dep = declare_dependency(sources: [ loaders_cache ]) - endif - - pkgconfig = import('pkgconfig') diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch deleted file mode 100644 index 110b32a490..0000000000 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8c7ced988def52654946458a3779e383b27f14f7 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 14 Feb 2019 17:56:10 +0100 -Subject: [PATCH] Work-around thumbnailer cross-compile failure - -Install gdk-pixbuf-print-mime-types that's needed for thumbnail -metadata generation. - -The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057 - -Upstream-Status: Inappropriate [workaround] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - thumbnailer/meson.build | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build -index e801144..aaafec8 100644 ---- a/thumbnailer/meson.build -+++ b/thumbnailer/meson.build -@@ -10,6 +10,7 @@ executable('gdk-pixbuf-thumbnailer', - gdk_pixbuf_print_mime_types = executable('gdk-pixbuf-print-mime-types', - 'gdk-pixbuf-print-mime-types.c', - c_args: common_cflags, -+ install: true, - dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ]) - - custom_target('thumbnailer', diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch new file mode 100644 index 0000000000..24edda8102 --- /dev/null +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch @@ -0,0 +1,66 @@ +From 325a4cde99a00b84116ab7111d27e6973f3c5026 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Thu, 26 Jan 2023 20:29:46 +0100 +Subject: [PATCH] meson.build: allow (a subset of) tests in cross compile + settings + +There is no need to completely disable tests: most of them +do not require running target executables at build time, +and so can be built and installed. + +This requires inserting a couple of specific guards around +items that do require running target executables. + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/150] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + meson.build | 6 +++--- + tests/meson.build | 10 ++++++---- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/meson.build b/meson.build +index 3eb3fcc..dc7e790 100644 +--- a/meson.build ++++ b/meson.build +@@ -390,10 +390,10 @@ subdir('gdk-pixbuf') + # i18n + subdir('po') + ++if get_option('tests') ++ subdir('tests') ++endif + if not meson.is_cross_build() +- if get_option('tests') +- subdir('tests') +- endif + subdir('thumbnailer') + endif + +diff --git a/tests/meson.build b/tests/meson.build +index 3781066..911b5fb 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -4,7 +4,7 @@ + # gdk-pixbuf-pixdata from build directory because it needs all DLL locations in + # $PATH. Ideally we should use gnome.compile_resources() and let Meson deal with + # this problem: See https://github.com/mesonbuild/meson/issues/8266. +-if enabled_loaders.contains('png') and host_system != 'windows' ++if enabled_loaders.contains('png') and host_system != 'windows' and not meson.is_cross_build() + # Resources; we cannot use gnome.compile_resources() here, because we need to + # override the environment in order to use the utilities we just built instead + # of the system ones +@@ -164,9 +164,11 @@ endif + test_deps = gdk_pixbuf_deps + [ gdkpixbuf_dep, ] + test_args = [ '-k' ] + test_env = environment() +-test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) +-test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) +-test_env.set('GDK_PIXBUF_MODULE_FILE', loaders_cache.full_path()) ++if not meson.is_cross_build() ++ test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) ++ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) ++ test_env.set('GDK_PIXBUF_MODULE_FILE', loaders_cache.full_path()) ++endif + + foreach test_name, test_data: installed_tests + test_sources = [ test_name + '.c', 'test-common.c' ] diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch deleted file mode 100644 index a9c7600eb3..0000000000 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 2d1b65bd1272ad63b7fbd4babd9a8e8c296d15b5 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 22 Feb 2019 13:22:06 +0100 -Subject: [PATCH] (target only) Work-around thumbnailer and pixdata - cross-compile failure - -Use native gdk-pixbuf-print-mime-types and gdk-pixbuf-pixdata -when generating the thumbnail metadata and resources. - -This works but the mime types will come from native -loader.cache (which will only contain in-tree loaders), not from the -target loader.cache. - -The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057 - -Upstream-Status: Inappropriate [workaround] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - build-aux/gen-thumbnailer.py | 2 -- - tests/meson.build | 11 +++++++++-- - thumbnailer/meson.build | 5 +---- - 3 files changed, 10 insertions(+), 8 deletions(-) - -diff --git a/build-aux/gen-thumbnailer.py b/build-aux/gen-thumbnailer.py -index 05ac821..c5b99ab 100644 ---- a/build-aux/gen-thumbnailer.py -+++ b/build-aux/gen-thumbnailer.py -@@ -20,8 +20,6 @@ argparser.add_argument('output', help='Output file') - args = argparser.parse_args() - - newenv = os.environ.copy() --newenv['GDK_PIXBUF_PIXDATA'] = args.pixdata --newenv['GDK_PIXBUF_MODULE_FILE'] = args.loaders - # 'nt': NT-based Windows, see https://docs.python.org/3/library/os.html - if os.name == 'nt': - gdk_pixbuf_dll_buildpath = os.path.dirname(args.pixdata) -diff --git a/tests/meson.build b/tests/meson.build -index 8ed7cc1..e011b77 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -1,12 +1,19 @@ - # Resources; we cannot use gnome.compile_resources() here, because we need to - # override the environment in order to use the utilities we just built instead - # of the system ones -+ -+if not meson.is_cross_build() -+pixdata_binary = gdk_pixbuf_pixdata.full_path() -+else -+pixdata_binary = 'gdk-pixbuf-pixdata' -+endif -+ - resources_c = custom_target('resources.c', - input: 'resources.gresource.xml', - output: 'resources.c', - command: [ - gen_resources, -- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()), -+ '--pixdata=@0@'.format(pixdata_binary), - '--loaders=@0@'.format(loaders_cache.full_path()), - '--sourcedir=@0@'.format(meson.current_source_dir()), - '--source', -@@ -24,7 +31,7 @@ resources_h = custom_target('resources.h', - output: 'resources.h', - command: [ - gen_resources, -- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()), -+ '--pixdata=@0@'.format(pixdata_binary), - '--loaders=@0@'.format(loaders_cache.full_path()), - '--sourcedir=@0@'.format(meson.current_source_dir()), - '--header', -diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build -index aaafec8..71bd61b 100644 ---- a/thumbnailer/meson.build -+++ b/thumbnailer/meson.build -@@ -18,9 +18,7 @@ custom_target('thumbnailer', - output: 'gdk-pixbuf-thumbnailer.thumbnailer', - command: [ - gen_thumbnailer, -- '--printer=@0@'.format(gdk_pixbuf_print_mime_types.full_path()), -- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()), -- '--loaders=@0@'.format(loaders_cache.full_path()), -+ '--printer=gdk-pixbuf-print-mime-types', - '--bindir=@0@'.format(gdk_pixbuf_bindir), - '@INPUT@', - '@OUTPUT@', -@@ -28,7 +26,6 @@ custom_target('thumbnailer', - depends: [ - gdk_pixbuf_print_mime_types, - gdk_pixbuf_pixdata, -- loaders_cache, - ], - install: true, - install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers')) diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0004-Do-not-run-tests-when-building.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0004-Do-not-run-tests-when-building.patch deleted file mode 100644 index 96c546f271..0000000000 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0004-Do-not-run-tests-when-building.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3c4a6c147ae8a0962ba9194373d8a41d14eed44f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 22 Feb 2019 13:23:55 +0100 -Subject: [PATCH] Do not run tests when building - -Upstream-Status: Inappropriate [cross-compile specific] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - tests/meson.build | 17 ----------------- - 1 file changed, 17 deletions(-) - -diff --git a/tests/meson.build b/tests/meson.build -index 4fa3fbc..6ef7884 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -138,23 +138,6 @@ foreach t: installed_tests - install_dir: installed_test_bindir, - ) - -- # Two particularly slow tests -- if test_suites.contains('slow') -- timeout = 300 -- else -- timeout = 30 -- endif -- -- test(test_name, test_bin, -- suite: test_suites, -- args: [ '-k', '--tap' ], -- env: [ -- 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), -- 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), -- 'GDK_PIXBUF_MODULE_FILE=@0@'.format(loaders_cache.full_path()), -- ], -- timeout: timeout, -- ) - endforeach - - executable('pixbuf-read', diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch deleted file mode 100644 index 0fe13a387a..0000000000 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 1a532e090c558a830de9503f56e23414e880bb95 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 5 Jun 2019 14:17:55 +0200 -Subject: [PATCH] Build thumbnailer and tests also in cross builds. - -Upstream-Status: Inappropriate [relies on oe-core specific hacks] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - meson.build | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/meson.build b/meson.build -index d104cea..7acb88a 100644 ---- a/meson.build -+++ b/meson.build -@@ -397,10 +397,8 @@ endif - # i18n - subdir('po') - --if not meson.is_cross_build() -- subdir('tests') -- subdir('thumbnailer') --endif -+subdir('tests') -+subdir('thumbnailer') - - # Documentation - subdir('docs') diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch index 25410b11ea..3b4bf62861 100644 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch @@ -1,4 +1,4 @@ -From f00603d58d844422363b896ea7d07aaf48ddaa66 Mon Sep 17 00:00:00 2001 +From f78ab4edaee5f62663a9a4bcfa56e5c524da4474 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@intel.com> Date: Tue, 1 Apr 2014 17:23:36 +0100 Subject: [PATCH] gdk-pixbuf: add an option so that loader errors are fatal @@ -6,18 +6,17 @@ Subject: [PATCH] gdk-pixbuf: add an option so that loader errors are fatal If an environment variable is specified set the return value from main() to non-zero if the loader had errors (missing libraries, generally). -Upstream-Status: Pending +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/144] Signed-off-by: Ross Burton <ross.burton@intel.com> - --- gdk-pixbuf/queryloaders.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c -index 312aa78..b813d99 100644 +index baa9a5c..9b6fa89 100644 --- a/gdk-pixbuf/queryloaders.c +++ b/gdk-pixbuf/queryloaders.c -@@ -212,7 +212,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info) +@@ -216,7 +216,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info) g_string_append_c (contents, '\n'); } @@ -26,7 +25,7 @@ index 312aa78..b813d99 100644 query_module (GString *contents, const char *dir, const char *file) { char *path; -@@ -221,6 +221,7 @@ query_module (GString *contents, const char *dir, const char *file) +@@ -225,6 +225,7 @@ query_module (GString *contents, const char *dir, const char *file) void (*fill_vtable) (GdkPixbufModule *module); gpointer fill_info_ptr; gpointer fill_vtable_ptr; @@ -34,7 +33,7 @@ index 312aa78..b813d99 100644 if (g_path_is_absolute (file)) path = g_strdup (file); -@@ -270,10 +271,13 @@ query_module (GString *contents, const char *dir, const char *file) +@@ -274,10 +275,13 @@ query_module (GString *contents, const char *dir, const char *file) g_module_error()); else g_fprintf (stderr, "Cannot load loader %s\n", path); @@ -47,8 +46,8 @@ index 312aa78..b813d99 100644 + return ret; } - #ifdef G_OS_WIN32 -@@ -314,6 +318,7 @@ int main (int argc, char **argv) + #if defined(G_OS_WIN32) && defined(GDK_PIXBUF_RELOCATABLE) +@@ -318,6 +322,7 @@ int main (int argc, char **argv) gint first_file = 1; GFile *pixbuf_libdir_file; gchar *pixbuf_libdir; @@ -56,7 +55,7 @@ index 312aa78..b813d99 100644 #ifdef G_OS_WIN32 gchar *libdir; -@@ -452,7 +457,9 @@ int main (int argc, char **argv) +@@ -456,7 +461,9 @@ int main (int argc, char **argv) } modules = g_list_sort (modules, (GCompareFunc)strcmp); for (l = modules; l != NULL; l = l->next) @@ -67,7 +66,7 @@ index 312aa78..b813d99 100644 g_list_free_full (modules, g_free); g_free (moduledir); #else -@@ -468,7 +475,8 @@ int main (int argc, char **argv) +@@ -472,7 +479,8 @@ int main (int argc, char **argv) infilename = g_locale_to_utf8 (infilename, -1, NULL, NULL, NULL); #endif @@ -77,7 +76,7 @@ index 312aa78..b813d99 100644 } g_free (cwd); } -@@ -486,5 +494,8 @@ int main (int argc, char **argv) +@@ -492,5 +500,8 @@ int main (int argc, char **argv) g_free (pixbuf_libdir); diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/missing-test-data.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/missing-test-data.patch deleted file mode 100644 index 6c758fd61c..0000000000 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/missing-test-data.patch +++ /dev/null @@ -1,30 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From d8d231c01ef2e59856da8a5c26ace955e5f29370 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Mon, 25 Nov 2019 17:05:46 +0000 -Subject: [PATCH] tests: install circular-table.gif - -This test data was added for the pixbuf-gif-circular-table test (added October -2018 in 0b9d004) but because the file was never actually installed the installed -test suite never passes. ---- - tests/meson.build | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/tests/meson.build b/tests/meson.build -index 5116fc2b9..80ed3e8b2 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -97,6 +97,7 @@ test_data = [ - 'bug775693.pixdata', - 'bug775229.pixdata', - 'aero.gif', -+ 'circular-table.gif' - ] - - installed_test_bindir = join_paths(gdk_pixbuf_libexecdir, 'installed-tests', meson.project_name()) --- -2.20.1 - diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.12.bb index 699c4ecd0b..9f825a68ef 100644 --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.12.bb @@ -5,70 +5,59 @@ loading (ie. animated GIFs)" HOMEPAGE = "https://wiki.gnome.org/Projects/GdkPixbuf" BUGTRACKER = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues" -LICENSE = "LGPLv2.1" +LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \ " SECTION = "libs" -DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info" +DEPENDS = "glib-2.0 shared-mime-info" MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ file://run-ptest \ file://fatal-loader.patch \ - file://0001-Work-around-thumbnailer-cross-compile-failure.patch \ - file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \ - file://0004-Do-not-run-tests-when-building.patch \ - file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \ - file://missing-test-data.patch \ + file://0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch \ " -SRC_URI_append_class-target = " \ - file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ - " -SRC_URI_append_class-nativesdk = " \ - file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \ - " - -SRC_URI[md5sum] = "05eb1ebc258ba905f1c8644ef49de064" -SRC_URI[sha256sum] = "1582595099537ca8ff3b99c6804350b4c058bb8ad67411bbaae024ee7cead4e6" +SRC_URI[sha256sum] = "b9505b3445b9a7e48ced34760c3bcb73e966df3ac94c95a148cb669ab748e3c7" -inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package +inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gi-docgen lib_package -GIR_MESON_OPTION = 'gir' - -EXTRA_OEMESON_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '-Dinstalled_tests=true', '-Dinstalled_tests=false', d)}" +GIR_MESON_OPTION = 'introspection' +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" LIBV = "2.10.0" GDK_PIXBUF_LOADERS ?= "png jpeg" -PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${GDK_PIXBUF_LOADERS}" -PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" +PACKAGECONFIG = "${GDK_PIXBUF_LOADERS} \ + ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG:class-native = "${GDK_PIXBUF_LOADERS}" -PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng" -PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg" -PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff" -PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper" +PACKAGECONFIG[png] = "-Dpng=enabled,-Dpng=disabled,libpng" +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" +PACKAGECONFIG[tiff] = "-Dtiff=enabled,-Dtiff=disabled,tiff" +PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" -PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11" +EXTRA_OEMESON = "-Dman=false" PACKAGES =+ "${PN}-xlib" # For GIO image type sniffing -RDEPENDS_${PN} = "shared-mime-info" +RDEPENDS:${PN} = "shared-mime-info" -FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" -ALLOW_EMPTY_${PN}-xlib = "1" +FILES:${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" +ALLOW_EMPTY:${PN}-xlib = "1" -FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" +FILES:${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" -FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" +FILES:${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" -FILES_${PN}-dev += " \ +FILES:${PN}-dev += " \ ${bindir}/gdk-pixbuf-csource \ ${bindir}/gdk-pixbuf-pixdata \ ${bindir}/gdk-pixbuf-print-mime-types \ @@ -77,9 +66,9 @@ FILES_${PN}-dev += " \ " PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" -PACKAGES_DYNAMIC_class-native = "" +PACKAGES_DYNAMIC:class-native = "" -python populate_packages_prepend () { +python populate_packages:prepend () { postinst_pixbufloader = d.getVar("postinst_pixbufloader") loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') @@ -89,17 +78,24 @@ python populate_packages_prepend () { # The test suite exercises all the loaders, so ensure they are all # dependencies of the ptest package. - d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages) + d.appendVar("RDEPENDS:%s-ptest" % d.getVar('PN'), " " + packages) } -do_install_append() { +do_install:append() { # Copy gdk-pixbuf-query-loaders into libdir so it is always available # in multilib builds. cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ } -do_install_append_class-native() { +do_install_ptest() { + # Remove a bad fuzzing attempt that sporadically fails without a way to reproduce + rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-randomly-modified.test + # https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/215 + rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-jpeg.test +} + +do_install:append:class-native() { find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ @@ -110,10 +106,6 @@ do_install_append_class-native() { XDG_DATA_DIRS=${STAGING_DATADIR} \ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache - create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \ - XDG_DATA_DIRS=${STAGING_DATADIR} \ - GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache - create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ XDG_DATA_DIRS=${STAGING_DATADIR} \ GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ |