Source: tinyproxy
Version: 1.8.4-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

tinyproxy fails to cross build from source, because its configure tests
the regex library using a AC_TRY_RUN check and assumes that it is
broken. The check doesn't have an influence on the build result
otherwise and can be opted out with --disable-regexcheck. Once doing
that (for cross builds only), tinyproxy cross successfully. Please
consider applying the attached patch.

Helmut
diff --minimal -Nru tinyproxy-1.8.4/debian/changelog 
tinyproxy-1.8.4/debian/changelog
--- tinyproxy-1.8.4/debian/changelog    2017-01-21 12:40:00.000000000 +0100
+++ tinyproxy-1.8.4/debian/changelog    2017-06-25 07:37:47.000000000 +0200
@@ -1,3 +1,10 @@
+tinyproxy (1.8.4-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: --disable-regexcheck during cross builds (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 25 Jun 2017 07:37:47 +0200
+
 tinyproxy (1.8.4-2) unstable; urgency=medium
 
   * Remove obsolete preinst and postinst maintainer scripts.
diff --minimal -Nru tinyproxy-1.8.4/debian/rules tinyproxy-1.8.4/debian/rules
--- tinyproxy-1.8.4/debian/rules        2017-01-20 02:39:38.000000000 +0100
+++ tinyproxy-1.8.4/debian/rules        2017-06-25 07:37:45.000000000 +0200
@@ -2,17 +2,24 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
-DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+include /usr/share/dpkg/architecture.mk
 
 %:
        dh $@ --with autoreconf
 
+ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+CONFIGURE_ARGS = --enable-regexcheck
+else
+# doesn't influence the built, but is an AC_TRY_RUN check
+CONFIGURE_ARGS = --disable-regexcheck
+endif
+
 override_dh_auto_configure:
        dh_auto_configure -- \
                --sysconfdir=/etc/tinyproxy \
                --enable-filter \
                --enable-transparent \
-               --enable-regexcheck \
+               $(CONFIGURE_ARGS) \
                --enable-reverse \
                --enable-upstream \
                --enable-xtinyproxy

Reply via email to