Source: flint
Version: 2.5.2-18
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

flint fails to cross build from source, because it uses the build
architecture compilers. The attached patch fixes that by seeding them
from dpkg's buildtools.mk and then passing them to ./configure. It makes
flint cross buildable. Please consider applying it.

Helmut
diff --minimal -Nru flint-2.5.2/debian/changelog flint-2.5.2/debian/changelog
--- flint-2.5.2/debian/changelog        2018-04-24 23:51:04.000000000 +0200
+++ flint-2.5.2/debian/changelog        2018-11-02 21:02:05.000000000 +0100
@@ -1,3 +1,10 @@
+flint (2.5.2-18.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Pass CC and CXX to ./configure. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 02 Nov 2018 21:02:05 +0100
+
 flint (2.5.2-18) unstable; urgency=medium
 
   * Add patch to fix FTBFS (Closes: #896470).
diff --minimal -Nru flint-2.5.2/debian/rules flint-2.5.2/debian/rules
--- flint-2.5.2/debian/rules    2018-04-24 23:51:04.000000000 +0200
+++ flint-2.5.2/debian/rules    2018-11-02 21:02:05.000000000 +0100
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 
 include /usr/share/dpkg/pkg-info.mk
+-include /usr/share/dpkg/buildtools.mk
 
 EXTRA_SHARED_FLAGS=-Wl,-soname,libflint-$(DEB_VERSION_UPSTREAM).so
 MAKE_OVERRIDE = AT= QUIET_CXX= QUIET_CC= QUIET_AR= INCS=-I$(CURDIR) \
@@ -29,7 +30,7 @@
 # inject flags using configure. let's hope CFLAGS will always be good enough
 # even for $(CXX)
 override_dh_auto_configure:
-       ./configure --prefix="/usr" --with-ntl CFLAGS='$(CPPFLAGS) $(CFLAGS)'
+       ./configure --prefix="/usr" --with-ntl CC='$(CC)' CXX='$(CXX)' 
CFLAGS='$(CPPFLAGS) $(CFLAGS)'
        sed -i Makefile -e 
"/^FLINT_LIB\>=/s/libflint/libflint-$(DEB_VERSION_UPSTREAM)/"
 
 override_dh_auto_build:

Reply via email to