summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gdk-pixbuf
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf')
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Fix-a-couple-of-decisions-around-cross-compilation.patch38
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-Work-around-thumbnailer-cross-compile-failure.patch28
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch66
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch94
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0004-Do-not-run-tests-when-building.patch39
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch28
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2020-29385.patch55
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch23
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/missing-test-data.patch30
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.11.bb (renamed from meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb)70
10 files changed, 105 insertions, 366 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 @@
1From be8a47e0c21e5577d4f5669d339dfec6299b25be Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 14 Feb 2019 18:06:25 +0100
4Subject: [PATCH] Generate loaders.cache using a native tool when
5 cross-compiling
6
7Otherwise meson would attempt to run a target binary.
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11
12---
13 gdk-pixbuf/meson.build | 12 ++++++++++--
14 1 file changed, 10 insertions(+), 2 deletions(-)
15
16diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
17index 5cddbec..78c8bd3 100644
18--- a/gdk-pixbuf/meson.build
19+++ b/gdk-pixbuf/meson.build
20@@ -324,8 +324,16 @@ if not meson.is_cross_build()
21 build_by_default: true)
22 loaders_dep = declare_dependency(sources: [ loaders_cache ])
23 else
24- loaders_cache = []
25- loaders_dep = declare_dependency()
26+ loaders_cache = custom_target('loaders.cache',
27+ output: 'loaders.cache',
28+ capture: true,
29+ command: [
30+ 'gdk-pixbuf-query-loaders',
31+ dynamic_loaders,
32+ ],
33+ depends: dynamic_loaders_dep,
34+ build_by_default: true)
35+ loaders_dep = declare_dependency(sources: [ loaders_cache ])
36 endif
37
38 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 @@
1From 8c7ced988def52654946458a3779e383b27f14f7 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 14 Feb 2019 17:56:10 +0100
4Subject: [PATCH] Work-around thumbnailer cross-compile failure
5
6Install gdk-pixbuf-print-mime-types that's needed for thumbnail
7metadata generation.
8
9The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
10
11Upstream-Status: Inappropriate [workaround]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 thumbnailer/meson.build | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
18index e801144..aaafec8 100644
19--- a/thumbnailer/meson.build
20+++ b/thumbnailer/meson.build
21@@ -10,6 +10,7 @@ executable('gdk-pixbuf-thumbnailer',
22 gdk_pixbuf_print_mime_types = executable('gdk-pixbuf-print-mime-types',
23 'gdk-pixbuf-print-mime-types.c',
24 c_args: common_cflags,
25+ install: true,
26 dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ])
27
28 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..3d685db774
--- /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 @@
1From 4bfb696fd125f044e3df9f6983c4ad518d9552c7 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Thu, 26 Jan 2023 20:29:46 +0100
4Subject: [PATCH] meson.build: allow (a subset of) tests in cross compile
5 settings
6
7There is no need to completely disable tests: most of them
8do not require running target executables at build time,
9and so can be built and installed.
10
11This requires inserting a couple of specific guards around
12items that do require running target executables.
13
14Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/150]
15Signed-off-by: Alexander Kanavin <alex@linutronix.de>
16---
17 meson.build | 6 +++---
18 tests/meson.build | 10 ++++++----
19 2 files changed, 9 insertions(+), 7 deletions(-)
20
21diff --git a/meson.build b/meson.build
22index 78f3683..e0feaee 100644
23--- a/meson.build
24+++ b/meson.build
25@@ -390,10 +390,10 @@ subdir('gdk-pixbuf')
26 # i18n
27 subdir('po')
28
29+if get_option('tests')
30+ subdir('tests')
31+endif
32 if not meson.is_cross_build()
33- if get_option('tests')
34- subdir('tests')
35- endif
36 subdir('thumbnailer')
37 endif
38
39diff --git a/tests/meson.build b/tests/meson.build
40index 78d0ad9..0c9e64e 100644
41--- a/tests/meson.build
42+++ b/tests/meson.build
43@@ -4,7 +4,7 @@
44 # gdk-pixbuf-pixdata from build directory because it needs all DLL locations in
45 # $PATH. Ideally we should use gnome.compile_resources() and let Meson deal with
46 # this problem: See https://github.com/mesonbuild/meson/issues/8266.
47-if enabled_loaders.contains('png') and host_system != 'windows'
48+if enabled_loaders.contains('png') and host_system != 'windows' and not meson.is_cross_build()
49 # Resources; we cannot use gnome.compile_resources() here, because we need to
50 # override the environment in order to use the utilities we just built instead
51 # of the system ones
52@@ -172,9 +172,11 @@ endif
53 test_deps = gdk_pixbuf_deps + [ gdkpixbuf_dep, ]
54 test_args = [ '-k' ]
55 test_env = environment()
56-test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
57-test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
58-test_env.set('GDK_PIXBUF_MODULE_FILE', loaders_cache.full_path())
59+if not meson.is_cross_build()
60+ test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
61+ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
62+ test_env.set('GDK_PIXBUF_MODULE_FILE', loaders_cache.full_path())
63+endif
64
65 foreach test_name, test_data: installed_tests
66 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 @@
1From 2d1b65bd1272ad63b7fbd4babd9a8e8c296d15b5 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 22 Feb 2019 13:22:06 +0100
4Subject: [PATCH] (target only) Work-around thumbnailer and pixdata
5 cross-compile failure
6
7Use native gdk-pixbuf-print-mime-types and gdk-pixbuf-pixdata
8when generating the thumbnail metadata and resources.
9
10This works but the mime types will come from native
11loader.cache (which will only contain in-tree loaders), not from the
12target loader.cache.
13
14The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
15
16Upstream-Status: Inappropriate [workaround]
17Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
18
19---
20 build-aux/gen-thumbnailer.py | 2 --
21 tests/meson.build | 11 +++++++++--
22 thumbnailer/meson.build | 5 +----
23 3 files changed, 10 insertions(+), 8 deletions(-)
24
25diff --git a/build-aux/gen-thumbnailer.py b/build-aux/gen-thumbnailer.py
26index 05ac821..c5b99ab 100644
27--- a/build-aux/gen-thumbnailer.py
28+++ b/build-aux/gen-thumbnailer.py
29@@ -20,8 +20,6 @@ argparser.add_argument('output', help='Output file')
30 args = argparser.parse_args()
31
32 newenv = os.environ.copy()
33-newenv['GDK_PIXBUF_PIXDATA'] = args.pixdata
34-newenv['GDK_PIXBUF_MODULE_FILE'] = args.loaders
35 # 'nt': NT-based Windows, see https://docs.python.org/3/library/os.html
36 if os.name == 'nt':
37 gdk_pixbuf_dll_buildpath = os.path.dirname(args.pixdata)
38diff --git a/tests/meson.build b/tests/meson.build
39index 8ed7cc1..e011b77 100644
40--- a/tests/meson.build
41+++ b/tests/meson.build
42@@ -1,12 +1,19 @@
43 # Resources; we cannot use gnome.compile_resources() here, because we need to
44 # override the environment in order to use the utilities we just built instead
45 # of the system ones
46+
47+if not meson.is_cross_build()
48+pixdata_binary = gdk_pixbuf_pixdata.full_path()
49+else
50+pixdata_binary = 'gdk-pixbuf-pixdata'
51+endif
52+
53 resources_c = custom_target('resources.c',
54 input: 'resources.gresource.xml',
55 output: 'resources.c',
56 command: [
57 gen_resources,
58- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
59+ '--pixdata=@0@'.format(pixdata_binary),
60 '--loaders=@0@'.format(loaders_cache.full_path()),
61 '--sourcedir=@0@'.format(meson.current_source_dir()),
62 '--source',
63@@ -24,7 +31,7 @@ resources_h = custom_target('resources.h',
64 output: 'resources.h',
65 command: [
66 gen_resources,
67- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
68+ '--pixdata=@0@'.format(pixdata_binary),
69 '--loaders=@0@'.format(loaders_cache.full_path()),
70 '--sourcedir=@0@'.format(meson.current_source_dir()),
71 '--header',
72diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
73index aaafec8..71bd61b 100644
74--- a/thumbnailer/meson.build
75+++ b/thumbnailer/meson.build
76@@ -18,9 +18,7 @@ custom_target('thumbnailer',
77 output: 'gdk-pixbuf-thumbnailer.thumbnailer',
78 command: [
79 gen_thumbnailer,
80- '--printer=@0@'.format(gdk_pixbuf_print_mime_types.full_path()),
81- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
82- '--loaders=@0@'.format(loaders_cache.full_path()),
83+ '--printer=gdk-pixbuf-print-mime-types',
84 '--bindir=@0@'.format(gdk_pixbuf_bindir),
85 '@INPUT@',
86 '@OUTPUT@',
87@@ -28,7 +26,6 @@ custom_target('thumbnailer',
88 depends: [
89 gdk_pixbuf_print_mime_types,
90 gdk_pixbuf_pixdata,
91- loaders_cache,
92 ],
93 install: true,
94 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 @@
1From 3c4a6c147ae8a0962ba9194373d8a41d14eed44f Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 22 Feb 2019 13:23:55 +0100
4Subject: [PATCH] Do not run tests when building
5
6Upstream-Status: Inappropriate [cross-compile specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 tests/meson.build | 17 -----------------
10 1 file changed, 17 deletions(-)
11
12diff --git a/tests/meson.build b/tests/meson.build
13index 4fa3fbc..6ef7884 100644
14--- a/tests/meson.build
15+++ b/tests/meson.build
16@@ -138,23 +138,6 @@ foreach t: installed_tests
17 install_dir: installed_test_bindir,
18 )
19
20- # Two particularly slow tests
21- if test_suites.contains('slow')
22- timeout = 300
23- else
24- timeout = 30
25- endif
26-
27- test(test_name, test_bin,
28- suite: test_suites,
29- args: [ '-k', '--tap' ],
30- env: [
31- 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
32- 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
33- 'GDK_PIXBUF_MODULE_FILE=@0@'.format(loaders_cache.full_path()),
34- ],
35- timeout: timeout,
36- )
37 endforeach
38
39 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 @@
1From 1a532e090c558a830de9503f56e23414e880bb95 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 5 Jun 2019 14:17:55 +0200
4Subject: [PATCH] Build thumbnailer and tests also in cross builds.
5
6Upstream-Status: Inappropriate [relies on oe-core specific hacks]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 meson.build | 6 ++----
10 1 file changed, 2 insertions(+), 4 deletions(-)
11
12diff --git a/meson.build b/meson.build
13index d104cea..7acb88a 100644
14--- a/meson.build
15+++ b/meson.build
16@@ -397,10 +397,8 @@ endif
17 # i18n
18 subdir('po')
19
20-if not meson.is_cross_build()
21- subdir('tests')
22- subdir('thumbnailer')
23-endif
24+subdir('tests')
25+subdir('thumbnailer')
26
27 # Documentation
28 subdir('docs')
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2020-29385.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2020-29385.patch
deleted file mode 100644
index 3fef2bc1eb..0000000000
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2020-29385.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From bdd3acbd48a575d418ba6bf1b32d7bda2fae1c81 Mon Sep 17 00:00:00 2001
2From: Robert Ancell <robert.ancell@canonical.com>
3Date: Mon, 30 Nov 2020 12:26:12 +1300
4Subject: [PATCH 02/13] gif: Fix LZW decoder accepting invalid LZW code.
5
6The code value after a reset wasn't being validated, which means we would
7accept invalid codes. This could cause an infinite loop in the decoder.
8
9Fixes CVE-2020-29385
10
11Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/164
12
13Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/bdd3acbd48a575d418ba6bf1b32d7bda2fae1c81]
14CVE: CVE-2020-29385
15Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
16
17---
18 gdk-pixbuf/lzw.c | 13 +++++++------
19 1 files changed, 7 insertions(+), 6 deletions(-)
20 create mode 100644 tests/test-images/fail/hang_114.gif
21
22diff --git a/gdk-pixbuf/lzw.c b/gdk-pixbuf/lzw.c
23index 9e052a6f7..105daf2b1 100644
24--- a/gdk-pixbuf/lzw.c
25+++ b/gdk-pixbuf/lzw.c
26@@ -195,19 +195,20 @@ lzw_decoder_feed (LZWDecoder *self,
27 if (self->last_code != self->clear_code && self->code_table_size < MAX_CODES) {
28 if (self->code < self->code_table_size)
29 add_code (self, self->code);
30- else if (self->code == self->code_table_size)
31+ else
32 add_code (self, self->last_code);
33- else {
34- /* Invalid code received - just stop here */
35- self->last_code = self->eoi_code;
36- return output_length;
37- }
38
39 /* When table is full increase code size */
40 if (self->code_table_size == (1 << self->code_size) && self->code_size < LZW_CODE_MAX)
41 self->code_size++;
42 }
43
44+ /* Invalid code received - just stop here */
45+ if (self->code >= self->code_table_size) {
46+ self->last_code = self->eoi_code;
47+ return output_length;
48+ }
49+
50 /* Convert codeword into indexes */
51 n_written += write_indexes (self, output + n_written, output_length - n_written);
52 }
53--
542.25.1
55
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..80c93e2166 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 @@
1From f00603d58d844422363b896ea7d07aaf48ddaa66 Mon Sep 17 00:00:00 2001 1From 9b4f5738f8ac30f393b6163dcc84757976683d9b Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com> 2From: Ross Burton <ross.burton@intel.com>
3Date: Tue, 1 Apr 2014 17:23:36 +0100 3Date: Tue, 1 Apr 2014 17:23:36 +0100
4Subject: [PATCH] gdk-pixbuf: add an option so that loader errors are fatal 4Subject: [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
6If an environment variable is specified set the return value from main() to 6If an environment variable is specified set the return value from main() to
7non-zero if the loader had errors (missing libraries, generally). 7non-zero if the loader had errors (missing libraries, generally).
8 8
9Upstream-Status: Pending 9Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/144]
10Signed-off-by: Ross Burton <ross.burton@intel.com> 10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12--- 11---
13 gdk-pixbuf/queryloaders.c | 19 +++++++++++++++---- 12 gdk-pixbuf/queryloaders.c | 19 +++++++++++++++----
14 1 file changed, 15 insertions(+), 4 deletions(-) 13 1 file changed, 15 insertions(+), 4 deletions(-)
15 14
16diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c 15diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
17index 312aa78..b813d99 100644 16index baa9a5c..9b6fa89 100644
18--- a/gdk-pixbuf/queryloaders.c 17--- a/gdk-pixbuf/queryloaders.c
19+++ b/gdk-pixbuf/queryloaders.c 18+++ b/gdk-pixbuf/queryloaders.c
20@@ -212,7 +212,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info) 19@@ -216,7 +216,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info)
21 g_string_append_c (contents, '\n'); 20 g_string_append_c (contents, '\n');
22 } 21 }
23 22
@@ -26,7 +25,7 @@ index 312aa78..b813d99 100644
26 query_module (GString *contents, const char *dir, const char *file) 25 query_module (GString *contents, const char *dir, const char *file)
27 { 26 {
28 char *path; 27 char *path;
29@@ -221,6 +221,7 @@ query_module (GString *contents, const char *dir, const char *file) 28@@ -225,6 +225,7 @@ query_module (GString *contents, const char *dir, const char *file)
30 void (*fill_vtable) (GdkPixbufModule *module); 29 void (*fill_vtable) (GdkPixbufModule *module);
31 gpointer fill_info_ptr; 30 gpointer fill_info_ptr;
32 gpointer fill_vtable_ptr; 31 gpointer fill_vtable_ptr;
@@ -34,7 +33,7 @@ index 312aa78..b813d99 100644
34 33
35 if (g_path_is_absolute (file)) 34 if (g_path_is_absolute (file))
36 path = g_strdup (file); 35 path = g_strdup (file);
37@@ -270,10 +271,13 @@ query_module (GString *contents, const char *dir, const char *file) 36@@ -274,10 +275,13 @@ query_module (GString *contents, const char *dir, const char *file)
38 g_module_error()); 37 g_module_error());
39 else 38 else
40 g_fprintf (stderr, "Cannot load loader %s\n", path); 39 g_fprintf (stderr, "Cannot load loader %s\n", path);
@@ -47,8 +46,8 @@ index 312aa78..b813d99 100644
47+ return ret; 46+ return ret;
48 } 47 }
49 48
50 #ifdef G_OS_WIN32 49 #if defined(G_OS_WIN32) && defined(GDK_PIXBUF_RELOCATABLE)
51@@ -314,6 +318,7 @@ int main (int argc, char **argv) 50@@ -318,6 +322,7 @@ int main (int argc, char **argv)
52 gint first_file = 1; 51 gint first_file = 1;
53 GFile *pixbuf_libdir_file; 52 GFile *pixbuf_libdir_file;
54 gchar *pixbuf_libdir; 53 gchar *pixbuf_libdir;
@@ -56,7 +55,7 @@ index 312aa78..b813d99 100644
56 55
57 #ifdef G_OS_WIN32 56 #ifdef G_OS_WIN32
58 gchar *libdir; 57 gchar *libdir;
59@@ -452,7 +457,9 @@ int main (int argc, char **argv) 58@@ -456,7 +461,9 @@ int main (int argc, char **argv)
60 } 59 }
61 modules = g_list_sort (modules, (GCompareFunc)strcmp); 60 modules = g_list_sort (modules, (GCompareFunc)strcmp);
62 for (l = modules; l != NULL; l = l->next) 61 for (l = modules; l != NULL; l = l->next)
@@ -67,7 +66,7 @@ index 312aa78..b813d99 100644
67 g_list_free_full (modules, g_free); 66 g_list_free_full (modules, g_free);
68 g_free (moduledir); 67 g_free (moduledir);
69 #else 68 #else
70@@ -468,7 +475,8 @@ int main (int argc, char **argv) 69@@ -472,7 +479,8 @@ int main (int argc, char **argv)
71 infilename = g_locale_to_utf8 (infilename, 70 infilename = g_locale_to_utf8 (infilename,
72 -1, NULL, NULL, NULL); 71 -1, NULL, NULL, NULL);
73 #endif 72 #endif
@@ -77,7 +76,7 @@ index 312aa78..b813d99 100644
77 } 76 }
78 g_free (cwd); 77 g_free (cwd);
79 } 78 }
80@@ -486,5 +494,8 @@ int main (int argc, char **argv) 79@@ -492,5 +500,8 @@ int main (int argc, char **argv)
81 80
82 g_free (pixbuf_libdir); 81 g_free (pixbuf_libdir);
83 82
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 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From d8d231c01ef2e59856da8a5c26ace955e5f29370 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Mon, 25 Nov 2019 17:05:46 +0000
7Subject: [PATCH] tests: install circular-table.gif
8
9This test data was added for the pixbuf-gif-circular-table test (added October
102018 in 0b9d004) but because the file was never actually installed the installed
11test suite never passes.
12---
13 tests/meson.build | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/tests/meson.build b/tests/meson.build
17index 5116fc2b9..80ed3e8b2 100644
18--- a/tests/meson.build
19+++ b/tests/meson.build
20@@ -97,6 +97,7 @@ test_data = [
21 'bug775693.pixdata',
22 'bug775229.pixdata',
23 'aero.gif',
24+ 'circular-table.gif'
25 ]
26
27 installed_test_bindir = join_paths(gdk_pixbuf_libexecdir, 'installed-tests', meson.project_name())
28--
292.20.1
30
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.11.bb
index 16708fd581..ef0f23f8f7 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.40.0.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.42.11.bb
@@ -5,71 +5,59 @@ loading (ie. animated GIFs)"
5HOMEPAGE = "https://wiki.gnome.org/Projects/GdkPixbuf" 5HOMEPAGE = "https://wiki.gnome.org/Projects/GdkPixbuf"
6BUGTRACKER = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues" 6BUGTRACKER = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/issues"
7 7
8LICENSE = "LGPLv2.1+" 8LICENSE = "LGPL-2.1-or-later"
9LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ 9LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
10 file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \ 10 file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b \
11 " 11 "
12 12
13SECTION = "libs" 13SECTION = "libs"
14 14
15DEPENDS = "glib-2.0 gdk-pixbuf-native shared-mime-info" 15DEPENDS = "glib-2.0 shared-mime-info"
16 16
17MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" 17MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
18 18
19SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ 19SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
20 file://run-ptest \ 20 file://run-ptest \
21 file://fatal-loader.patch \ 21 file://fatal-loader.patch \
22 file://0001-Work-around-thumbnailer-cross-compile-failure.patch \ 22 file://0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch \
23 file://0001-Fix-a-couple-of-decisions-around-cross-compilation.patch \
24 file://0004-Do-not-run-tests-when-building.patch \
25 file://0006-Build-thumbnailer-and-tests-also-in-cross-builds.patch \
26 file://missing-test-data.patch \
27 file://CVE-2020-29385.patch \
28 " 23 "
29 24
30SRC_URI_append_class-target = " \ 25SRC_URI[sha256sum] = "49dcb402388708647e8c321d56b6fb30f21e51e515d0c5a942268d23052a2f00"
31 file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \
32 "
33SRC_URI_append_class-nativesdk = " \
34 file://0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch \
35 "
36 26
37SRC_URI[md5sum] = "05eb1ebc258ba905f1c8644ef49de064" 27inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gi-docgen lib_package
38SRC_URI[sha256sum] = "1582595099537ca8ff3b99c6804350b4c058bb8ad67411bbaae024ee7cead4e6"
39 28
40inherit meson pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection gtk-doc lib_package 29GIR_MESON_OPTION = 'introspection'
41 30GIR_MESON_ENABLE_FLAG = "enabled"
42GIR_MESON_OPTION = 'gir' 31GIR_MESON_DISABLE_FLAG = "disabled"
43 32
44LIBV = "2.10.0" 33LIBV = "2.10.0"
45 34
46GDK_PIXBUF_LOADERS ?= "png jpeg" 35GDK_PIXBUF_LOADERS ?= "png jpeg"
47 36
48PACKAGECONFIG = "${GDK_PIXBUF_LOADERS} \ 37PACKAGECONFIG = "${GDK_PIXBUF_LOADERS} \
49 ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
50 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" 38 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}"
51PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}" 39PACKAGECONFIG:class-native = "${GDK_PIXBUF_LOADERS}"
52 40
53PACKAGECONFIG[png] = "-Dpng=true,-Dpng=false,libpng" 41PACKAGECONFIG[png] = "-Dpng=enabled,-Dpng=disabled,libpng"
54PACKAGECONFIG[jpeg] = "-Djpeg=true,-Djpeg=false,jpeg" 42PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg"
55PACKAGECONFIG[tiff] = "-Dtiff=true,-Dtiff=false,tiff" 43PACKAGECONFIG[tiff] = "-Dtiff=enabled,-Dtiff=disabled,tiff"
56PACKAGECONFIG[jpeg2000] = "-Djasper=true,-Djasper=false,jasper"
57PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false" 44PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false"
58PACKAGECONFIG[x11] = "-Dx11=true,-Dx11=false,virtual/libx11" 45
46EXTRA_OEMESON = "-Dman=false"
59 47
60PACKAGES =+ "${PN}-xlib" 48PACKAGES =+ "${PN}-xlib"
61 49
62# For GIO image type sniffing 50# For GIO image type sniffing
63RDEPENDS_${PN} = "shared-mime-info" 51RDEPENDS:${PN} = "shared-mime-info"
64 52
65FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}" 53FILES:${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
66ALLOW_EMPTY_${PN}-xlib = "1" 54ALLOW_EMPTY:${PN}-xlib = "1"
67 55
68FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" 56FILES:${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
69 57
70FILES_${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer" 58FILES:${PN}-bin += "${datadir}/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer"
71 59
72FILES_${PN}-dev += " \ 60FILES:${PN}-dev += " \
73 ${bindir}/gdk-pixbuf-csource \ 61 ${bindir}/gdk-pixbuf-csource \
74 ${bindir}/gdk-pixbuf-pixdata \ 62 ${bindir}/gdk-pixbuf-pixdata \
75 ${bindir}/gdk-pixbuf-print-mime-types \ 63 ${bindir}/gdk-pixbuf-print-mime-types \
@@ -78,9 +66,9 @@ FILES_${PN}-dev += " \
78" 66"
79 67
80PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*" 68PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
81PACKAGES_DYNAMIC_class-native = "" 69PACKAGES_DYNAMIC:class-native = ""
82 70
83python populate_packages_prepend () { 71python populate_packages:prepend () {
84 postinst_pixbufloader = d.getVar("postinst_pixbufloader") 72 postinst_pixbufloader = d.getVar("postinst_pixbufloader")
85 73
86 loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders') 74 loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
@@ -90,22 +78,24 @@ python populate_packages_prepend () {
90 78
91 # The test suite exercises all the loaders, so ensure they are all 79 # The test suite exercises all the loaders, so ensure they are all
92 # dependencies of the ptest package. 80 # dependencies of the ptest package.
93 d.appendVar("RDEPENDS_%s-ptest" % d.getVar('PN'), " " + packages) 81 d.appendVar("RDEPENDS:%s-ptest" % d.getVar('PN'), " " + packages)
94} 82}
95 83
96do_install_append() { 84do_install:append() {
97 # Copy gdk-pixbuf-query-loaders into libdir so it is always available 85 # Copy gdk-pixbuf-query-loaders into libdir so it is always available
98 # in multilib builds. 86 # in multilib builds.
99 cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/ 87 cp ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
100 88
101} 89}
102 90
103# Remove a bad fuzzing attempt that sporadically fails without a way to reproduce
104do_install_ptest() { 91do_install_ptest() {
92 # Remove a bad fuzzing attempt that sporadically fails without a way to reproduce
105 rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-randomly-modified.test 93 rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-randomly-modified.test
94 # https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/215
95 rm ${D}/${datadir}/installed-tests/gdk-pixbuf/pixbuf-jpeg.test
106} 96}
107 97
108do_install_append_class-native() { 98do_install:append:class-native() {
109 find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \; 99 find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
110 100
111 create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \ 101 create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
@@ -116,10 +106,6 @@ do_install_append_class-native() {
116 XDG_DATA_DIRS=${STAGING_DATADIR} \ 106 XDG_DATA_DIRS=${STAGING_DATADIR} \
117 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache 107 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
118 108
119 create_wrapper ${D}/${bindir}/gdk-pixbuf-print-mime-types \
120 XDG_DATA_DIRS=${STAGING_DATADIR} \
121 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
122
123 create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \ 109 create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
124 XDG_DATA_DIRS=${STAGING_DATADIR} \ 110 XDG_DATA_DIRS=${STAGING_DATADIR} \
125 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \ 111 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \