* [Buildroot] [PATCH 5/5] package/librsvg: fix svg with gdk-pixbuf
@ 2024-09-05 16:24 Guillaume GC. Chaye
2024-09-05 19:32 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Guillaume GC. Chaye @ 2024-09-05 16:24 UTC (permalink / raw)
To: buildroot; +Cc: Guillaume GC. Chaye, Fabrice Fontaine
Signed-off-by: Guillaume GC. Chaye <guillaume.chaye@zeetim.com>
---
package/librsvg/librsvg.mk | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/package/librsvg/librsvg.mk b/package/librsvg/librsvg.mk
index 81a6667817..0187218a98 100644
--- a/package/librsvg/librsvg.mk
+++ b/package/librsvg/librsvg.mk
@@ -12,7 +12,7 @@ LIBRSVG_INSTALL_STAGING = YES
LIBRSVG_CONF_ENV = \
LIBS=$(TARGET_NLS_LIBS) \
RUST_TARGET=$(RUSTC_TARGET_NAME)
-LIBRSVG_CONF_OPTS = --disable-pixbuf-loader --disable-tools
+LIBRSVG_CONF_OPTS = --disable-tools
HOST_LIBRSVG_CONF_OPTS = --enable-introspection=no
LIBRSVG_DEPENDENCIES = cairo host-gdk-pixbuf gdk-pixbuf host-rustc libglib2 libxml2 pango \
$(TARGET_NLS_DEPENDENCIES)
@@ -30,5 +30,22 @@ else
LIBRSVG_CONF_OPTS += --disable-introspection
endif
+# gdk-pixbuf requires the loaders.cache file populated to work properly
+# Rather than doing so at runtime, since the fs can be read-only, do so
+# here after building and installing to target.
+# And since the cache file will contain relative host directory names we
+# need to prepend them with /usr/.
+ifeq ($(BR2_STATIC_LIBS),)
+define LIBRSVG_PIXBUF_UPDATE_CACHE
+ GDK_PIXBUF_MODULEDIR=$(HOST_DIR)/lib/gdk-pixbuf-2.0/2.10.0/loaders \
+ $(HOST_DIR)/bin/gdk-pixbuf-query-loaders \
+ > $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+ $(SED) 's,^"lib,"/usr/lib,g' \
+ $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+endef
+LIBRSVG_POST_INSTALL_TARGET_HOOKS += LIBRSVG_PIXBUF_UPDATE_CACHE
+endif
+
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 5/5] package/librsvg: fix svg with gdk-pixbuf
2024-09-05 16:24 [Buildroot] [PATCH 5/5] package/librsvg: fix svg with gdk-pixbuf Guillaume GC. Chaye
@ 2024-09-05 19:32 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-05 19:32 UTC (permalink / raw)
To: Guillaume GC. Chaye; +Cc: Fabrice Fontaine, buildroot
Hello,
On Thu, 5 Sep 2024 18:24:02 +0200
"Guillaume GC. Chaye" <guillaume.chaye@zeetim.com> wrote:
> Signed-off-by: Guillaume GC. Chaye <guillaume.chaye@zeetim.com>
Thanks for the patch. However, it really, really needs a non-empty
commit log with some explanation.
> diff --git a/package/librsvg/librsvg.mk b/package/librsvg/librsvg.mk
> index 81a6667817..0187218a98 100644
> --- a/package/librsvg/librsvg.mk
> +++ b/package/librsvg/librsvg.mk
> @@ -12,7 +12,7 @@ LIBRSVG_INSTALL_STAGING = YES
> LIBRSVG_CONF_ENV = \
> LIBS=$(TARGET_NLS_LIBS) \
> RUST_TARGET=$(RUSTC_TARGET_NAME)
> -LIBRSVG_CONF_OPTS = --disable-pixbuf-loader --disable-tools
> +LIBRSVG_CONF_OPTS = --disable-tools
You're removing --disable-pixbuf-loader, so probably it means that
pixbuf-loader support is important... so we probably need
--enable-pixbuf-loader, no?
> HOST_LIBRSVG_CONF_OPTS = --enable-introspection=no
> LIBRSVG_DEPENDENCIES = cairo host-gdk-pixbuf gdk-pixbuf host-rustc libglib2 libxml2 pango \
> $(TARGET_NLS_DEPENDENCIES)
> @@ -30,5 +30,22 @@ else
> LIBRSVG_CONF_OPTS += --disable-introspection
> endif
>
> +# gdk-pixbuf requires the loaders.cache file populated to work properly
gdk-pixbuf? I guess this is due to a copy/paste.
> +# Rather than doing so at runtime, since the fs can be read-only, do so
> +# here after building and installing to target.
> +# And since the cache file will contain relative host directory names we
> +# need to prepend them with /usr/.
> +ifeq ($(BR2_STATIC_LIBS),)
> +define LIBRSVG_PIXBUF_UPDATE_CACHE
> + GDK_PIXBUF_MODULEDIR=$(HOST_DIR)/lib/gdk-pixbuf-2.0/2.10.0/loaders \
> + $(HOST_DIR)/bin/gdk-pixbuf-query-loaders \
> + > $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
> + $(SED) 's,^"lib,"/usr/lib,g' \
> + $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
> +endef
> +LIBRSVG_POST_INSTALL_TARGET_HOOKS += LIBRSVG_PIXBUF_UPDATE_CACHE
Why do we need this a second time, when it's already done in
package/gdk-pixbuf/gdk-pixbuf.mk ? Also the 2.10.0 hardcoded here is
probably wrong? Maybe it's already wrong in gdk-pixbuf.mk?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-05 19:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05 16:24 [Buildroot] [PATCH 5/5] package/librsvg: fix svg with gdk-pixbuf Guillaume GC. Chaye
2024-09-05 19:32 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox