Source: libstb
Version: 0.0~git20190617.5.c72a95d-2
Tags: patch

libstb successfully cross builds a broken package, because it uses the
build architecture compiler to discover the multiarch triplet to compute
LIBDIR. Using the host architecture compiler is correct here. Please
consider applying the attached patch.

Helmut
diff --minimal -Nru libstb-0.0~git20190617.5.c72a95d/debian/changelog 
libstb-0.0~git20190617.5.c72a95d/debian/changelog
--- libstb-0.0~git20190617.5.c72a95d/debian/changelog   2019-07-10 
14:14:35.000000000 +0200
+++ libstb-0.0~git20190617.5.c72a95d/debian/changelog   2019-07-21 
20:08:52.000000000 +0200
@@ -1,3 +1,10 @@
+libstb (0.0~git20190617.5.c72a95d-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use the host compiler to discover the multiarch triplet. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 21 Jul 2019 20:08:52 +0200
+
 libstb (0.0~git20190617.5.c72a95d-2) unstable; urgency=medium
 
   * Fix FTBFS on many architectures
diff --minimal -Nru libstb-0.0~git20190617.5.c72a95d/debian/patches/cross.patch 
libstb-0.0~git20190617.5.c72a95d/debian/patches/cross.patch
--- libstb-0.0~git20190617.5.c72a95d/debian/patches/cross.patch 1970-01-01 
01:00:00.000000000 +0100
+++ libstb-0.0~git20190617.5.c72a95d/debian/patches/cross.patch 2019-07-21 
20:08:51.000000000 +0200
@@ -0,0 +1,10 @@
+--- libstb-0.0~git20190617.5.c72a95d.orig/Makefile
++++ libstb-0.0~git20190617.5.c72a95d/Makefile
+@@ -1,6 +1,6 @@
+ PROJECT = libstb
+ 
+-MULTIARCH := $(shell gcc --print-multiarch)
++MULTIARCH := $(shell $(CC) --print-multiarch)
+ 
+ INCLUDEDIR := $(DESTDIR)/usr/include/stb
+ LIBDIR := $(DESTDIR)/usr/lib/$(MULTIARCH)
diff --minimal -Nru libstb-0.0~git20190617.5.c72a95d/debian/patches/series 
libstb-0.0~git20190617.5.c72a95d/debian/patches/series
--- libstb-0.0~git20190617.5.c72a95d/debian/patches/series      2019-07-10 
14:14:35.000000000 +0200
+++ libstb-0.0~git20190617.5.c72a95d/debian/patches/series      2019-07-21 
20:08:30.000000000 +0200
@@ -6,3 +6,4 @@
 0006-tests-Makefile-refactor.patch
 0007-tests-image_test.c-use-library.patch
 0008-tests-image_write_test.c-use-library.patch
+cross.patch
diff --minimal -Nru libstb-0.0~git20190617.5.c72a95d/debian/rules 
libstb-0.0~git20190617.5.c72a95d/debian/rules
--- libstb-0.0~git20190617.5.c72a95d/debian/rules       2019-07-10 
14:14:35.000000000 +0200
+++ libstb-0.0~git20190617.5.c72a95d/debian/rules       2019-07-21 
20:08:52.000000000 +0200
@@ -8,6 +8,8 @@
 export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic -fwrapv
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
+-include /usr/share/dpkg/buildtools.mk
+export CC
 
 %:
        dh $@

Reply via email to