Source: grpn
Version: 1.4.1-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

grpn 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 -
mostly fixes that except that it still uses the build architecture
pkg-config and therefore fails finding gtk+-2.0.pc. Makeing pkg-config
substitutable fixes that part and makes grpn cross buildable. Please
consider applying the attached patch.

Helmut
diff --minimal -Nru grpn-1.4.1/debian/changelog grpn-1.4.1/debian/changelog
--- grpn-1.4.1/debian/changelog 2017-11-12 09:53:32.000000000 +0100
+++ grpn-1.4.1/debian/changelog 2018-12-12 21:12:40.000000000 +0100
@@ -1,3 +1,12 @@
+grpn (1.4.1-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>  Wed, 12 Dec 2018 21:12:40 +0100
+
 grpn (1.4.1-1) unstable; urgency=low
 
   [ Jens Getreu  ]
diff --minimal -Nru grpn-1.4.1/debian/control grpn-1.4.1/debian/control
--- grpn-1.4.1/debian/control   2017-11-12 09:46:02.000000000 +0100
+++ grpn-1.4.1/debian/control   2018-12-12 21:11:54.000000000 +0100
@@ -2,7 +2,7 @@
 Section: math
 Priority: optional
 Maintainer: Wartan Hachaturow <w...@debian.org>
-Build-Depends: debhelper (>= 5), libgtk2.0-dev
+Build-Depends: debhelper (>= 7), libgtk2.0-dev
 Standards-Version: 4.1.1
 
 Package: grpn
diff --minimal -Nru grpn-1.4.1/debian/patches/cross.patch 
grpn-1.4.1/debian/patches/cross.patch
--- grpn-1.4.1/debian/patches/cross.patch       1970-01-01 01:00:00.000000000 
+0100
+++ grpn-1.4.1/debian/patches/cross.patch       2018-12-12 21:12:36.000000000 
+0100
@@ -0,0 +1,28 @@
+--- grpn-1.4.1.orig/Makefile
++++ grpn-1.4.1/Makefile
+@@ -8,6 +8,7 @@
+ 
+ # What compiler should be used
+ CC = gcc 
++PKG_CONFIG ?= pkg-config
+ 
+ # NOTE:
+ #
+@@ -16,7 +17,7 @@
+ # add -DUSE_GNOME if you want to make grpn GNOME compliant.
+ 
+ 
+-CFLAGS = -g -O2 -I/usr/X11/include -DUSE_PANGO `pkg-config --cflags gtk+-2.0` 
-DGTK_VER_1_1
++CFLAGS = -g -O2 -I/usr/X11/include -DUSE_PANGO `$(PKG_CONFIG) --cflags 
gtk+-2.0` -DGTK_VER_1_1
+ 
+ DFLAGS =  -L/usr/X11/lib 
+ 
+@@ -31,7 +32,7 @@
+       setup_buttons.o callback_buttons.o editor.o \
+       error.o help.o mode.o undo.o
+ 
+-LIBS   = `pkg-config --libs gtk+-2.0` -lX11 -lm
++LIBS   = `$(PKG_CONFIG) --libs gtk+-2.0` -lX11 -lm
+ 
+ grpn: $(OBJS)
+       $(CC) $(DFLAGS) -o $@ $(OBJS) $(LIBS) 
diff --minimal -Nru grpn-1.4.1/debian/patches/series 
grpn-1.4.1/debian/patches/series
--- grpn-1.4.1/debian/patches/series    1970-01-01 01:00:00.000000000 +0100
+++ grpn-1.4.1/debian/patches/series    2018-12-12 21:12:16.000000000 +0100
@@ -0,0 +1 @@
+cross.patch
diff --minimal -Nru grpn-1.4.1/debian/rules grpn-1.4.1/debian/rules
--- grpn-1.4.1/debian/rules     2017-11-12 09:41:00.000000000 +0100
+++ grpn-1.4.1/debian/rules     2018-12-12 21:12:00.000000000 +0100
@@ -10,7 +10,7 @@
 build: build-stamp
 build-stamp:
        dh_testdir
-       $(MAKE)
+       dh_auto_build
        touch build-stamp
 
 clean: 

Reply via email to