[librsvg/librsvg-2.40] Backport: cross-compiling bits for gdk-pixbuf-loader



commit 5649d08533846ff540f4f654af128f26aea0c642
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Oct 4 09:39:11 2017 -0500

    Backport: cross-compiling bits for gdk-pixbuf-loader
    
    From commit 30a91d1e1f2df9ad4d6b28ed635e69619b1ed8b3

 configure.ac                  |    2 ++
 gdk-pixbuf-loader/Makefile.am |   23 ++++++++++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0ffe74d..ca3e428 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,6 +177,8 @@ AC_SUBST([gdk_pixbuf_cache_file])
 
 AM_CONDITIONAL([ENABLE_PIXBUF_LOADER],[test "$enable_pixbuf_loader" = "yes"])
 
+AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
+
 ##########################################################
 # Check for -Bsymbolic-functions linker flag used to avoid
 # intra-library PLT jumps, if available.
diff --git a/gdk-pixbuf-loader/Makefile.am b/gdk-pixbuf-loader/Makefile.am
index 75b2205..6e92b67 100644
--- a/gdk-pixbuf-loader/Makefile.am
+++ b/gdk-pixbuf-loader/Makefile.am
@@ -59,10 +59,31 @@ librsvg.thumbnailer: librsvg.thumbnailer.in
 
 EXTRA_DIST = librsvg.thumbnailer.in
 
+if CROSS_COMPILING
+RUN_QUERY_LOADER_TEST=false
+else
+RUN_QUERY_LOADER_TEST=test -z "$(DESTDIR)"
+endif
+
+# The following bit is stolen from gdk-pixbuf/gdk-pixbuf/Makefile.am:
+#
+# Running this if cross compiling or if DESTDIR is set is going to
+# not work at all, so skip it
+# We use install-data-hook here to workaround a bug in automake and/or libtool
+# that makes the install target for the loader libraries a dependency on
+# install-data-am, and not install-exec-am. We need to ensure this gets run
+# after the libraries are installed in their final locations.
 install-data-hook:
-       if test -z "$(DESTDIR)"; then \
+       @if $(RUN_QUERY_LOADER_TEST) ; then \
                $(mkinstalldirs) $(DESTDIR)$(gdk_pixbuf_binarydir) ; \
                $(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \
+       else \
+         echo "***" ; \
+         echo "*** Warning: loaders.cache not built" ; \
+         echo "***" ; \
+         echo "*** Generate this file manually on host" ; \
+         echo "*** system using gdk-pixbuf-query-loaders" ; \
+         echo "***" ; \
        fi
 
 CLEANFILES = \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]