Source: pure-ftpd
Version: 1.0.46-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

pure-ftpd fails to cross build from source, because it does not pass the
required --host flag to ./configure. The easiest way of doing that is
deferring the task to dh_auto_configure. After doing so, pure-ftpd still
fails to cross build, because it uses AC_RUN_IFELSE without a default.
Most of the checks can be converted to AC_COMPILE_IFELSE or
AC_LINK_IFELSE with little loss, but that requires autoreconfing the
package and that is quite difficult to achieve with the current
packaging. Thus I ask you to just apply the attached patch and closing
this bug when doing so to make the AC_RUN_IFELSE issue apparent to cross
builders. It would also be nice to run autoreconf to be able to fix the
other issues.

Helmut
diff -u pure-ftpd-1.0.46/debian/changelog pure-ftpd-1.0.46/debian/changelog
--- pure-ftpd-1.0.46/debian/changelog
+++ pure-ftpd-1.0.46/debian/changelog
@@ -1,3 +1,11 @@
+pure-ftpd (1.0.46-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Partially fix FTCBFS: Let dh_auto_configure pass --host to ./configure.
+    (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 02 Jan 2018 19:51:18 +0100
+
 pure-ftpd (1.0.46-1) unstable; urgency=medium
 
   * New upstream release (Closes: #861159, #867380):
diff -u pure-ftpd-1.0.46/debian/rules pure-ftpd-1.0.46/debian/rules
--- pure-ftpd-1.0.46/debian/rules
+++ pure-ftpd-1.0.46/debian/rules
@@ -5,7 +5,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-cfgflags=--prefix=/usr --mandir='$${prefix}'/share/man 
--sysconfdir=/etc/pure-ftpd CFLAGS="-O2 -DMAX_USER_LENGTH=128U"
+cfgflags=--sysconfdir=/etc/pure-ftpd CFLAGS="-O2 -DMAX_USER_LENGTH=128U"
 optflags=--with-everything --with-largefile --with-pam --with-privsep 
--with-tls --with-rfc2640
 bin=pure-pw pure-statsdecode pure-pwconvert
 sbin=pure-authd pure-ftpwho pure-uploadscript pure-quotacheck pure-ftpd 
pure-mrtginfo
@@ -15,7 +15,7 @@
 src/vanilla/pure-ftpd:
        dh_testdir
        [ ! -f Makefile ] || $(MAKE) distclean
-       ./configure $(cfgflags) $(optflags)
+       dh_auto_configure -- $(cfgflags) $(optflags)
        $(MAKE)
        mkdir $(@D)
        mv $(addprefix src/, $(bin) $(sbin)) $(@D)
@@ -23,7 +23,7 @@
 src/ldap/pure-ftpd:
        dh_testdir
        [ ! -f Makefile ] || $(MAKE) distclean
-       ./configure $(cfgflags) $(optflags) --with-ldap
+       dh_auto_configure -- $(cfgflags) $(optflags) --with-ldap
        $(MAKE)
        mkdir $(@D)
        mv $(addprefix src/, $(bin) $(sbin)) $(@D)
@@ -31,7 +31,7 @@
 src/mysql/pure-ftpd:
        dh_testdir
        [ ! -f Makefile ] || $(MAKE) distclean
-       ./configure $(cfgflags) $(optflags) --with-mysql
+       dh_auto_configure -- $(cfgflags) $(optflags) --with-mysql
        $(MAKE)
        mkdir $(@D)
        mv $(addprefix src/, $(bin) $(sbin)) $(@D)
@@ -39,7 +39,7 @@
 src/postgresql/pure-ftpd:
        dh_testdir
        [ ! -f Makefile ] || $(MAKE) distclean
-       ./configure $(cfgflags) $(optflags) --with-pgsql
+       dh_auto_configure -- $(cfgflags) $(optflags) --with-pgsql
        $(MAKE)
        mkdir $(@D)
        mv $(addprefix src/, $(bin) $(sbin)) $(@D)
@@ -47,7 +47,7 @@
 src/vanilla-virtualchroot/pure-ftpd:
        dh_testdir
        [ ! -f Makefile ] || $(MAKE) distclean
-       ./configure $(cfgflags) $(optflags) --with-virtualchroot
+       dh_auto_configure -- $(cfgflags) $(optflags) --with-virtualchroot
        $(MAKE)
        mkdir $(@D)
        mv $(addprefix src/, $(bin) $(sbin)) $(@D)
@@ -55,7 +55,7 @@
 src/ldap-virtualchroot/pure-ftpd:
        dh_testdir
        [ ! -f Makefile ] || $(MAKE) distclean
-       ./configure $(cfgflags) $(optflags) --with-virtualchroot --with-ldap
+       dh_auto_configure -- $(cfgflags) $(optflags) --with-virtualchroot 
--with-ldap
        $(MAKE)
        mkdir $(@D)
        mv $(addprefix src/, $(bin) $(sbin)) $(@D)
@@ -63,7 +63,7 @@
 src/mysql-virtualchroot/pure-ftpd:
        dh_testdir
        [ ! -f Makefile ] || $(MAKE) distclean
-       ./configure $(cfgflags) $(optflags) --with-virtualchroot --with-mysql
+       dh_auto_configure -- $(cfgflags) $(optflags) --with-virtualchroot 
--with-mysql
        $(MAKE)
        mkdir $(@D)
        mv $(addprefix src/, $(bin) $(sbin)) $(@D)
@@ -71,7 +71,7 @@
 src/postgresql-virtualchroot/pure-ftpd:
        dh_testdir
        [ ! -f Makefile ] || $(MAKE) distclean
-       ./configure $(cfgflags) $(optflags) --with-virtualchroot --with-pgsql
+       dh_auto_configure -- $(cfgflags) $(optflags) --with-virtualchroot 
--with-pgsql
        $(MAKE)
        mkdir $(@D)
        mv $(addprefix src/, $(bin) $(sbin)) $(@D)

Reply via email to