Source: vflib3
Version: 3.6.14.dfsg-3+nmu4
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

vflib3 fails to cross build from source, because ./configure detects the
build architecture compiler "gcc". Unlike a number of other packages,
vflib3 properly passes --build and --host to ./configure. It's not
enough to make it use a cross compiler unfortunately. The attached patch
exports a suitable CC and thus makes the build proceed. It still fails
to cross build, because it uses xmkmf. Please consider applying the
attached patch and closing this bug when doing so.

I note that we want to remove xmkmf from Debian, see #873764. I also
note that the way ./configure invokes xmkmf does not trap errors which
violates the Debian policy section 4.6. Still this bug is only about
./configure detecting the wrong gcc.

Helmut
diff --minimal -Nru vflib3-3.6.14.dfsg/debian/changelog 
vflib3-3.6.14.dfsg/debian/changelog
--- vflib3-3.6.14.dfsg/debian/changelog 2017-11-06 18:23:35.000000000 +0100
+++ vflib3-3.6.14.dfsg/debian/changelog 2018-06-21 19:53:09.000000000 +0200
@@ -1,3 +1,10 @@
+vflib3 (3.6.14.dfsg-3+nmu4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Improve cross building: Export CC for old ./configure. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 21 Jun 2018 19:53:09 +0200
+
 vflib3 (3.6.14.dfsg-3+nmu4) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru vflib3-3.6.14.dfsg/debian/rules 
vflib3-3.6.14.dfsg/debian/rules
--- vflib3-3.6.14.dfsg/debian/rules     2017-11-06 18:23:35.000000000 +0100
+++ vflib3-3.6.14.dfsg/debian/rules     2018-06-21 16:41:27.000000000 +0200
@@ -7,8 +7,9 @@
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+include /usr/share/dpkg/architecture.mk
+DPKG_EXPORT_BUILDTOOLS=1
+-include /usr/share/dpkg/buildtools.mk
 
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
   confflags += --build $(DEB_HOST_GNU_TYPE)

Reply via email to