[Debian-med-packaging] Bug#942115: elph FTCBFS: does not pass cross tools to make

Helmut Grohne helmut at subdivi.de
Thu Oct 10 15:51:00 BST 2019


Source: elph
Version: 1.0.1-3
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

elph fails to cross build from source, because it does not pass cross
tools to make. The fix is a bit more involved than simply using
dh_auto_build due to the use of help2man. Please consider applying the
attached patch.

Helmut
-------------- next part --------------
diff --minimal -Nru elph-1.0.1/debian/changelog elph-1.0.1/debian/changelog
--- elph-1.0.1/debian/changelog	2019-10-09 07:46:01.000000000 +0200
+++ elph-1.0.1/debian/changelog	2019-10-10 16:43:50.000000000 +0200
@@ -1,3 +1,13 @@
+elph (1.0.1-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + Also override LINKER.
+    + Build twice for help2man.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Thu, 10 Oct 2019 16:43:50 +0200
+
 elph (1.0.1-3) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru elph-1.0.1/debian/rules elph-1.0.1/debian/rules
--- elph-1.0.1/debian/rules	2019-10-09 07:46:01.000000000 +0200
+++ elph-1.0.1/debian/rules	2019-10-10 16:43:50.000000000 +0200
@@ -1,4 +1,5 @@
 #!/usr/bin/make -f
+include /usr/share/dpkg/architecture.mk
 export DH_VERBOSE = 1
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
@@ -7,13 +8,16 @@
 
 
 %:
-	dh $@
+	dh $@ --sourcedirectory=sources
 
 override_dh_auto_build:
-	$(MAKE) -C sources all
+	dpkg-architecture -f -a$(DEB_BUILD_ARCH) -c dh_auto_build -- LINKER='$$(CXX)'
 	help2man -h "-h" -n ELPH --version-string=1.0.1 --no-discard-stderr  sources/elph > debian/elph.1
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+	dh_auto_clean
+	dh_auto_build -- LINKER='$$(CXX)'
+endif
 
 override_dh_auto_clean:
-	$(MAKE) -C sources clean
 	dh_auto_clean
 	rm -f debian/elph.1


More information about the Debian-med-packaging mailing list