Source: pqiv
Version: 2.10.4-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

pqiv fails to cross build from source. For cross building pqiv, one is
supposed to pass --cross to ./configure. Even then it fails, because its
GNUmakefile (sic) fails to detect that X11 is needed using the wrong
pkg-config. The attached patch fixes both and makes pqiv cross
buildable. Please consider applying the attached patch.

Helmut
diff --minimal -Nru pqiv-2.10.4/debian/changelog pqiv-2.10.4/debian/changelog
--- pqiv-2.10.4/debian/changelog        2018-04-23 20:30:00.000000000 +0200
+++ pqiv-2.10.4/debian/changelog        2018-11-12 17:38:48.000000000 +0100
@@ -1,3 +1,12 @@
+pqiv (2.10.4-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Pass --cross to ./configure.
+    + cross.patch: Don't hard code the build architecture pkg-config.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 12 Nov 2018 17:38:48 +0100
+
 pqiv (2.10.4-1) unstable; urgency=medium
 
   * New maintainer.
diff --minimal -Nru pqiv-2.10.4/debian/patches/cross.patch 
pqiv-2.10.4/debian/patches/cross.patch
--- pqiv-2.10.4/debian/patches/cross.patch      1970-01-01 01:00:00.000000000 
+0100
+++ pqiv-2.10.4/debian/patches/cross.patch      2018-11-12 17:38:48.000000000 
+0100
@@ -0,0 +1,11 @@
+--- pqiv-2.10.4.orig/GNUmakefile
++++ pqiv-2.10.4/GNUmakefile
+@@ -94,7 +94,7 @@
+ endif
+ 
+ # We need X11 to workaround a bug, see 
http://stackoverflow.com/questions/18647475
+-ifeq ($(filter x11, $(shell pkg-config --errors-to-stdout --variable=target 
gtk+-$(GTK_VERSION).0; pkg-config --errors-to-stdout --variable=targets 
gtk+-$(GTK_VERSION).0)), x11)
++ifeq ($(filter x11, $(shell $(PKG_CONFIG) --errors-to-stdout 
--variable=target gtk+-$(GTK_VERSION).0; $(PKG_CONFIG) --errors-to-stdout 
--variable=targets gtk+-$(GTK_VERSION).0)), x11)
+       LIBS+=x11
+ endif
+ 
diff --minimal -Nru pqiv-2.10.4/debian/patches/series 
pqiv-2.10.4/debian/patches/series
--- pqiv-2.10.4/debian/patches/series   1970-01-01 01:00:00.000000000 +0100
+++ pqiv-2.10.4/debian/patches/series   2018-11-12 17:38:48.000000000 +0100
@@ -0,0 +1 @@
+cross.patch
diff --minimal -Nru pqiv-2.10.4/debian/rules pqiv-2.10.4/debian/rules
--- pqiv-2.10.4/debian/rules    2018-04-23 20:30:00.000000000 +0200
+++ pqiv-2.10.4/debian/rules    2018-11-12 17:38:43.000000000 +0100
@@ -4,12 +4,17 @@
 export VERBOSE=1
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
+include /usr/share/dpkg/architecture.mk
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+CONFIGURE_FLAGS += --cross=$(DEB_HOST_GNU_TYPE)
+endif
+
 %:
        dh $@
 
 
 override_dh_auto_configure:
-       ./configure --backends-build=shared
+       ./configure --backends-build=shared $(CONFIGURE_FLAGS)
 
 override_dh_shlibdeps:
        dh_shlibdeps -Xlib

Reply via email to