summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-04-29 18:29:49 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-04-29 19:06:34 +0100
commitd08de097394f327e48544d40a8fb217a0d6424af (patch)
treeb3394c65564fd0a021bbcec0cf2ea5855a5a22d7 /build-aux
parent4c76635e1f19c6d1919d4ea94f6b00f97b996665 (diff)
downloadgdk-pixbuf-d08de097394f327e48544d40a8fb217a0d6424af.tar.gz
meson: Add post-install script
If we're installing gdk-pixbuf ourselves, we should generate the loaders cache file — unless DESTDIR is set or we're cross-compiling, in which case we assume that there's a packaging system hook in place to do this at the end of a full build.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/post-install.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/build-aux/post-install.sh b/build-aux/post-install.sh
new file mode 100644
index 000000000..40aab7422
--- /dev/null
+++ b/build-aux/post-install.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/bash
+
+libdir="$1"
+binary_version="$2"
+
+if [ -z "$DESTDIR" ]; then
+ mkdir -p "$libdir/gdk-pixbuf-2.0/$binary_version"
+ gdk-pixbuf-query-loaders > "$libdir/gdk-pixbuf-2.0/$binary_version/loaders.cache"
+else
+ echo "***"
+ echo "*** Warning: loaders.cache not built"
+ echo "***"
+ echo "*** You should generate this file manually on the host system"
+ echo "*** using:"
+ echo "*** gdk-pixbuf-query-loaders > $libdir/gdk-pixbuf-2.0/$binary_version/loaders.cache"
+ echo "***"
+fi