Source: i3status Version: 2.11-1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
i3status fails to cross build from source, because it uses the build architecture toolchain. Since make is invoked directly, dh_auto_build cannot pass cross compilers to make and the Makefile hard codes the build architecture pkg-config. After fixing both aspects in the attached patch, i3status cross builds successfully. Please consider applying it. Helmut
diff --minimal -Nru i3status-2.11/debian/changelog i3status-2.11/debian/changelog --- i3status-2.11/debian/changelog 2017-01-21 15:42:57.000000000 +0100 +++ i3status-2.11/debian/changelog 2017-09-15 17:00:06.000000000 +0200 @@ -1,3 +1,12 @@ +i3status (2.11-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + * Remove dh_auto_build override. + * Add cross.patch. + + -- Helmut Grohne <hel...@subdivi.de> Fri, 15 Sep 2017 17:00:06 +0200 + i3status (2.11-1) unstable; urgency=medium * New upstream version 2.11 diff --minimal -Nru i3status-2.11/debian/patches/cross.patch i3status-2.11/debian/patches/cross.patch --- i3status-2.11/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ i3status-2.11/debian/patches/cross.patch 2017-09-15 17:00:06.000000000 +0200 @@ -0,0 +1,26 @@ +From: Helmut Grohne <hel...@subdivi.de> +Subject: make pkg-config substitutable + +Index: i3status-2.11/Makefile +=================================================================== +--- i3status-2.11.orig/Makefile ++++ i3status-2.11/Makefile +@@ -14,6 +14,7 @@ + endif + endif + ++PKG_CONFIG ?= pkg-config + CFLAGS+=-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare + CFLAGS+=-g + CFLAGS+=-std=gnu99 +@@ -40,8 +41,8 @@ + ifeq ($(OS),Linux) + CPPFLAGS+=-DLINUX + CPPFLAGS+=-D_GNU_SOURCE +-CFLAGS += $(shell pkg-config --cflags libnl-genl-3.0) +-LIBS += $(shell pkg-config --libs libnl-genl-3.0) ++CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-genl-3.0) ++LIBS += $(shell $(PKG_CONFIG) --libs libnl-genl-3.0) + LIBS+=-lasound + endif + diff --minimal -Nru i3status-2.11/debian/patches/series i3status-2.11/debian/patches/series --- i3status-2.11/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ i3status-2.11/debian/patches/series 2017-09-15 16:59:31.000000000 +0200 @@ -0,0 +1 @@ +cross.patch diff --minimal -Nru i3status-2.11/debian/rules i3status-2.11/debian/rules --- i3status-2.11/debian/rules 2017-01-21 15:42:57.000000000 +0100 +++ i3status-2.11/debian/rules 2017-09-15 17:00:06.000000000 +0200 @@ -6,9 +6,6 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all -override_dh_auto_build: - $(MAKE) - override_dh_install: $(MAKE) DESTDIR=$(CURDIR)/debian/i3status/ install dh_install