Bug#912289: devilspie2 FTCBFS: multiple reasons
Source: devilspie2
Version: 0.43-2
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap
devilspie2 fails to cross build from source. debian/rules does not pass
cross tools to make. The easiest way of fixing that is using
dh_auto_build. Then the upstream Makefile hard codes the build
architecture pkg-config. The attached patch fixes both and makes
devilspie2 cross buildable. Please consider applying it.
Helmut
diff --minimal -Nru devilspie2-0.43/debian/changelog devilspie2-0.43/debian/changelog
--- devilspie2-0.43/debian/changelog 2018-07-21 13:24:37.000000000 +0200
+++ devilspie2-0.43/debian/changelog 2018-10-29 22:07:24.000000000 +0100
@@ -1,3 +1,12 @@
+devilspie2 (0.43-2.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 <helmut@subdivi.de> Mon, 29 Oct 2018 22:07:24 +0100
+
devilspie2 (0.43-2) unstable; urgency=medium
* QA upload.
diff --minimal -Nru devilspie2-0.43/debian/patches/cross.patch devilspie2-0.43/debian/patches/cross.patch
--- devilspie2-0.43/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ devilspie2-0.43/debian/patches/cross.patch 2018-10-29 22:07:24.000000000 +0100
@@ -0,0 +1,24 @@
+--- devilspie2-0.43.orig/Makefile
++++ devilspie2-0.43/Makefile
+@@ -20,6 +20,9 @@
+ ifndef CC
+ CC=gcc
+ endif
++ifndef PKG_CONFIG
++ PKG_CONFIG=pkg-config
++endif
+ SRC=src
+ OBJ=obj
+ BIN=bin
+@@ -59,9 +62,9 @@
+ PKG_WNCK=libwnck-3.0
+ endif
+
+-LIB_CFLAGS=$(shell pkg-config --cflags --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || pkg-config --cflags $(PKG_GTK) $(PKG_WNCK) lua)
++LIB_CFLAGS=$(shell $(PKG_CONFIG) --cflags --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || $(PKG_CONFIG) --cflags $(PKG_GTK) $(PKG_WNCK) lua)
+ STD_LDFLAGS=
+-LIBS=-lX11 $(shell pkg-config --libs --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || pkg-config --libs $(PKG_GTK) $(PKG_WNCK) lua)
++LIBS=-lX11 $(shell $(PKG_CONFIG) --libs --silence-errors $(PKG_GTK) $(PKG_WNCK) lua5.1 || $(PKG_CONFIG) --libs $(PKG_GTK) $(PKG_WNCK) lua)
+
+ LOCAL_CFLAGS=$(STD_CFLAGS) $(DEPRECATED) $(CFLAGS) $(LIB_CFLAGS)
+ LOCAL_LDFLAGS=$(STD_CFLAGS) $(LDFLAGS) $(STD_LDFLAGS)
diff --minimal -Nru devilspie2-0.43/debian/patches/series devilspie2-0.43/debian/patches/series
--- devilspie2-0.43/debian/patches/series 2017-09-26 15:30:40.000000000 +0200
+++ devilspie2-0.43/debian/patches/series 2018-10-29 22:07:24.000000000 +0100
@@ -0,0 +1 @@
+cross.patch
diff --minimal -Nru devilspie2-0.43/debian/rules devilspie2-0.43/debian/rules
--- devilspie2-0.43/debian/rules 2017-09-26 15:30:40.000000000 +0200
+++ devilspie2-0.43/debian/rules 2018-10-29 22:07:22.000000000 +0100
@@ -11,7 +11,7 @@
dh $@
override_dh_auto_build:
- $(MAKE) PREFIX=/usr
+ dh_auto_build -- PREFIX=/usr
override_dh_auto_install:
$(MAKE) DESTDIR=$$(pwd)/debian/devilspie2 PREFIX=/usr install
Reply to: