Source: lzlib
Version: 1.9-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

lzlib fails to cross build from source, because it uses the build
architecture compiler. Its configure is not an autotools one and ignores
the --host flag generated by dh_auto_configure. It rather expects a CC=
assignment with a cross compiler. After doing so, it cross builds
successfully. Please consider applying the attached patch.

Helmut
diff --minimal -Nru lzlib-1.9/debian/changelog lzlib-1.9/debian/changelog
--- lzlib-1.9/debian/changelog  2017-06-18 21:41:16.000000000 +0200
+++ lzlib-1.9/debian/changelog  2017-08-09 22:07:59.000000000 +0200
@@ -1,3 +1,10 @@
+lzlib (1.9-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass triplet-prefixed CC to ./configure. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 09 Aug 2017 22:07:59 +0200
+
 lzlib (1.9-2) unstable; urgency=low
 
   * Uploading to sid.
diff --minimal -Nru lzlib-1.9/debian/rules lzlib-1.9/debian/rules
--- lzlib-1.9/debian/rules      2017-05-15 13:51:13.000000000 +0200
+++ lzlib-1.9/debian/rules      2017-08-09 22:07:57.000000000 +0200
@@ -1,12 +1,15 @@
 #!/usr/bin/make -f
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
 
 %:
        dh ${@}
 
 override_dh_auto_configure:
-       dh_auto_configure -- --enable-shared 
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
+       dh_auto_configure -- --enable-shared 
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) 'CC=$(CC)'
 
 override_dh_auto_install:
        dh_auto_install -- LDCONFIG=/bin/true

Reply via email to