Source: libtommath
Version: 1.1.0-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

libtommath fails to cross build from source, because it builds for the
wrong architecture (by not passing a cross compiler to make) and because
it fails running tests in the presence of DEB_BUILD_OPTIONS=nocheck. The
attached patch fixes both and makes libtommath cross buildable. Please
consider applying it (possibly after buster).

Helmut
diff --minimal -Nru libtommath-1.1.0/debian/changelog 
libtommath-1.1.0/debian/changelog
--- libtommath-1.1.0/debian/changelog   2019-02-05 10:53:16.000000000 +0100
+++ libtommath-1.1.0/debian/changelog   2019-02-08 06:33:49.000000000 +0100
@@ -1,3 +1,12 @@
+libtommath (1.1.0-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + Honour DEB_BUILD_OPTIONS=nocheck.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 08 Feb 2019 06:33:49 +0100
+
 libtommath (1.1.0-2) unstable; urgency=medium
 
   * Build a libtool to drop the libtool-bin dependency.
diff --minimal -Nru libtommath-1.1.0/debian/rules libtommath-1.1.0/debian/rules
--- libtommath-1.1.0/debian/rules       2019-02-05 10:53:16.000000000 +0100
+++ libtommath-1.1.0/debian/rules       2019-02-08 06:33:49.000000000 +0100
@@ -28,15 +28,17 @@
        dh_auto_configure --sourcedirectory=debian/libtool
 
        echo "Building libtommath"
-       $(MAKE) -f makefile.shared LIBTOOL=$(CURDIR)/debian/libtool/libtool
+       dh_auto_build --buildsystem=makefile -- -f makefile.shared 
LIBTOOL=$(CURDIR)/debian/libtool/libtool
        echo "Building docs"
        $(MAKE) manual docs
 
 override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        echo "compiling test programs"
        $(MAKE) -f makefile.shared LIBTOOL=$(CURDIR)/debian/libtool/libtool 
test_standalone
        echo "running test"
        ./test
+endif
 
 override_dh_auto_install:
        $(MAKE) -f makefile.shared LIBTOOL=$(CURDIR)/debian/libtool/libtool 
install

Reply via email to