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
7 Use native gdk-pixbuf-print-mime-types and gdk-pixbuf-pixdata
8 when generating the thumbnail metadata and resources.
10 This works but the mime types will come from native
11 loader.cache (which will only contain in-tree loaders), not from the
14 The upstream issue is https://bugzilla.gnome.org/show_bug.cgi?id=779057
16 Upstream-Status: Inappropriate [workaround]
17 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
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(-)
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()
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
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
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
46 +if not meson.is_cross_build()
47 +pixdata_binary = gdk_pixbuf_pixdata.full_path()
49 +pixdata_binary = 'gdk-pixbuf-pixdata'
52 resources_c = custom_target('resources.c',
53 input: 'resources.gresource.xml',
54 output: 'resources.c',
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()),
62 @@ -24,7 +31,7 @@ resources_h = custom_target('resources.h',
63 output: 'resources.h',
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()),
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',
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),
86 @@ -28,7 +26,6 @@ custom_target('thumbnailer',
88 gdk_pixbuf_print_mime_types,
93 install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))