[gdk-pixbuf] meson: Add post-install script
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] meson: Add post-install script
- Date: Sun, 29 Apr 2018 18:07:18 +0000 (UTC)
commit d08de097394f327e48544d40a8fb217a0d6424af
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Apr 29 18:29:49 2018 +0100
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.
build-aux/post-install.sh | 17 +++++++++++++++++
meson.build | 7 +++++++
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/build-aux/post-install.sh b/build-aux/post-install.sh
new file mode 100644
index 0000000..40aab74
--- /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
diff --git a/meson.build b/meson.build
index 956b5f5..40bbee0 100644
--- a/meson.build
+++ b/meson.build
@@ -418,3 +418,10 @@ subdir('thumbnailer')
# Documentation
subdir('docs/reference/gdk-pixbuf')
+
+if not meson.is_cross_build()
+ meson.add_install_script('build-aux/post-install.sh',
+ gdk_pixbuf_libdir,
+ gdk_pixbuf_binary_version,
+ )
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]