Source: uucp
Version: 1.07-24
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

uucp mostly cross builds, but fails in the end when it comes to the
contrib/ folder where the build architecture compiler gcc is hardcoded.
Running that make invocation through dh_auto_build fixes that, but
debian/rules also hard codes a cc invocation. Updating that to use a
triplet-prefixed $(CC) as well fixes the build. Please consider applying
the attached patch.

Helmut
diff --minimal -Nru uucp-1.07/debian/changelog uucp-1.07/debian/changelog
--- uucp-1.07/debian/changelog  2017-09-27 19:00:00.000000000 +0200
+++ uucp-1.07/debian/changelog  2017-10-23 06:12:34.000000000 +0200
@@ -1,3 +1,12 @@
+uucp (1.07-24.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross compilers to make in contrib.
+    + Use a triplet-prefixed CC in d/rules.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 23 Oct 2017 06:12:34 +0200
+
 uucp (1.07-24) unstable; urgency=medium
 
   * debian/control: bump standard to 4.1.0 (no changes)
diff --minimal -Nru uucp-1.07/debian/rules uucp-1.07/debian/rules
--- uucp-1.07/debian/rules      2013-06-21 10:45:00.000000000 +0200
+++ uucp-1.07/debian/rules      2017-10-23 06:12:34.000000000 +0200
@@ -4,14 +4,16 @@
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
-export DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-export DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+include /usr/share/dpkg/architecture.mk
 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
   confflags += --build $(DEB_HOST_GNU_TYPE)
 else
   confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 endif
 
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
 CFLAGS += -Wall -g $(LDFLAGS) $(CPPFLAGS)
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
@@ -40,10 +42,10 @@
 
 override_dh_auto_build:
        $(MAKE) CFLAGS="$(CFLAGS)"
-       ( cd contrib && \
-         make -f Makefile.uurt CFLAGS="$(CFLAGS)" \
-               newconfigdir=/etc/uucp )
-       cc $(CFLAGS) -o debian/contrib/in.uucpd debian/contrib/in.uucpd.c -lpam 
-lpam_misc
+       dh_auto_build --buildsystem=makefile --sourcedirectory=contrib -- \
+               -f Makefile.uurt CFLAGS="$(CFLAGS)" \
+               newconfigdir=/etc/uucp
+       $(CC) $(CFLAGS) -o debian/contrib/in.uucpd debian/contrib/in.uucpd.c 
-lpam -lpam_misc
 
 override_dh_fixperms:
        dh_fixperms

Reply via email to