Source: bogofilter
Version: 1.2.4+dfsg1-7
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

bogofilter fails to cross build from source, because it doesn't pass
--host to configure and thus uses the build architecture toolchain.
Ultimately, the failure occurs when it misses required dependencies. I
am proposing to simply switch the explicit configure invocations to
dh_auto_configure which knows the right flags (including --host) to
pass. After applying the attached patch, bogofilter cross builds just
fine.

Helmut
diff --minimal -Nru bogofilter-1.2.4+dfsg1/debian/changelog 
bogofilter-1.2.4+dfsg1/debian/changelog
--- bogofilter-1.2.4+dfsg1/debian/changelog     2016-07-28 17:37:33.000000000 
+0200
+++ bogofilter-1.2.4+dfsg1/debian/changelog     2016-09-15 05:46:08.000000000 
+0200
@@ -1,3 +1,10 @@
+bogofilter (1.2.4+dfsg1-7.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Let dh_auto_configure pass the right flags. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 15 Sep 2016 05:45:40 +0200
+
 bogofilter (1.2.4+dfsg1-7) unstable; urgency=medium
 
   * QA upload. (Closes: #832291). Thanks Andreas Beckmann.
diff --minimal -Nru bogofilter-1.2.4+dfsg1/debian/rules 
bogofilter-1.2.4+dfsg1/debian/rules
--- bogofilter-1.2.4+dfsg1/debian/rules 2016-05-15 15:35:55.000000000 +0200
+++ bogofilter-1.2.4+dfsg1/debian/rules 2016-09-15 05:55:09.000000000 +0200
@@ -18,21 +18,17 @@
        dh $@  --with autotools-dev
 
 override_dh_auto_configure:
-       mkdir -p $(CURDIR)/obj-doc
-       cd $(CURDIR)/obj-doc && ../configure
-       mkdir $(CURDIR)/obj-db $(CURDIR)/obj-sqlite
-       cd $(CURDIR)/obj-db && ../configure --with-database=db \
-               --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc \
+       dh_auto_configure --builddirectory=$(CURDIR)/obj-doc
+       dh_auto_configure --builddirectory=$(CURDIR)/obj-db -- 
--with-database=db \
                AWK=awk $(shell dpkg-buildflags --export=configure)
-       cd $(CURDIR)/obj-sqlite && ../configure --with-database=sqlite \
-               --program-suffix=-sqlite --prefix=/usr 
--mandir=\$${prefix}/share/man \
-               --sysconfdir=/etc AWK=awk $(shell dpkg-buildflags 
--export=configure) && \
-               sed -i 's/^INTEGRITY_TESTS.*/INTEGRITY_TESTS=t.lock1/' 
src/tests/Makefile
+       dh_auto_configure --builddirectory=$(CURDIR)/obj-sqlite -- 
--with-database=sqlite \
+               --program-suffix=-sqlite \
+               AWK=awk $(shell dpkg-buildflags --export=configure)
+       sed -i 's/^INTEGRITY_TESTS.*/INTEGRITY_TESTS=t.lock1/' 
$(CURDIR)/obj-sqlite/src/tests/Makefile
        if [ $(DO_TOKYOCABINET) = yes ]; then \
-               mkdir $(CURDIR)/obj-tokyocabinet; \
-               cd $(CURDIR)/obj-tokyocabinet && ../configure \
+               dh_auto_configure --builddirectory=$(CURDIR)/obj-tokyocabinet 
-- \
                        --with-database=tokyocabinet 
--program-suffix=-tokyocabinet \
-                       --prefix=/usr --mandir=\$${prefix}/share/man 
--sysconfdir=/etc AWK=awk \
+                       AWK=awk \
                        $(shell dpkg-buildflags --export=configure); \
        fi
        

Reply via email to