1 From dcaf3106e2cca27f728a8bd26127430500a1136e 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] Work-around thumbnailer and pixdata cross-compile failure
6 Use native gdk-pixbuf-print-mime-types and gdk-pixbuf-pixdata
7 when generating the thumbnail metadata and resources.
9 This works but the mime types will come from native
10 loader.cache (which will only contain in-tree loaders), not from the
13 The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
15 Upstream-Status: Inappropriate [workaround]
16 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
19 tests/meson.build | 11 +++++++++--
20 thumbnailer/meson.build | 23 ++++++++++++++++++++++-
21 2 files changed, 31 insertions(+), 3 deletions(-)
23 diff --git a/tests/meson.build b/tests/meson.build
24 index 7c6cb11..07121f1 100644
25 --- a/tests/meson.build
26 +++ b/tests/meson.build
27 @@ -8,13 +8,20 @@ if enabled_loaders.contains('png') and host_system != 'windows'
28 # Resources; we cannot use gnome.compile_resources() here, because we need to
29 # override the environment in order to use the utilities we just built instead
32 + if not meson.is_cross_build()
33 + pixdata_binary = gdk_pixbuf_pixdata.full_path()
35 + pixdata_binary = 'gdk-pixbuf-pixdata'
38 resources_c = custom_target('resources.c',
39 input: 'resources.gresource.xml',
40 output: 'resources.c',
43 '--glib-compile-resources=@0@'.format(glib_compile_resources.full_path()),
44 - '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
45 + '--pixdata=@0@'.format(pixdata_binary),
46 '--loaders=@0@'.format(loaders_cache.full_path()),
47 '--sourcedir=@0@'.format(meson.current_source_dir()),
49 @@ -33,7 +40,7 @@ if enabled_loaders.contains('png') and host_system != 'windows'
52 '--glib-compile-resources=@0@'.format(glib_compile_resources.full_path()),
53 - '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
54 + '--pixdata=@0@'.format(pixdata_binary),
55 '--loaders=@0@'.format(loaders_cache.full_path()),
56 '--sourcedir=@0@'.format(meson.current_source_dir()),
58 diff --git a/thumbnailer/meson.build b/thumbnailer/meson.build
59 index 8c741e0..5a3b52a 100644
60 --- a/thumbnailer/meson.build
61 +++ b/thumbnailer/meson.build
62 @@ -14,7 +14,27 @@ gdk_pixbuf_print_mime_types = executable('gdk-pixbuf-print-mime-types',
64 dependencies: gdk_pixbuf_deps + [ gdkpixbuf_dep ])
66 -custom_target('thumbnailer',
67 +if meson.is_cross_build()
68 + custom_target('thumbnailer',
69 + input: 'gdk-pixbuf-thumbnailer.thumbnailer.in',
70 + output: 'gdk-pixbuf-thumbnailer.thumbnailer',
73 + '--printer=gdk-pixbuf-print-mime-types',
74 + '--pixdata=@0@'.format(gdk_pixbuf_pixdata.full_path()),
75 + '--loaders=@0@'.format(loaders_cache.full_path()),
76 + '--bindir=@0@'.format(gdk_pixbuf_bindir),
81 + gdk_pixbuf_print_mime_types,
85 + install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))
87 + custom_target('thumbnailer',
88 input: 'gdk-pixbuf-thumbnailer.thumbnailer.in',
89 output: 'gdk-pixbuf-thumbnailer.thumbnailer',
91 @@ -33,3 +53,4 @@ custom_target('thumbnailer',
94 install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))