Source: mg
Version: 20170401-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

mg fails to cross build from source, because it uses the build
architecture pkg-config and thus fails finding libbsd (during make
clean). After passing a suitable PKG_CONFIG and cross compilers to make,
it cross builds successfully. Please consider applying the attached
patch.

Helmut
diff --minimal -Nru mg-20170401/debian/changelog mg-20170401/debian/changelog
--- mg-20170401/debian/changelog        2017-04-05 11:26:46.000000000 +0200
+++ mg-20170401/debian/changelog        2017-07-02 16:28:34.000000000 +0200
@@ -1,3 +1,12 @@
+mg (20170401-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Pass PKG_CONFIG via MAKE_VARS to make clean
+    + Let dh_auto_build pass cross compilers to make
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 02 Jul 2017 16:28:34 +0200
+
 mg (20170401-1) unstable; urgency=medium
 
   * new upstream version 20170401
diff --minimal -Nru mg-20170401/debian/rules mg-20170401/debian/rules
--- mg-20170401/debian/rules    2017-04-05 11:26:46.000000000 +0200
+++ mg-20170401/debian/rules    2017-07-02 16:28:34.000000000 +0200
@@ -3,13 +3,19 @@
 DH_VERBOSE=1
 # export DH_OPTIONS=-v
 
-MAKE_VARS=DESTDIR=debian/mg prefix=/usr mandir=/usr/share/man 
CURSES_LIBS=-ltinfo
+include /usr/share/dpkg/architecture.mk
+PKG_CONFIG ?= $(DEB_HOST_GNU_TYPE)-pkg-config
+
+MAKE_VARS=DESTDIR=debian/mg prefix=/usr mandir=/usr/share/man 
CURSES_LIBS=-ltinfo PKG_CONFIG='$(PKG_CONFIG)'
 
 %:
        dh $@
 
+override_dh_auto_clean:
+       dh_auto_clean -- $(MAKE_VARS)
+
 override_dh_auto_build:
-       $(MAKE) $(MAKE_VARS)
+       dh_auto_build -- $(MAKE_VARS)
 
 override_dh_auto_install:
        $(MAKE) install $(MAKE_VARS)

Reply via email to