Source: tofrodos
Version: 1.7.13+ds-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

tofrodos fails to cross build from source, because it uses the build
architecture compiler. In the attached patch, I opted for indirecting
the make invocation via dh_auto_build, because the latter knows how to
pass cross compilers to make. Arguably, debian/rules got simpler in that
process. Please consider applying the attached patch.

Helmut
diff --minimal -Nru tofrodos-1.7.13+ds/debian/changelog 
tofrodos-1.7.13+ds/debian/changelog
--- tofrodos-1.7.13+ds/debian/changelog 2015-10-28 23:17:17.000000000 +0100
+++ tofrodos-1.7.13+ds/debian/changelog 2016-11-10 19:28:30.000000000 +0100
@@ -1,3 +1,10 @@
+tofrodos (1.7.13+ds-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Let dh_auto_build pass cross flags. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 10 Nov 2016 19:28:30 +0100
+
 tofrodos (1.7.13+ds-2) unstable; urgency=medium
 
   * Vcs-Browser: Switch to cgit and https.
diff --minimal -Nru tofrodos-1.7.13+ds/debian/rules 
tofrodos-1.7.13+ds/debian/rules
--- tofrodos-1.7.13+ds/debian/rules     2015-10-28 23:17:17.000000000 +0100
+++ tofrodos-1.7.13+ds/debian/rules     2016-11-10 19:28:28.000000000 +0100
@@ -7,18 +7,17 @@
 
 
 %:
-       dh $@
+       dh $@ --sourcedirectory=src
 
 override_dh_auto_clean:
-       cd $(CURDIR)/src \
-       && $(MAKE) clean \
-       && $(RM) -r -v fromdos todos
+       dh_auto_clean
+       $(RM) -r -v src/fromdos src/todos
 
 override_dh_auto_build:
-       cd $(CURDIR)/src && $(MAKE) CDEBUG="$(CFLAGS)" LDEBUG="$(LDFLAGS)"
+       dh_auto_build -- CDEBUG="$(CFLAGS)" LDEBUG="$(LDFLAGS)"
 
 override_dh_auto_install:
-       cd $(CURDIR)/src && $(MAKE) install \
+       dh_auto_install -- \
                BINDIR=$(CURDIR)/debian/tofrodos/usr/bin \
                MANDIR=$(CURDIR)/debian/tofrodos/usr/share/man/man1
 

Reply via email to