Source: g3data Version: 1:1.5.3-2.1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
g3data fails to cross build from source, because it uses the build architecture compiler and pkg-config. For the compiler, indirecting $(MAKE) through dh_auto_build fixes the issue as dh_auto_build does the right thing(TM). For pkg-config, adding the host architecture gnu triplet as prefix fixes the issue. After applying the attached patch, g3data cross builds successfully. Please consider applying it after stretch is released. Helmut
diff -u g3data-1.5.3/Makefile g3data-1.5.3/Makefile --- g3data-1.5.3/Makefile +++ g3data-1.5.3/Makefile @@ -1,6 +1,7 @@ CC=gcc -CFLAGS=-Wall `pkg-config --cflags gtk+-2.0` -LIBS=`pkg-config --libs gtk+-2.0` -lm +PKG_CONFIG ?= pkg-config +CFLAGS=-Wall `$(PKG_CONFIG) --cflags gtk+-2.0` +LIBS=`$(PKG_CONFIG) --libs gtk+-2.0` -lm bindir ?= /usr/bin mandir ?= /usr/share/man diff -u g3data-1.5.3/debian/changelog g3data-1.5.3/debian/changelog --- g3data-1.5.3/debian/changelog +++ g3data-1.5.3/debian/changelog @@ -1,3 +1,12 @@ +g3data (1:1.5.3-2.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross compilers to make. + + Use a triplet-prefixed pkg-config. + + -- Helmut Grohne <hel...@subdivi.de> Sat, 10 Jun 2017 16:54:08 +0200 + g3data (1:1.5.3-2.1) unstable; urgency=low * Non-maintainer upload. diff -u g3data-1.5.3/debian/rules g3data-1.5.3/debian/rules --- g3data-1.5.3/debian/rules +++ g3data-1.5.3/debian/rules @@ -5,7 +5,10 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -CFLAGS=-Wall `pkg-config --cflags gtk+-2.0` +include /usr/share/dpkg/architecture.mk +export PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config + +CFLAGS=-Wall `$(PKG_CONFIG) --cflags gtk+-2.0` ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif @@ -16,7 +19,7 @@ dh_testdir docbook-to-man g3data.sgml > g3data.1 gzip --best g3data.1 - make CFLAGS="$(CFLAGS)" + dh_auto_build -- CFLAGS="$(CFLAGS)" touch build-stamp clean: