Source: fotoxx
Version: 16.11.1-1
Tags: upstream patch
User: helm...@debian.org
Usertags: rebootstrap

fotoxx fails to cross build from source, because it uses the build
architecture pkg-config and thus fails finding the gtk, which is only
requested for the host architecture. Making pkg-config substitutable via
$(PKG_CONFIG) fixes the build, because recent dh_auto_build started
supplying that variable for cross builds. Please consider applying the
attached patch.

Helmut
diff --minimal -Nru fotoxx-16.11.1/debian/changelog 
fotoxx-16.11.1/debian/changelog
--- fotoxx-16.11.1/debian/changelog     2016-12-13 15:03:38.000000000 +0100
+++ fotoxx-16.11.1/debian/changelog     2017-06-29 22:18:27.000000000 +0200
@@ -1,3 +1,10 @@
+fotoxx (16.11.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: cross.patch (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 29 Jun 2017 22:18:27 +0200
+
 fotoxx (16.11.1-1) unstable; urgency=medium
 
   * New upstream release (16.11.1).
diff --minimal -Nru fotoxx-16.11.1/debian/patches/cross.patch 
fotoxx-16.11.1/debian/patches/cross.patch
--- fotoxx-16.11.1/debian/patches/cross.patch   1970-01-01 01:00:00.000000000 
+0100
+++ fotoxx-16.11.1/debian/patches/cross.patch   2017-06-29 22:18:25.000000000 
+0200
@@ -0,0 +1,33 @@
+From: Helmut Grohne <hel...@subdivi.de>
+Subject: make pkg-config substitutable for cross compilation
+
+Index: fotoxx-16.11.1/Makefile
+===================================================================
+--- fotoxx-16.11.1.orig/Makefile
++++ fotoxx-16.11.1/Makefile
+@@ -6,6 +6,7 @@
+ CXXFLAGS += -Wall -ggdb
+ PREFIX ?= /usr
+ CPPFLAGS ?= -O2
++PKG_CONFIG ?= pkg-config
+ 
+ # target install directories
+ BINDIR = $(PREFIX)/bin
+@@ -19,7 +20,7 @@
+ MENUFILE = $(PREFIX)/share/applications/fotoxx.desktop
+ 
+ CFLAGS = $(CXXFLAGS) $(CPPFLAGS) -c                \
+-   `pkg-config --cflags gtk+-3.0`                  \
++   `$(PKG_CONFIG) --cflags gtk+-3.0`                  \
+    -I/usr/include/clutter-1.0/                     \
+    -I/usr/include/cogl/                            \
+    -I/usr/include/json-glib-1.0/                   \
+@@ -27,7 +28,7 @@
+    -I/usr/include/libchamplain-gtk-0.12/           \
+    -I/usr/include/libchamplain-0.12/
+ 
+-LIBS = `pkg-config --libs gtk+-3.0` -lrt -lpthread -ltiff -lpng -lraw -llcms2 
   \
++LIBS = `$(PKG_CONFIG) --libs gtk+-3.0` -lrt -lpthread -ltiff -lpng -lraw 
-llcms2    \
+          -lclutter-1.0 -lclutter-gtk-1.0 -lchamplain-0.12 -lchamplain-gtk-0.12
+ 
+ ALLFILES = fotoxx.o f.widgets.o f.image.o f.file.o f.gallery.o f.gmenu.o      
   \
diff --minimal -Nru fotoxx-16.11.1/debian/patches/series 
fotoxx-16.11.1/debian/patches/series
--- fotoxx-16.11.1/debian/patches/series        2016-12-13 15:03:38.000000000 
+0100
+++ fotoxx-16.11.1/debian/patches/series        2017-06-29 22:17:23.000000000 
+0200
@@ -1,2 +1,3 @@
 Fix-ftbfs-in-freebsd.patch
 fix-FTBFS-using-clang-instead-of-gcc.patch
+cross.patch

Reply via email to