Source: lzma
Version: 9.22-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

lzma fails to cross build from source, because it uses the build
architecture toolchain which leads to a dh_strip failure when using host
tools. Since debhelper 10.2.1, dh_auto_build knows how to pass cross
toolchains via the makefile buildsystem, so replacing the explicit make
invocations with dh_auto_build mostly fixes the cross build except for
the odd use of CXX_C instead of CC. After applying the attached patch,
lzma cross builds fine. Please consider applying it to the package.

Helmut
diff --minimal -Nru lzma-9.22/debian/changelog lzma-9.22/debian/changelog
--- lzma-9.22/debian/changelog  2012-01-08 15:30:10.000000000 +0100
+++ lzma-9.22/debian/changelog  2016-10-05 19:17:55.000000000 +0200
@@ -1,3 +1,10 @@
+lzma (9.22-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Let dh_auto_build pass cross flags. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 05 Oct 2016 19:17:41 +0200
+
 lzma (9.22-2) unstable; urgency=low
 
   * Upload to unstable.
diff --minimal -Nru lzma-9.22/debian/rules lzma-9.22/debian/rules
--- lzma-9.22/debian/rules      2011-09-03 23:38:22.000000000 +0200
+++ lzma-9.22/debian/rules      2016-10-05 19:24:06.000000000 +0200
@@ -20,8 +20,8 @@
 export DH_OPTIONS
 
 override_dh_auto_build:
-       $(MAKE) all -C $(SRC_DIR_C) -f makefile.gcc
-       $(MAKE) all -C $(SRC_DIR_CPP) -f makefile.gcc
+       dh_auto_build -- all -C $(SRC_DIR_C) -f makefile.gcc
+       dh_auto_build -- all -C $(SRC_DIR_CPP) -f makefile.gcc CXX_C='$$(CC)'
 
 override_dh_auto_clean:
        $(MAKE) clean -C $(SRC_DIR_C) -f makefile.gcc
@@ -30,4 +30,4 @@
                $(SRC_DIR_CPP)/*.o $(SRC_DIR_CPP)/*.a
 
 %:
-       dh $@ 
+       dh $@ --buildsystem=makefile

Reply via email to