Source: libnftnl
Version: 1.0.7-1
Tags: patch
User: [email protected]
Usertags: rebootstrap

libnftnl fails to cross build from source, because it configures for the
build architecture by not passing --host to ./configure. It subsequently
fails finding libmnl, which is only requested for the host architecture
in Build-Depends. Letting dh_auto_configure pass that flag fixes this
part. After also making the build honour DEB_BUILD_OPTIONS=nocheck,
libnftnl cross builds successfully. Please consider applying the
attached patch.

Helmut
diff --minimal -Nru libnftnl-1.0.7/debian/changelog 
libnftnl-1.0.7/debian/changelog
--- libnftnl-1.0.7/debian/changelog     2016-12-21 12:46:36.000000000 +0100
+++ libnftnl-1.0.7/debian/changelog     2017-08-16 12:03:16.000000000 +0200
@@ -1,3 +1,12 @@
+libnftnl (1.0.7-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_configure pass --host to ./configure.
+    + Honour DEB_BUILD_OPTIONS=nocheck.
+
+ -- Helmut Grohne <[email protected]>  Wed, 16 Aug 2017 12:03:16 +0200
+
 libnftnl (1.0.7-1) unstable; urgency=medium
 
   * [7b8a6bc] d/libnftnl4.symbols: delete debian revision from symbols
diff --minimal -Nru libnftnl-1.0.7/debian/rules libnftnl-1.0.7/debian/rules
--- libnftnl-1.0.7/debian/rules 2016-12-21 12:06:28.000000000 +0100
+++ libnftnl-1.0.7/debian/rules 2017-08-16 12:03:15.000000000 +0200
@@ -7,18 +7,18 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 DEB_BUILD_ARCH_ENDIAN ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_ENDIAN)
 
 %:
        dh $@ --with autoreconf
 
 override_dh_auto_configure:
-       ./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) 
--with-json-parsing --disable-silent-rules
+       dh_auto_configure -- --with-json-parsing
 
 override_dh_strip:
        dh_strip --dbg-package=libnftnl4-dbg
 
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 override_dh_auto_test:
        dh_auto_test
 
@@ -26,3 +26,4 @@
 ifeq (little,$(DEB_BUILD_ARCH_ENDIAN))
        sh -c "cd tests; set -e; ./test-script.sh"
 endif
+endif

Reply via email to