Source: uw-imap Version: 8:2007f~dfsg-5 Tags: patch User: helm...@debian.org Usertags: rebootstrap
uw-imap fails to cross build from source, because it uses the build architecture compiler. After indirecting the make invocations through dh_auto_build (which passes cross compilers), only a few build architecture compiler invocations hard coded from Debian patches remain. After fixing those, uw-imap cross builds successfully. Please consider applying the attached patch. Helmut
diff --minimal -Nru uw-imap-2007f~dfsg/debian/changelog uw-imap-2007f~dfsg/debian/changelog --- uw-imap-2007f~dfsg/debian/changelog 2016-11-23 22:25:10.000000000 +0100 +++ uw-imap-2007f~dfsg/debian/changelog 2017-09-18 10:02:47.000000000 +0200 @@ -1,3 +1,12 @@ +uw-imap (8:2007f~dfsg-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross compilers to make. + + Do not hard code build architecture compiler gcc in Debian patches. + + -- Helmut Grohne <hel...@subdivi.de> Mon, 18 Sep 2017 10:02:47 +0200 + uw-imap (8:2007f~dfsg-5) unstable; urgency=low * 1006_openssl1.1_autoverify.patch (new): Use new features for diff --minimal -Nru uw-imap-2007f~dfsg/debian/patches/1001_shlibs.patch uw-imap-2007f~dfsg/debian/patches/1001_shlibs.patch --- uw-imap-2007f~dfsg/debian/patches/1001_shlibs.patch 2016-11-23 22:25:10.000000000 +0100 +++ uw-imap-2007f~dfsg/debian/patches/1001_shlibs.patch 2017-09-18 10:02:47.000000000 +0200 @@ -171,7 +171,7 @@ + BASECFLAGS="-fPIC $(GCCCFLAGS)" \ + ARCHIVE="libc-client.so" \ + BASELDFLAGS="-L../c-client -lc-client $(PAMLDFLAGS) -lc" \ -+ ARRC="gcc --shared -Wl,-soname,libc-client.so.$(VERSION) -o" \ ++ ARRC="$(CC) --shared -Wl,-soname,libc-client.so.$(VERSION) -o" \ + LIBRARIES="$(PAMLDFLAGS) $(EXTRALDFLAGS) $(SSLLDFLAGS) -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \ + RANLIB=true diff --minimal -Nru uw-imap-2007f~dfsg/debian/patches/2012_krb5_multidev.patch uw-imap-2007f~dfsg/debian/patches/2012_krb5_multidev.patch --- uw-imap-2007f~dfsg/debian/patches/2012_krb5_multidev.patch 2016-11-23 22:25:10.000000000 +0100 +++ uw-imap-2007f~dfsg/debian/patches/2012_krb5_multidev.patch 2017-09-18 10:02:47.000000000 +0200 @@ -22,7 +22,7 @@ + BASECFLAGS="-fPIC $(GCCCFLAGS) $(shell krb5-config.mit --cflags gssapi)" \ ARCHIVE="libc-client.so" \ BASELDFLAGS="-L../c-client -lc-client $(PAMLDFLAGS) -lc" \ - ARRC="gcc --shared -Wl,-soname,libc-client.so.$(VERSION) -o" \ + ARRC="$(CC) --shared -Wl,-soname,libc-client.so.$(VERSION) -o" \ - LIBRARIES="$(PAMLDFLAGS) $(EXTRALDFLAGS) $(SSLLDFLAGS) -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \ + LIBRARIES="$(PAMLDFLAGS) $(EXTRALDFLAGS) $(SSLLDFLAGS) $(shell krb5-config.mit --libs gssapi)" \ RANLIB=true diff --minimal -Nru uw-imap-2007f~dfsg/debian/rules uw-imap-2007f~dfsg/debian/rules --- uw-imap-2007f~dfsg/debian/rules 2016-11-23 22:25:10.000000000 +0100 +++ uw-imap-2007f~dfsg/debian/rules 2017-09-18 10:02:44.000000000 +0200 @@ -76,11 +76,11 @@ # Debian libc is believed to be IPv6-safe touch ip6 - $(MAKE) VERSION=$(major) EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)' EXTRACFLAGS='$(CFLAGS)' EXTRALDFLAGS='$(LDFLAGS)' ldb + dh_auto_build -- VERSION=$(major) EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)' EXTRACFLAGS='$(CFLAGS)' EXTRALDFLAGS='$(LDFLAGS)' ldb mv c-client/c-client.a . $(MAKE) clean # Use PAM - $(MAKE) VERSION=$(major) EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)' EXTRACFLAGS='$(CFLAGS) $(SHLIBCFLAGS)' EXTRALDFLAGS='$(LDFLAGS)' ldbs + dh_auto_build -- VERSION=$(major) EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)' EXTRACFLAGS='$(CFLAGS) $(SHLIBCFLAGS)' EXTRALDFLAGS='$(LDFLAGS)' ldbs pod2man -c "" -r "UW IMAP $(DEB_NOEPOCH_VERSION)" debian/mlock.pod debian/mlock.1 touch $@