summaryrefslogtreecommitdiffstats
path: root/graphics/djview4/patches/0001-cross-build-pkg-config-info.patch
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/djview4/patches/0001-cross-build-pkg-config-info.patch')
-rw-r--r--graphics/djview4/patches/0001-cross-build-pkg-config-info.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/graphics/djview4/patches/0001-cross-build-pkg-config-info.patch b/graphics/djview4/patches/0001-cross-build-pkg-config-info.patch
new file mode 100644
index 0000000000..2f2f46ea2c
--- /dev/null
+++ b/graphics/djview4/patches/0001-cross-build-pkg-config-info.patch
@@ -0,0 +1,86 @@
+From: Helmut Grohne <helmutg@debian.org>
+Date: Thu, 4 Jan 2018 08:48:09 +0100
+Subject: cross build pkg-config info
+
+Issue: djview4 FTCBFS: uses custom, broken macro AC_PROG_PKG_CONFIG
+See: https://bugs.debian.org/886304
+
+djview4 fails to cross build from source, because it uses the build
+architecture pkg-config rather than the host architecture one. This is
+due to its use of AC_PROG_PKG_CONFIG, which fails to consider
+$ac_tool_prefix. After replacing the macro with the upstream macro
+PKG_PROG_PKG_CONFIG (from pkg.m4 in pkg-config), the build continues a
+bit further and uses the wrong qmake. I need to discuss the qmake issue
+with the qt people. Can you apply the attached patch anyway and close
+this bug report when doing so? That'd make the qmake failure immediately
+visible and thus easier to discuss.
+---
+ config/acinclude.m4 | 26 ++------------------------
+ configure.ac | 3 ++-
+ 2 files changed, 4 insertions(+), 25 deletions(-)
+
+diff --git a/config/acinclude.m4 b/config/acinclude.m4
+index 3c78d41..2912000 100644
+--- a/config/acinclude.m4
++++ b/config/acinclude.m4
+@@ -168,28 +168,6 @@ TIFFOpen(0,0);
+
+
+
+-
+-dnl ------------------------------------------------------------------
+-dnl @synopsis AC_PROG_PKG_CONFIG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+-dnl Sets output variables PKG_CONFIG
+-dnl ------------------------------------------------------------------
+-
+-
+-AC_DEFUN([AC_PROG_PKG_CONFIG],
+-[
+- AC_ARG_VAR(PKG_CONFIG,[Location of the pkg-config program.])
+- AC_ARG_VAR(PKG_CONFIG_PATH, [Path for pkg-config descriptors.])
+- AC_PATH_PROG(PKG_CONFIG, pkg-config)
+- if test -z "$PKG_CONFIG" ; then
+- ifelse([$2],,:,[$2])
+- else
+- ifelse([$1],,:,[$1])
+- fi
+-])
+-
+-
+-
+-
+ dnl ------------------------------------------------------------------
+ dnl @synopsis AC_PATH_DDJVUUAPI([action-if-found],[action-if-notfound])
+ dnl Search for ddjvuapi. Defines HAVE_DDJVUAPI.
+@@ -198,7 +176,7 @@ dnl ------------------------------------------------------------------
+
+ AC_DEFUN([AC_PATH_DDJVUAPI],
+ [
+- AC_REQUIRE([AC_PROG_PKG_CONFIG])
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_ARG_VAR(DDJVUAPI_LIBS, [Libraries for ddjvuapi])
+ AC_ARG_VAR(DDJVUAPI_CFLAGS, [Compilation flags for ddjvuapi])
+ AC_MSG_CHECKING([for ddjvuapi])
+@@ -236,7 +214,7 @@ dnl ------------------------------------------------------------------
+
+ AC_DEFUN([AC_PATH_GLIB],
+ [
+- AC_REQUIRE([AC_PROG_PKG_CONFIG])
++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ AC_ARG_VAR(GLIB_LIBS, [Libraries for glib-2.0])
+ AC_ARG_VAR(GLIB_CFLAGS, [Compilation flags for glib-2.0])
+ AC_MSG_CHECKING([for glib])
+diff --git a/configure.ac b/configure.ac
+index 473a456..e93aee8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -172,7 +172,8 @@ AC_CHECK_FUNCS(sigaction strerror waitpid wait3)
+ # Packages
+ # ----------------------------------------
+
+-AC_PROG_PKG_CONFIG([],[
++PKG_PROG_PKG_CONFIG
++AS_IF([test -z "$PKG_CONFIG"],[
+ AC_MSG_ERROR([Cannot find required program pkg-config.])
+ ])
+