Source: ncompress
Version: 4.2.4.4-17
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

ncompress fails to cross build from source, because debian/rules hard
codes the build architecture compiler and fails running tests despite
DEB_BUILD_OPTIONS=nocheck. After fixing both, it cross builds
successfully. Please consider applying the attached patch.

Helmut
diff --minimal -Nru ncompress-4.2.4.4/debian/changelog 
ncompress-4.2.4.4/debian/changelog
--- ncompress-4.2.4.4/debian/changelog  2017-07-02 23:19:50.000000000 +0200
+++ ncompress-4.2.4.4/debian/changelog  2017-09-18 15:46:31.000000000 +0200
@@ -1,3 +1,12 @@
+ncompress (4.2.4.4-17.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Use a triplet-prefixed compiler.
+    + Honour DEB_BUILD_OPTIONS=nocheck.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 18 Sep 2017 15:46:31 +0200
+
 ncompress (4.2.4.4-17) unstable; urgency=medium
 
   * Bump standards version to 4.0.0.0 (no packaging changes).
diff --minimal -Nru ncompress-4.2.4.4/debian/rules 
ncompress-4.2.4.4/debian/rules
--- ncompress-4.2.4.4/debian/rules      2017-07-02 22:03:38.000000000 +0200
+++ ncompress-4.2.4.4/debian/rules      2017-09-18 15:46:31.000000000 +0200
@@ -8,6 +8,10 @@
 # The buildflags.mk script was introduced along with dpkg-dev 1.16.1.
 DPKG_EXPORT_BUILDFLAGS=1
 -include /usr/share/dpkg/buildflags.mk
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
 
 # Enable all hardening-related compiler options
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
@@ -34,12 +38,14 @@
 
 # This takes the place of an upstream build process
 override_dh_auto_build:
-       gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o compress -DUTIME_H -DNOFUNCDEF 
-DNCOMPRESS_VERSION=$(NCOMPRESS_VERSION) compress42.c
+       $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o compress -DUTIME_H 
-DNOFUNCDEF -DNCOMPRESS_VERSION=$(NCOMPRESS_VERSION) compress42.c
 
 # This takes the place of an upstream clean process
 override_dh_auto_clean:
        rm -f compress
 
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 override_dh_auto_test:
        sh debian/smoketest
+endif
 

Reply via email to