63b780f5e9
host-librsvg install a gdk-pixbuf module (aka plugin). As such, it needs to update [0] the modules cache (a kind of registry of which modules are installed and what the can handle). To that effect, it calls the utility gdk-pixbuf-queryloaders, which generates the cache of existing modules. gdk-pixbuf-queryloaders, from the gdk-pixbuf package, has been configured to be relocatable. However, it still embeds the path to where it was instaled, and thus where to look modules from. If it is run from its install location, then gdk-pixbuf-queryloaders looks modules in that location, and generates a modules cache with relative paths; otherwise, it still looks at that location, but generates a cache with absolute paths. In the later case, it will miss the modules that have not been installed by gdk-pixbuf itself. In the case of host-librsvg, that will miss the fact that librsvg just happened to have installed a module. Further down the road, packages that depend on host-librsvg, will get their PPD prepared, the path fixup hook run, so that the cache properly points to the current package's PPD, but the cache will not include the SVG module, which causes failures to load CVG images: Can't load file: Unrecognized image file format So, we need to tell gdk-pixbuf-queryloaders where the module path is, which restores the relativity of the paths it reports, by specifying the modules path pointing to the current package's PPD, passed in the environement variable GDK_PIXBUF_MODULEDIR. We need to do that at install time, so that the SVG module is properly listed in the cache, so that dependees can use it. A temporary cache is also generated at build time, but its usefullness is dubious; it seem to only be used by the test tool, which we do not run. However, for consistency-sake, we also fix that. Fixes: - http://autobuild.buildroot.org/results/0e00059b09b4445eaaec1030997883187c6a80d6 [0] This will trigger file-overwrite detection in the future... But we currently do not have infrastructure to properly handle such a cache. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> [yann.morin.1998@free.fr: reword and extend an already-good commit log] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
42 lines
1.7 KiB
Diff
42 lines
1.7 KiB
Diff
From 2c472bf55289ccbd7f305aa3e98d6fd70be4e3ab Mon Sep 17 00:00:00 2001
|
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Date: Sat, 19 Feb 2022 12:02:10 +0100
|
|
Subject: [PATCH] gdk-pixbuf-loader/Makefile.am: set GDK_PIXBUF_MODULEDIR
|
|
|
|
Set GDK_PIXBUF_MODULEDIR to gdk_pixbuf_moduledir before calling
|
|
gdk-pixbuf-query-loaders to build a correct gdk_pixbuf_cache_file and
|
|
gdk-pixbuf.loaders on 'exotic' systems
|
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
[Upstream status:
|
|
https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/668]
|
|
---
|
|
gdk-pixbuf-loader/Makefile.am | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/gdk-pixbuf-loader/Makefile.am b/gdk-pixbuf-loader/Makefile.am
|
|
index c3493736..de1f9641 100644
|
|
--- a/gdk-pixbuf-loader/Makefile.am
|
|
+++ b/gdk-pixbuf-loader/Makefile.am
|
|
@@ -49,7 +49,7 @@ rsvg_loader_LDADD = \
|
|
EXTRA_rsvg_loader_DEPENDENCIES = libpixbufloader-svg.la gdk-pixbuf-loaders
|
|
|
|
gdk-pixbuf-loaders: Makefile
|
|
- $(AM_V_GEN) ( $(GDK_PIXBUF_QUERYLOADERS) ./libpixbufloader-svg.la && $(GDK_PIXBUF_QUERYLOADERS)) > gdk-pixbuf.loaders 2>/dev/null
|
|
+ $(AM_V_GEN) ( $(GDK_PIXBUF_QUERYLOADERS) ./libpixbufloader-svg.la && GDK_PIXBUF_MODULEDIR=$(gdk_pixbuf_moduledir) $(GDK_PIXBUF_QUERYLOADERS)) > gdk-pixbuf.loaders 2>/dev/null
|
|
|
|
if CROSS_COMPILING
|
|
RUN_QUERY_LOADER_TEST=false
|
|
@@ -68,7 +68,7 @@ endif
|
|
install-data-hook:
|
|
@if $(RUN_QUERY_LOADER_TEST) ; then \
|
|
$(mkinstalldirs) $(DESTDIR)$(gdk_pixbuf_binarydir) ; \
|
|
- $(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \
|
|
+ GDK_PIXBUF_MODULEDIR=$(gdk_pixbuf_moduledir) $(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \
|
|
else \
|
|
echo "***" ; \
|
|
echo "*** Warning: loaders.cache not built" ; \
|
|
--
|
|
2.34.1
|
|
|