Source: rgbpaint Version: 0.8.7-6 Tags: patch User: [email protected] Usertags: rebootstrap
rgbpaint fails to cross build from source, because it uses the build architecture compiler and pkg-config. Unlike autotools-generated configure scripts, this hand written one does not understand the usual --host flag. Instead one is supposed to pass a suitable CC environment variable. It also hard codes the build architecture pkg-config leaving no choice on replacing it. The attached patch make pkg-config substitutable in ./configure and extends debian/rules to supply both variables. The values are seeded from dpkg's buildtools.mk, which generally does the right thing. It makes rgbpaint cross buildable. Please consider applying it. Helmut
diff --minimal -Nru rgbpaint-0.8.7/debian/changelog rgbpaint-0.8.7/debian/changelog --- rgbpaint-0.8.7/debian/changelog 2016-04-06 16:04:37.000000000 +0200 +++ rgbpaint-0.8.7/debian/changelog 2018-08-20 06:18:10.000000000 +0200 @@ -1,3 +1,10 @@ +rgbpaint (0.8.7-6.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Use host tools for CC and PKG_CONFIG. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Mon, 20 Aug 2018 06:18:10 +0200 + rgbpaint (0.8.7-6) unstable; urgency=low * Set Standards-Version to 3.9.7, no changes. diff --minimal -Nru rgbpaint-0.8.7/debian/patches/cross.patch rgbpaint-0.8.7/debian/patches/cross.patch --- rgbpaint-0.8.7/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ rgbpaint-0.8.7/debian/patches/cross.patch 2018-08-20 06:17:41.000000000 +0200 @@ -0,0 +1,17 @@ +--- rgbpaint-0.8.7.orig/configure ++++ rgbpaint-0.8.7/configure +@@ -146,11 +146,12 @@ + echo "MT_VERSION=$MT_VERSION" >> $GTK_FILE + echo "MT_DATE=$MT_DATE" >> $GTK_FILE + ++ : "${PKG_CONFIG:=pkg-config}" + if [ "$OS" = "GNU/Linux" ] + then + BIN_INSTALL=$LIN_BIN_INSTALL +- GTK_INCLUDE=`pkg-config gtk+-2.0 --cflags` +- GTK_LIB=`pkg-config gtk+-2.0 --libs` ++ GTK_INCLUDE=`$PKG_CONFIG gtk+-2.0 --cflags` ++ GTK_LIB=`$PKG_CONFIG gtk+-2.0 --libs` + else + BIN_INSTALL=$WIN_BIN_INSTALL + MT_LANG_DEST=locale diff --minimal -Nru rgbpaint-0.8.7/debian/patches/series rgbpaint-0.8.7/debian/patches/series --- rgbpaint-0.8.7/debian/patches/series 2016-04-06 12:15:52.000000000 +0200 +++ rgbpaint-0.8.7/debian/patches/series 2018-08-20 06:15:50.000000000 +0200 @@ -10,3 +10,4 @@ 10-fix_lib_underlinkage.diff 11-hardening_errors.diff 12-build_portability.diff +cross.patch diff --minimal -Nru rgbpaint-0.8.7/debian/rules rgbpaint-0.8.7/debian/rules --- rgbpaint-0.8.7/debian/rules 2016-04-06 12:15:53.000000000 +0200 +++ rgbpaint-0.8.7/debian/rules 2018-08-20 06:18:07.000000000 +0200 @@ -3,6 +3,9 @@ DPKG_EXPORT_BUILD_FLAGS = 1 include /usr/share/dpkg/buildflags.mk +-include /usr/share/dpkg/buildtools.mk +export CC +export PKG_CONFIG ?= pkg-config %: dh $@

