Source: netsniff-ng
Version: 0.6.5-1
Tags: patch
User: [email protected]
Usertags: rebootstrap

netsniff-ng fails to cross build from source, because nothing tells its
./configure which architecture we are building for and thus it just
builds for the build architecture. We cannot use dh_auto_configure,
because netsniff-ng's ./configure is very much unlike autotools. Rather
one is supposed to stuff the host architecture into a variable called
CROSS_COMPILE. The attached patch implements that and makes netsniff-ng
cross buildable. Please consider applying it.

Helmut
diff --minimal -Nru netsniff-ng-0.6.5/debian/changelog 
netsniff-ng-0.6.5/debian/changelog
--- netsniff-ng-0.6.5/debian/changelog  2018-09-20 15:06:14.000000000 +0200
+++ netsniff-ng-0.6.5/debian/changelog  2018-11-25 21:47:27.000000000 +0100
@@ -1,3 +1,10 @@
+netsniff-ng (0.6.5-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Tell ./configure about the host architecture. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Sun, 25 Nov 2018 21:47:27 +0100
+
 netsniff-ng (0.6.5-1) unstable; urgency=low
 
   * New upstream release.
diff --minimal -Nru netsniff-ng-0.6.5/debian/rules 
netsniff-ng-0.6.5/debian/rules
--- netsniff-ng-0.6.5/debian/rules      2018-09-20 15:01:55.000000000 +0200
+++ netsniff-ng-0.6.5/debian/rules      2018-11-25 21:47:27.000000000 +0100
@@ -5,7 +5,9 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/architecture.mk
 include /usr/share/dpkg/buildflags.mk
+export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
 
 CFLAGS+=$(CPPFLAGS)
 CXXFLAGS+=$(CPPFLAGS)

Reply via email to