Source: bfm Version: 0.6.4-6 Tags: patch User: helm...@debian.org Usertags: rebootstrap
bfm fails to cross build from source. The upstream build system hard codes the build architecture pkg-config. The debian packaging does not pass cross tools to make. Using dh_auto_build fixes the latter. It also uses the build architecture strip during make install, which breaks generation of a -dbgsym package beyond breaking cross compilation. The attached patch fixes all of that. Please consider applying it. Helmut
diff --minimal -Nru bfm-0.6.4/debian/changelog bfm-0.6.4/debian/changelog --- bfm-0.6.4/debian/changelog 2014-05-19 03:58:34.000000000 +0200 +++ bfm-0.6.4/debian/changelog 2019-02-25 19:02:26.000000000 +0100 @@ -1,3 +1,13 @@ +bfm (0.6.4-6.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes #-1) + + cross.patch: Make pkg-config substitutable. + + Let dh_auto_build pass cross tools to make. + + Defer all stripping to dh_strip. + + -- Helmut Grohne <hel...@subdivi.de> Mon, 25 Feb 2019 19:02:26 +0100 + bfm (0.6.4-6) unstable; urgency=low * Switched the source format from 1.0 to 3.0 (quilt) diff --minimal -Nru bfm-0.6.4/debian/patches/cross.patch bfm-0.6.4/debian/patches/cross.patch --- bfm-0.6.4/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ bfm-0.6.4/debian/patches/cross.patch 2019-02-25 19:01:21.000000000 +0100 @@ -0,0 +1,14 @@ +--- bfm-0.6.4.orig/Makefile ++++ bfm-0.6.4/Makefile +@@ -29,8 +29,9 @@ + GTK_CFLAGS = $(shell gtk-config --cflags) + GTK_LIBS = -lX11 $(shell gtk-config --libs) + +-GTK2_CFLAGS = $(shell pkg-config gtk+-2.0 --cflags) +-GTK2_LIBS = -lX11 $(shell pkg-config gtk+-2.0 --libs) ++PKG_CONFIG ?= pkg-config ++GTK2_CFLAGS = $(shell $(PKG_CONFIG) gtk+-2.0 --cflags) ++GTK2_LIBS = -lX11 $(shell $(PKG_CONFIG) gtk+-2.0 --libs) + + LIBS += -lm + diff --minimal -Nru bfm-0.6.4/debian/patches/series bfm-0.6.4/debian/patches/series --- bfm-0.6.4/debian/patches/series 2014-05-19 03:29:29.000000000 +0200 +++ bfm-0.6.4/debian/patches/series 2019-02-25 19:00:59.000000000 +0100 @@ -1 +1,2 @@ quilt +cross.patch diff --minimal -Nru bfm-0.6.4/debian/rules bfm-0.6.4/debian/rules --- bfm-0.6.4/debian/rules 2014-05-19 03:27:35.000000000 +0200 +++ bfm-0.6.4/debian/rules 2019-02-25 19:02:21.000000000 +0100 @@ -3,11 +3,6 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) @@ -18,12 +13,6 @@ ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s - STRIP_PROGRAM = strip -else - STRIP_PROGRAM = true -endif configure: configure-stamp @@ -36,8 +25,8 @@ build-indep: build-stamp build-stamp: dh_testdir - $(MAKE) PREFIX=/usr STRIP=$(STRIP_PROGRAM) bubblefishymon - $(MAKE) PREFIX=/usr STRIP=$(STRIP_PROGRAM) gkrellm + dh_auto_build -- PREFIX=/usr STRIP=true bubblefishymon + dh_auto_build -- PREFIX=/usr STRIP=true gkrellm touch build-stamp clean: