summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0002-Work-around-thumbnailer-cross-compile-failure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0002-Work-around-thumbnailer-cross-compile-failure.patch')
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0002-Work-around-thumbnailer-cross-compile-failure.patch131
1 files changed, 131 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0002-Work-around-thumbnailer-cross-compile-failure.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0002-Work-around-thumbnailer-cross-compile-failure.patch
new file mode 100644
index 0000000000..b0cd838a8f
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0002-Work-around-thumbnailer-cross-compile-failure.patch
@@ -0,0 +1,131 @@
1From a184e6bfdd7761ad9807f3de9e873d49aff79e6d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 14 Feb 2019 17:56:34 +0100
4Subject: [PATCH] (target only) Work-around thumbnailer cross-compile failure
5
6Use native gdk-pixbuf-print-mime-types when generating the thumbnail
7metadata. This works but the mime types will come from native
8loader.cache (which will only contain in-tree loaders), not from the
9target loader.cache.
10
11The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
12
13Upstream-Status: Inappropriate [workaround]
14Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
15
16---
17 build-aux/gen-thumbnailer.py | 2 --
18 tests/meson.build | 49 +-----------------------------------
19 thumbnailer/meson.build | 5 +---
20 3 files changed, 2 insertions(+), 54 deletions(-)
21
22diff --git a/build-aux/gen-thumbnailer.py b/build-aux/gen-thumbnailer.py
23index 05ac821..c5b99ab 100644
24--- a/build-aux/gen-thumbnailer.py
25+++ b/build-aux/gen-thumbnailer.py
26@@ -20,8 +20,6 @@ argparser.add_argument('output', help='Output file')
27 args = argparser.parse_args()
28
29 newenv = os.environ.copy()
30-newenv['GDK_PIXBUF_PIXDATA'] = args.pixdata
31-newenv['GDK_PIXBUF_MODULE_FILE'] = args.loaders
32 # 'nt': NT-based Windows, see https://docs.python.org/3/library/os.html
33 if os.name == 'nt':
34 gdk_pixbuf_dll_buildpath = os.path.dirname(args.pixdata)
35diff --git a/tests/meson.build b/tests/meson.build
36index 77a427a..467f5b2 100644
37--- a/tests/meson.build
38+++ b/tests/meson.build
39@@ -1,38 +1,6 @@
40 # Resources; we cannot use gnome.compile_resources() here, because we need to
41 # override the environment in order to use the utilities we just built instead
42 # of the system ones
43-resources_c = custom_target('resources.c',
44- input: 'resources.gresource.xml',
45- output: 'resources.c',
46- command: [
47- gen_resources,
48- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
49- '--loaders=@0@'.format(loaders_cache.full_path()),
50- '--sourcedir=@0@'.format(meson.current_source_dir()),
51- '--source',
52- '@INPUT@',
53- '@OUTPUT@',
54- ],
55- depends: [
56- gdk_pixbuf_pixdata,
57- loaders_cache,
58- ])
59-resources_h = custom_target('resources.h',
60- input: 'resources.gresource.xml',
61- output: 'resources.h',
62- command: [
63- gen_resources,
64- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
65- '--loaders=@0@'.format(loaders_cache.full_path()),
66- '--sourcedir=@0@'.format(meson.current_source_dir()),
67- '--header',
68- '@INPUT@',
69- '@OUTPUT@',
70- ],
71- depends: [
72- gdk_pixbuf_pixdata,
73- loaders_cache,
74- ])
75
76 installed_tests = [
77 [ 'animation' ],
78@@ -94,7 +62,7 @@ foreach t: installed_tests
79 test_sources = [ test_name + '.c', 'test-common.c' ]
80 needs_resources = t.get(1, false)
81 if needs_resources
82- test_sources += [ resources_c, resources_h ]
83+ test_sources += [ 'resources.c', 'resources.h' ]
84 endif
85
86 custom_target(test_name + '.test',
87@@ -116,21 +84,6 @@ foreach t: installed_tests
88 ],
89 c_args: common_cflags)
90
91- # Two particularly slow tests
92- if test_name == 'pixbuf-area-updated' or test_name == 'pixbuf-randomly-modified'
93- timeout = 300
94- else
95- timeout = 30
96- endif
97-
98- test(test_name, test_bin,
99- args: [ '-k', '--tap' ],
100- env: [
101- 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
102- 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
103- 'GDK_PIXBUF_MODULE_FILE=@0@'.format(loaders_cache.full_path()),
104- ],
105- timeout: timeout)
106 endforeach
107
108 executable('pixbuf-read',
109diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
110index aaafec8..71bd61b 100644
111--- a/thumbnailer/meson.build
112+++ b/thumbnailer/meson.build
113@@ -18,9 +18,7 @@ custom_target('thumbnailer',
114 output: 'gdk-pixbuf-thumbnailer.thumbnailer',
115 command: [
116 gen_thumbnailer,
117- '--printer=@0@'.format(gdk_pixbuf_print_mime_types.full_path()),
118- '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
119- '--loaders=@0@'.format(loaders_cache.full_path()),
120+ '--printer=gdk-pixbuf-print-mime-types',
121 '--bindir=@0@'.format(gdk_pixbuf_bindir),
122 '@INPUT@',
123 '@OUTPUT@',
124@@ -28,7 +26,6 @@ custom_target('thumbnailer',
125 depends: [
126 gdk_pixbuf_print_mime_types,
127 gdk_pixbuf_pixdata,
128- loaders_cache,
129 ],
130 install: true,
131 install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))