Source: libinih Version: 44-1 Tags: patch libinih successfully cross builds broken packages, because the upstream Makefile uses the build architecture compiler to determine the multiarch directory. It needs to use the host architecture compiler there. The attached patch makes that work. Please consider applying it.
Helmut
diff --minimal -Nru libinih-44/debian/changelog libinih-44/debian/changelog --- libinih-44/debian/changelog 2019-07-08 10:37:32.000000000 +0200 +++ libinih-44/debian/changelog 2019-07-14 17:13:57.000000000 +0200 @@ -1,3 +1,10 @@ +libinih (44-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix build/host confusion. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Sun, 14 Jul 2019 17:13:57 +0200 + libinih (44-1) unstable; urgency=medium * New upstream release diff --minimal -Nru libinih-44/debian/patches/cross.patch libinih-44/debian/patches/cross.patch --- libinih-44/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ libinih-44/debian/patches/cross.patch 2019-07-14 17:13:33.000000000 +0200 @@ -0,0 +1,10 @@ +--- libinih-44.orig/Makefile ++++ libinih-44/Makefile +@@ -1,6 +1,6 @@ + PROJECT = libinih + +-MULTIARCH := $(shell gcc --print-multiarch) ++MULTIARCH := $(shell $(CC) --print-multiarch) + + INCLUDEDIR := $(DESTDIR)/usr/include + LIBDIR := $(DESTDIR)/usr/lib/$(MULTIARCH) diff --minimal -Nru libinih-44/debian/patches/series libinih-44/debian/patches/series --- libinih-44/debian/patches/series 2019-07-08 10:37:32.000000000 +0200 +++ libinih-44/debian/patches/series 2019-07-14 17:13:23.000000000 +0200 @@ -1,2 +1,3 @@ Makefile.patch runtime-options.patch +cross.patch diff --minimal -Nru libinih-44/debian/rules libinih-44/debian/rules --- libinih-44/debian/rules 2019-07-08 10:37:32.000000000 +0200 +++ libinih-44/debian/rules 2019-07-14 17:13:57.000000000 +0200 @@ -8,9 +8,13 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed include /usr/share/dpkg/pkg-info.mk +-include /usr/share/dpkg/buildtools.mk export VERSION := $(DEB_VERSION_UPSTREAM) %: dh $@ + +override_dh_auto_install: + dh_auto_install -- CC=$(CC)

