Source: gromit
Version: 20041213-9
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

gromit fails to cross build from source, because it uses the build
architecture pkg-config. After prefixing it with the host architecture
gnu triplet, gromit cross compiles successfully. Please consider
applying the attached patch after stretch is released.

Helmut
diff --minimal -Nru gromit-20041213/debian/changelog 
gromit-20041213/debian/changelog
--- gromit-20041213/debian/changelog    2011-11-13 20:55:40.000000000 +0100
+++ gromit-20041213/debian/changelog    2017-06-11 21:45:14.000000000 +0200
@@ -1,3 +1,10 @@
+gromit (20041213-9.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Use a triplet-prefixed pkg-config (closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 11 Jun 2017 21:45:14 +0200
+
 gromit (20041213-9) unstable; urgency=low
 
   * create and install scalable icon
diff --minimal -Nru gromit-20041213/debian/patches/debian-changes 
gromit-20041213/debian/patches/debian-changes
--- gromit-20041213/debian/patches/debian-changes       2011-11-13 
20:56:29.000000000 +0100
+++ gromit-20041213/debian/patches/debian-changes       2017-06-11 
21:45:14.000000000 +0200
@@ -273,11 +273,12 @@
       }
 --- gromit-20041213.orig/Makefile
 +++ gromit-20041213/Makefile
-@@ -1,10 +1,18 @@
+@@ -1,10 +1,19 @@
  all: gromit
  
 -proptest: proptest.c
 -      gcc -o proptest proptest.c `gtk-config --libs --cflags`
++PKG_CONFIG ?= pkg-config
 +CPPFLAGS += -DG_DISABLE_DEPRECATED
 +CPPFLAGS += -DGDK_PIXBUF_DISABLE_DEPRECATED
 +# CPPFLAGS += -DGDK_DISABLE_DEPRECATED
@@ -286,7 +287,7 @@
  
 -propertywatch: propertywatch.c
 -      gcc -o propertywatch propertywatch.c `gtk-config --libs --cflags`
-+CPPFLAGS += $(shell pkg-config --cflags-only-I gtk+-2.0 x11)
++CPPFLAGS += $(shell $(PKG_CONFIG) --cflags-only-I gtk+-2.0 x11)
  
 -gromit: gromit.c Makefile
 -      gcc -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED 
-DGDK_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE 
-DGTK_MULTIHEAD_SAFE -o gromit gromit.c -Wall `pkg-config --libs --cflags 
gtk+-2.0`
@@ -294,7 +295,7 @@
 +CFLAGS += -O2
 +CFLAGS += -g
 +
-+CFLAGS += $(shell pkg-config --cflags-only-other gtk+-2.0 x11)
++CFLAGS += $(shell $(PKG_CONFIG) --cflags-only-other gtk+-2.0 x11)
 +
-+LOADLIBES += $(shell pkg-config --libs gtk+-2.0 x11)
++LOADLIBES += $(shell $(PKG_CONFIG) --libs gtk+-2.0 x11)
 +LOADLIBES += -lm
diff --minimal -Nru gromit-20041213/debian/rules gromit-20041213/debian/rules
--- gromit-20041213/debian/rules        2011-11-13 20:53:16.000000000 +0100
+++ gromit-20041213/debian/rules        2017-06-11 21:45:11.000000000 +0200
@@ -1,4 +1,7 @@
 #!/usr/bin/make -f
+include /usr/share/dpkg/architecture.mk
+export PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
+
 %:
        dh $@ --parallel
 

Reply via email to