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
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>
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(-)
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()
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
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
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
47 +if not meson.is_cross_build()
48 +pixdata_binary = gdk_pixbuf_pixdata.full_path()
50 +pixdata_binary = 'gdk-pixbuf-pixdata'
53 resources_c = custom_target('resources.c',
54 input: 'resources.gresource.xml',
55 output: 'resources.c',
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()),
63 @@ -24,7 +31,7 @@ resources_h = custom_target('resources.h',
64 output: 'resources.h',
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()),
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',
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),
87 @@ -28,7 +26,6 @@ custom_target('thumbnailer',
89 gdk_pixbuf_print_mime_types,
94 install_dir: join_paths(gdk_pixbuf_datadir, 'thumbnailers'))