Source: libb64
Version: 1.2-4
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

libb64 fails to cross build from source, because it uses the build
architecture compiler. For the $(MAKE) invocations, dh_auto_build fixes
that. For the explicit $(CC) call, we can include dpkg's recent
buildtools.mk. After doing both, libb64 cross builds successfully.
Please consider applying the attached patch.

Helmut
diff --minimal -Nru libb64-1.2/debian/changelog libb64-1.2/debian/changelog
--- libb64-1.2/debian/changelog 2017-09-07 18:16:02.000000000 +0200
+++ libb64-1.2/debian/changelog 2018-03-26 19:21:20.000000000 +0200
@@ -1,3 +1,12 @@
+libb64 (1.2-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + Let buildtools.mk supply $(CC).
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 26 Mar 2018 19:21:20 +0200
+
 libb64 (1.2-4) unstable; urgency=medium
 
   * new maintainer (Closes: #706894)
diff --minimal -Nru libb64-1.2/debian/rules libb64-1.2/debian/rules
--- libb64-1.2/debian/rules     2017-09-07 18:16:02.000000000 +0200
+++ libb64-1.2/debian/rules     2018-03-26 19:21:18.000000000 +0200
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+-include /usr/share/dpkg/buildtools.mk
+
 static_lib = libb64.a
 shared_lib = libb64.so
 soversion = 0d
@@ -20,8 +22,8 @@
        rm -rf src-shlib/
        cp -a src src-shlib/
        cd src-shlib/ && rm -f *.o *.a
-       CFLAGS="$(cflags)" LDFLAGS="$(ldflags)" $(MAKE)
-       CFLAGS="$(cflags) -fPIC" $(MAKE) -C src-shlib/
+       CFLAGS="$(cflags)" LDFLAGS="$(ldflags)" dh_auto_build
+       CFLAGS="$(cflags) -fPIC" dh_auto_build --sourcedirectory=src-shlib/
        cd src-shlib && $(CC) $(ldflags) -shared -Wl,-soname,$(soname) *.o -o 
$(soname)
        cd src-shlib && ln -sf $(soname) $(shared_lib)
 ifeq "$(filter nocheck,$(DEB_BUILD_OPTIONS))" ""

Reply via email to