Source: fbxkb
Version: 0.6-2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

fbxkb fails to cross build from source, because it uses the build
architecture toolchain. While it does use dh_auto_build, the autoconf
build system expects that compilers are set up during dh_auto_configure
and thus doesn't pass them for dh_auto_build. In a way fbxkb's build
system is more like a makefile build system as configure only sets up
some paths. Thus I propose using --buildsystem=makefile to pass those
cross compilers along. Still the upstream build system hard codes the
build architecture pkg-config. After fixing both, fbxkb cross builds
successfully. Please consider applying the attached patch.

Helmut
diff --minimal -Nru fbxkb-0.6/debian/changelog fbxkb-0.6/debian/changelog
--- fbxkb-0.6/debian/changelog  2014-11-05 16:38:59.000000000 +0100
+++ fbxkb-0.6/debian/changelog  2018-06-09 15:40:39.000000000 +0200
@@ -1,3 +1,12 @@
+fbxkb (0.6-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + cross.patch: make pkg-config substitutable.
+    + Use the makefile build system as configure does not set up compilers.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sat, 09 Jun 2018 15:40:39 +0200
+
 fbxkb (0.6-2) unstable; urgency=low
 
   * New maintainer (Closes: #767970)
diff --minimal -Nru fbxkb-0.6/debian/patches/cross.patch 
fbxkb-0.6/debian/patches/cross.patch
--- fbxkb-0.6/debian/patches/cross.patch        1970-01-01 01:00:00.000000000 
+0100
+++ fbxkb-0.6/debian/patches/cross.patch        2018-06-09 15:40:39.000000000 
+0200
@@ -0,0 +1,14 @@
+--- fbxkb-0.6.orig/Makefile.common
++++ fbxkb-0.6/Makefile.common
+@@ -20,8 +20,9 @@
+ endif
+ 
+ CC = gcc
+-LIBS = -lX11 $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 
gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib  -lXmu
+-INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 
gdk-pixbuf-xlib-2.0)
++PKG_CONFIG ?= pkg-config
++LIBS = -lX11 $(shell $(PKG_CONFIG) --libs gtk+-2.0 gdk-pixbuf-2.0 
gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib  -lXmu
++INCS = $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gdk-pixbuf-2.0 
gdk-pixbuf-xlib-2.0)
+ CFLAGS ?= -O2    # overwriten by command line or env. variable
+ CFLAGS += -Wall # always nice to have 
+ ifneq (,$(DEVEL))
diff --minimal -Nru fbxkb-0.6/debian/patches/series 
fbxkb-0.6/debian/patches/series
--- fbxkb-0.6/debian/patches/series     2014-11-05 14:44:30.000000000 +0100
+++ fbxkb-0.6/debian/patches/series     2018-06-09 15:40:39.000000000 +0200
@@ -7,3 +7,4 @@
 respect-dpkg-buildflags.patch
 drop-extra-deps.patch
 fix-for-dh.patch
+cross.patch
diff --minimal -Nru fbxkb-0.6/debian/rules fbxkb-0.6/debian/rules
--- fbxkb-0.6/debian/rules      2014-11-05 14:33:21.000000000 +0100
+++ fbxkb-0.6/debian/rules      2018-06-09 15:40:37.000000000 +0200
@@ -10,7 +10,7 @@
 #export DH_VERBOSE=1
 
 %:
-       dh $@
+       dh $@ --buildsystem=makefile
 
 override_dh_auto_configure:
        ./configure --prefix=/usr

Reply via email to