diff options
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch')
-rw-r--r-- | meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch | 96 |
1 files changed, 96 insertions, 0 deletions
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 new file mode 100644 index 0000000000..928962d230 --- /dev/null +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0003-target-only-Work-around-thumbnailer-cross-compile-fa.patch | |||
@@ -0,0 +1,96 @@ | |||
1 | From 6fc7f341399ec49ab06c94426f50dbdca49a2844 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 | build-aux/gen-thumbnailer.py | 2 -- | ||
20 | tests/meson.build | 11 +++++++++-- | ||
21 | thumbnailer/meson.build | 5 +---- | ||
22 | 3 files changed, 10 insertions(+), 8 deletions(-) | ||
23 | |||
24 | diff --git a/build-aux/gen-thumbnailer.py b/build-aux/gen-thumbnailer.py | ||
25 | index 05ac821..c5b99ab 100644 | ||
26 | --- a/build-aux/gen-thumbnailer.py | ||
27 | +++ b/build-aux/gen-thumbnailer.py | ||
28 | @@ -20,8 +20,6 @@ argparser.add_argument('output', help='Output file') | ||
29 | args = argparser.parse_args() | ||
30 | |||
31 | newenv = os.environ.copy() | ||
32 | -newenv['GDK_PIXBUF_PIXDATA'] = args.pixdata | ||
33 | -newenv['GDK_PIXBUF_MODULE_FILE'] = args.loaders | ||
34 | # 'nt': NT-based Windows, see https://docs.python.org/3/library/os.html | ||
35 | if os.name == 'nt': | ||
36 | gdk_pixbuf_dll_buildpath = os.path.dirname(args.pixdata) | ||
37 | diff --git a/tests/meson.build b/tests/meson.build | ||
38 | index 4fa3fbc..eca5166 100644 | ||
39 | --- a/tests/meson.build | ||
40 | +++ b/tests/meson.build | ||
41 | @@ -1,12 +1,19 @@ | ||
42 | # Resources; we cannot use gnome.compile_resources() here, because we need to | ||
43 | # override the environment in order to use the utilities we just built instead | ||
44 | # of the system ones | ||
45 | + | ||
46 | +if not meson.is_cross_build() | ||
47 | +pixdata_binary = gdk_pixbuf_pixdata.full_path() | ||
48 | +else | ||
49 | +pixdata_binary = 'gdk-pixbuf-pixdata' | ||
50 | +endif | ||
51 | + | ||
52 | resources_c = custom_target('resources.c', | ||
53 | input: 'resources.gresource.xml', | ||
54 | output: 'resources.c', | ||
55 | command: [ | ||
56 | gen_resources, | ||
57 | - '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()), | ||
58 | + '--pixdata=@0@'.format(pixdata_binary), | ||
59 | '--loaders=@0@'.format(loaders_cache.full_path()), | ||
60 | '--sourcedir=@0@'.format(meson.current_source_dir()), | ||
61 | '--source', | ||
62 | @@ -24,7 +31,7 @@ resources_h = custom_target('resources.h', | ||
63 | output: 'resources.h', | ||
64 | command: [ | ||
65 | gen_resources, | ||
66 | - '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()), | ||
67 | + '--pixdata=@0@'.format(pixdata_binary), | ||
68 | '--loaders=@0@'.format(loaders_cache.full_path()), | ||
69 | '--sourcedir=@0@'.format(meson.current_source_dir()), | ||
70 | '--header', | ||
71 | diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build | ||
72 | index aaafec8..71bd61b 100644 | ||
73 | --- a/thumbnailer/meson.build | ||
74 | +++ b/thumbnailer/meson.build | ||
75 | @@ -18,9 +18,7 @@ custom_target('thumbnailer', | ||
76 | output: 'gdk-pixbuf-thumbnailer.thumbnailer', | ||
77 | command: [ | ||
78 | gen_thumbnailer, | ||
79 | - '--printer=@0@'.format(gdk_pixbuf_print_mime_types.full_path()), | ||
80 | - '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()), | ||
81 | - '--loaders=@0@'.format(loaders_cache.full_path()), | ||
82 | + '--printer=gdk-pixbuf-print-mime-types', | ||
83 | '--bindir=@0@'.format(gdk_pixbuf_bindir), | ||
84 | '@INPUT@', | ||
85 | '@OUTPUT@', | ||
86 | @@ -28,7 +26,6 @@ custom_target('thumbnailer', | ||
87 | depends: [ | ||
88 | gdk_pixbuf_print_mime_types, | ||
89 | gdk_pixbuf_pixdata, | ||
90 | - loaders_cache, | ||
91 | ], | ||
92 | install: true, | ||
93 | install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers')) | ||
94 | -- | ||
95 | 2.17.1 | ||
96 | |||