diff options
author | Gustavo Zacarias <gustavo@zacarias.com.ar> | 2016-03-23 18:17:49 -0300 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-03-24 22:44:52 +0100 |
commit | 1696b6d14c646a4cc2c375b33944d42b6580e748 (patch) | |
tree | 5934427c1744aa084a6879762bd952b0a1fdcc18 /package/gdk-pixbuf | |
parent | a58a4ec0355ae53be4eb6b46534eb03d012a5f37 (diff) |
gdk-pixbuf: create loader cache at build time
Create the gdk pixbuf loaders cache file at build time rather than run
time, since the root filesytem can be read-only.
We also didn't cater for systemd-based systems, so this solves two
issues at once.
The only side-effect is that we must now pull host-gdk-pixbuf into
target gdk-pixbuf dependencies, but generally users will have gdk-pixbuf
selected if they use libgtk2/3 which already pull in host-gdk-pixbuf.
And remove initscript correspondingly.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/gdk-pixbuf')
-rw-r--r-- | package/gdk-pixbuf/S26gdk-pixbuf | 19 | ||||
-rw-r--r-- | package/gdk-pixbuf/gdk-pixbuf.mk | 22 |
2 files changed, 15 insertions, 26 deletions
diff --git a/package/gdk-pixbuf/S26gdk-pixbuf b/package/gdk-pixbuf/S26gdk-pixbuf deleted file mode 100644 index 82b7944e7..000000000 --- a/package/gdk-pixbuf/S26gdk-pixbuf +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# run gdk-pixbuf-query-loaders if needed - -FILE=/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache - -case "$1" in - start|"") - if [ ! -f "$FILE" ] ; then - /usr/bin/gdk-pixbuf-query-loaders --update-cache - fi - ;; - stop) - ;; - *) - echo "Usage: $0 {start|stop}" >&2 - exit 1 - ;; -esac diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk index be79e11c5..02c4aa98c 100644 --- a/package/gdk-pixbuf/gdk-pixbuf.mk +++ b/package/gdk-pixbuf/gdk-pixbuf.mk @@ -11,6 +11,9 @@ GDK_PIXBUF_SITE = http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$(GDK_PIXBUF GDK_PIXBUF_LICENSE = LGPLv2+ GDK_PIXBUF_LICENSE_FILES = COPYING GDK_PIXBUF_INSTALL_STAGING = YES +GDK_PIXBUF_DEPENDENCIES = \ + host-gdk-pixbuf host-libglib2 host-pkgconf \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) GDK_PIXBUF_CONF_ENV = \ ac_cv_path_GLIB_GENMARSHAL=$(LIBGLIB2_HOST_BINARY) \ @@ -43,14 +46,19 @@ GDK_PIXBUF_CONF_OPTS += --with-x11 GDK_PIXBUF_DEPENDENCIES += xlib_libX11 endif -GDK_PIXBUF_DEPENDENCIES += \ - $(if $(BR2_ENABLE_LOCALE),,libiconv) \ - host-pkgconf libglib2 - -define GDK_PIXBUF_INSTALL_INIT_SYSV - $(INSTALL) -m 755 -D package/gdk-pixbuf/S26gdk-pixbuf \ - $(TARGET_DIR)/etc/init.d/S26gdk-pixbuf +# 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 absolute target directory names +# we need to sanitize (strip) them. +define GDK_PIXBUF_UPDATE_CACHE + GDK_PIXBUF_MODULEDIR=$(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders \ + $(HOST_DIR)/usr/bin/gdk-pixbuf-query-loaders \ + > $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + $(SED) "s,$(TARGET_DIR),,g" \ + $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache endef +GDK_PIXBUF_POST_INSTALL_TARGET_HOOKS += GDK_PIXBUF_UPDATE_CACHE # Tests don't build correctly with uClibc define GDK_PIXBUF_DISABLE_TESTS |