diff options
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf')
9 files changed, 77 insertions, 324 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 @@ | |||
1 | From be8a47e0c21e5577d4f5669d339dfec6299b25be Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 14 Feb 2019 18:06:25 +0100 | ||
4 | Subject: [PATCH] Generate loaders.cache using a native tool when | ||
5 | cross-compiling | ||
6 | |||
7 | Otherwise meson would attempt to run a target binary. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-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 | |||
16 | diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build | ||
17 | index 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 @@ | |||
1 | From 8c7ced988def52654946458a3779e383b27f14f7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 14 Feb 2019 17:56:10 +0100 | ||
4 | Subject: [PATCH] Work-around thumbnailer cross-compile failure | ||
5 | |||
6 | Install gdk-pixbuf-print-mime-types that's needed for thumbnail | ||
7 | metadata generation. | ||
8 | |||
9 | The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057 | ||
10 | |||
11 | Upstream-Status: Inappropriate [workaround] | ||
12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
13 | --- | ||
14 | thumbnailer/meson.build | 1 + | ||
15 | 1 file changed, 1 insertion(+) | ||
16 | |||
17 | diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build | ||
18 | index 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..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 @@ | |||
1 | From 325a4cde99a00b84116ab7111d27e6973f3c5026 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Thu, 26 Jan 2023 20:29:46 +0100 | ||
4 | Subject: [PATCH] meson.build: allow (a subset of) tests in cross compile | ||
5 | settings | ||
6 | |||
7 | There is no need to completely disable tests: most of them | ||
8 | do not require running target executables at build time, | ||
9 | and so can be built and installed. | ||
10 | |||
11 | This requires inserting a couple of specific guards around | ||
12 | items that do require running target executables. | ||
13 | |||
14 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/150] | ||
15 | Signed-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 | |||
21 | diff --git a/meson.build b/meson.build | ||
22 | index 3eb3fcc..dc7e790 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 | |||
39 | diff --git a/tests/meson.build b/tests/meson.build | ||
40 | index 3781066..911b5fb 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 | @@ -164,9 +164,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 @@ | |||
1 | From 2d1b65bd1272ad63b7fbd4babd9a8e8c296d15b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 22 Feb 2019 13:22:06 +0100 | ||
4 | Subject: [PATCH] (target only) Work-around thumbnailer and pixdata | ||
5 | cross-compile failure | ||
6 | |||
7 | Use native gdk-pixbuf-print-mime-types and gdk-pixbuf-pixdata | ||
8 | when generating the thumbnail metadata and resources. | ||
9 | |||
10 | This works but the mime types will come from native | ||
11 | loader.cache (which will only contain in-tree loaders), not from the | ||
12 | target loader.cache. | ||
13 | |||
14 | The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057 | ||
15 | |||
16 | Upstream-Status: Inappropriate [workaround] | ||
17 | Signed-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 | |||
25 | diff --git a/build-aux/gen-thumbnailer.py b/build-aux/gen-thumbnailer.py | ||
26 | index 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) | ||
38 | diff --git a/tests/meson.build b/tests/meson.build | ||
39 | index 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', | ||
72 | diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build | ||
73 | index 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 @@ | |||
1 | From 3c4a6c147ae8a0962ba9194373d8a41d14eed44f Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 22 Feb 2019 13:23:55 +0100 | ||
4 | Subject: [PATCH] Do not run tests when building | ||
5 | |||
6 | Upstream-Status: Inappropriate [cross-compile specific] | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | tests/meson.build | 17 ----------------- | ||
10 | 1 file changed, 17 deletions(-) | ||
11 | |||
12 | diff --git a/tests/meson.build b/tests/meson.build | ||
13 | index 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 @@ | |||
1 | From 1a532e090c558a830de9503f56e23414e880bb95 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 5 Jun 2019 14:17:55 +0200 | ||
4 | Subject: [PATCH] Build thumbnailer and tests also in cross builds. | ||
5 | |||
6 | Upstream-Status: Inappropriate [relies on oe-core specific hacks] | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | meson.build | 6 ++---- | ||
10 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/meson.build b/meson.build | ||
13 | index 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 @@ | |||
1 | From bdd3acbd48a575d418ba6bf1b32d7bda2fae1c81 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Ancell <robert.ancell@canonical.com> | ||
3 | Date: Mon, 30 Nov 2020 12:26:12 +1300 | ||
4 | Subject: [PATCH 02/13] gif: Fix LZW decoder accepting invalid LZW code. | ||
5 | |||
6 | The code value after a reset wasn't being validated, which means we would | ||
7 | accept invalid codes. This could cause an infinite loop in the decoder. | ||
8 | |||
9 | Fixes CVE-2020-29385 | ||
10 | |||
11 | Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/164 | ||
12 | |||
13 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/bdd3acbd48a575d418ba6bf1b32d7bda2fae1c81] | ||
14 | CVE: CVE-2020-29385 | ||
15 | Signed-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 | |||
22 | diff --git a/gdk-pixbuf/lzw.c b/gdk-pixbuf/lzw.c | ||
23 | index 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 | -- | ||
54 | 2.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..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 @@ | |||
1 | From f00603d58d844422363b896ea7d07aaf48ddaa66 Mon Sep 17 00:00:00 2001 | 1 | From f78ab4edaee5f62663a9a4bcfa56e5c524da4474 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: Tue, 1 Apr 2014 17:23:36 +0100 | 3 | Date: Tue, 1 Apr 2014 17:23:36 +0100 |
4 | Subject: [PATCH] gdk-pixbuf: add an option so that loader errors are fatal | 4 | 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 | |||
6 | If an environment variable is specified set the return value from main() to | 6 | If an environment variable is specified set the return value from main() to |
7 | non-zero if the loader had errors (missing libraries, generally). | 7 | non-zero if the loader had errors (missing libraries, generally). |
8 | 8 | ||
9 | Upstream-Status: Pending | 9 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/144] |
10 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 10 | Signed-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 | ||
16 | diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c | 15 | diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c |
17 | index 312aa78..b813d99 100644 | 16 | index 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 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From d8d231c01ef2e59856da8a5c26ace955e5f29370 Mon Sep 17 00:00:00 2001 | ||
5 | From: Ross Burton <ross.burton@intel.com> | ||
6 | Date: Mon, 25 Nov 2019 17:05:46 +0000 | ||
7 | Subject: [PATCH] tests: install circular-table.gif | ||
8 | |||
9 | This test data was added for the pixbuf-gif-circular-table test (added October | ||
10 | 2018 in 0b9d004) but because the file was never actually installed the installed | ||
11 | test suite never passes. | ||
12 | --- | ||
13 | tests/meson.build | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/tests/meson.build b/tests/meson.build | ||
17 | index 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 | -- | ||
29 | 2.20.1 | ||
30 | |||