Source: spectrwm Version: 3.2.0-1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
spectrwm fails to cross build from source, because it does not pass cross tools to make. The easiest way of fixing that - using dh_auto_build - is insufficient here. The relevant Makefile also hard codes pkg-config. The attached patch fixes both and makes spectrwm cross buildable. Please consider applying it. Helmut
diff --minimal -Nru spectrwm-3.2.0/debian/changelog spectrwm-3.2.0/debian/changelog --- spectrwm-3.2.0/debian/changelog 2018-09-29 15:32:14.000000000 +0200 +++ spectrwm-3.2.0/debian/changelog 2019-05-12 19:59:22.000000000 +0200 @@ -1,3 +1,12 @@ +spectrwm (3.2.0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + cross.patch: Make pkg-config substitutable. + + -- Helmut Grohne <hel...@subdivi.de> Sun, 12 May 2019 19:59:22 +0200 + spectrwm (3.2.0-1) unstable; urgency=low * New upstream release diff --minimal -Nru spectrwm-3.2.0/debian/patches/cross.patch spectrwm-3.2.0/debian/patches/cross.patch --- spectrwm-3.2.0/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ spectrwm-3.2.0/debian/patches/cross.patch 2019-05-12 19:59:22.000000000 +0200 @@ -0,0 +1,27 @@ +--- spectrwm-3.2.0.orig/linux/Makefile ++++ spectrwm-3.2.0/linux/Makefile +@@ -6,6 +6,7 @@ + MANDIR ?= $(DATAROOTDIR)/man + DOCDIR ?= $(DATAROOTDIR)/doc/spectrwm + XSESSIONSDIR ?= $(DATAROOTDIR)/xsessions ++PKG_CONFIG ?= pkg-config + + BUILDVERSION = $(shell sh $(CURDIR)/../buildver.sh) + LIBVERSION = $(shell . $(CURDIR)/../lib/shlib_version; echo $$major.$$minor) +@@ -21,12 +22,12 @@ + + BIN_CFLAGS = -fPIE + BIN_LDFLAGS = -fPIE -pie +-BIN_CPPFLAGS = $(shell pkg-config --cflags x11 x11-xcb xcb-icccm xcb-keysyms xcb-randr xcb-util xcb-xinput xcb-xtest xcursor xft) +-BIN_LDLIBS = $(shell pkg-config --libs x11 x11-xcb xcb-icccm xcb-keysyms xcb-randr xcb-util xcb-xinput xcb-xtest xcursor xft) ++BIN_CPPFLAGS = $(shell $(PKG_CONFIG) --cflags x11 x11-xcb xcb-icccm xcb-keysyms xcb-randr xcb-util xcb-xinput xcb-xtest xcursor xft) ++BIN_LDLIBS = $(shell $(PKG_CONFIG) --libs x11 x11-xcb xcb-icccm xcb-keysyms xcb-randr xcb-util xcb-xinput xcb-xtest xcursor xft) + LIB_CFLAGS = -fPIC + LIB_LDFLAGS = -fPIC -shared +-LIB_CPPFLAGS = $(shell pkg-config --cflags x11) +-LIB_LDLIBS = $(shell pkg-config --libs x11) -ldl ++LIB_CPPFLAGS = $(shell $(PKG_CONFIG) --cflags x11) ++LIB_LDLIBS = $(shell $(PKG_CONFIG) --libs x11) -ldl + + all: spectrwm libswmhack.so.$(LIBVERSION) + diff --minimal -Nru spectrwm-3.2.0/debian/patches/series spectrwm-3.2.0/debian/patches/series --- spectrwm-3.2.0/debian/patches/series 2018-09-29 15:32:14.000000000 +0200 +++ spectrwm-3.2.0/debian/patches/series 2019-05-12 19:59:22.000000000 +0200 @@ -2,3 +2,4 @@ U01-install-more-files.diff D01-adapt-libswmhack.diff D02-change-default-programs.diff +cross.patch diff --minimal -Nru spectrwm-3.2.0/debian/rules spectrwm-3.2.0/debian/rules --- spectrwm-3.2.0/debian/rules 2018-09-29 15:32:14.000000000 +0200 +++ spectrwm-3.2.0/debian/rules 2019-05-12 19:59:20.000000000 +0200 @@ -19,7 +19,7 @@ # the top-level Makefile, which only works on OpenBSD. We also pass a # few extra variables to customize the installation paths. override_dh_auto_build: - $(MAKE) -C linux/ + dh_auto_build --sourcedirectory=linux override_dh_auto_install: $(MAKE) -C linux/ install