Source: hivelytracker
Version: 0+git20180223-3
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

hivelytracker fails to cross build from source, because it does not pass
cross tools to make. The easiest way of fixing that is using
dh_auto_build. Even then it fails, because the relevant Makefile hard
codes the build architecture pkg-config. Beyond that, the
PKG_CONFIG_PATH setting needs to be removed, because it breaks the
pkg-config cross wrapper. Please consider applying the attached patch.

Helmut
diff --minimal -Nru hivelytracker-0+git20180223/debian/changelog 
hivelytracker-0+git20180223/debian/changelog
--- hivelytracker-0+git20180223/debian/changelog        2018-09-04 
14:16:02.000000000 +0200
+++ hivelytracker-0+git20180223/debian/changelog        2019-09-29 
19:57:16.000000000 +0200
@@ -1,3 +1,13 @@
+hivelytracker (0+git20180223-3.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 and make the cross
+      wrapper work by removing the PKG_CONFIG_PATH override.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 29 Sep 2019 19:57:16 +0200
+
 hivelytracker (0+git20180223-3) unstable; urgency=medium
 
   * debian/hivelytracker.desktop: updated.
diff --minimal -Nru hivelytracker-0+git20180223/debian/patches/cross.patch 
hivelytracker-0+git20180223/debian/patches/cross.patch
--- hivelytracker-0+git20180223/debian/patches/cross.patch      1970-01-01 
01:00:00.000000000 +0100
+++ hivelytracker-0+git20180223/debian/patches/cross.patch      2019-09-29 
19:57:14.000000000 +0200
@@ -0,0 +1,17 @@
+--- hivelytracker-0+git20180223.orig/sdl/Makefile.linux
++++ hivelytracker-0+git20180223/sdl/Makefile.linux
+@@ -3,11 +3,12 @@
+ BASEDIR = $(CURDIR)/..
+ 
+ CC = gcc
++PKG_CONFIG ?= pkg-config
+ 
+ CFLAGS = -g -D__SDL_WRAPPER__
+ 
+-CFLAGS += -g $(shell PKG_CONFIG_PATH=/usr/$(BASELIBDIR)/pkgconfig pkg-config 
sdl --cflags) $(shell PKG_CONFIG_PATH=/usr/$(BASELIBDIR)/pkgconfig pkg-config 
gtk+-2.0 --cflags)
+-LFLAGS += -lm -L/usr/$(BASELIBDIR) $(shell 
PKG_CONFIG_PATH=/usr/$(BASELIBDIR)/pkgconfig pkg-config sdl --libs) $(shell 
PKG_CONFIG_PATH=/usr/$(BASELIBDIR)/pkgconfig pkg-config gtk+-2.0 --libs) 
-lSDL_image -lSDL_ttf -lfreetype -lz -lX11
++CFLAGS += -g $(shell $(PKG_CONFIG) sdl --cflags) $(shell $(PKG_CONFIG) 
gtk+-2.0 --cflags)
++LFLAGS += -lm -L/usr/$(BASELIBDIR) $(shell $(PKG_CONFIG) sdl --libs) $(shell 
$(PKG_CONFIG) gtk+-2.0 --libs) -lSDL_image -lSDL_ttf -lfreetype -lz -lX11
+ 
+ 
+ CFLAGS += -I$(BASEDIR) \
diff --minimal -Nru hivelytracker-0+git20180223/debian/patches/series 
hivelytracker-0+git20180223/debian/patches/series
--- hivelytracker-0+git20180223/debian/patches/series   2018-08-12 
18:33:41.000000000 +0200
+++ hivelytracker-0+git20180223/debian/patches/series   2019-09-29 
19:55:50.000000000 +0200
@@ -2,3 +2,4 @@
 data-dirs
 font-path
 drop-m3264
+cross.patch
diff --minimal -Nru hivelytracker-0+git20180223/debian/rules 
hivelytracker-0+git20180223/debian/rules
--- hivelytracker-0+git20180223/debian/rules    2018-02-25 21:33:37.000000000 
+0100
+++ hivelytracker-0+git20180223/debian/rules    2019-09-29 19:57:16.000000000 
+0200
@@ -12,7 +12,7 @@
        dh $@ --sourcedirectory=sdl
 
 override_dh_auto_build:
-       $(MAKE) -C sdl -f Makefile.linux
+       dh_auto_build -- -f Makefile.linux
 
 override_dh_auto_clean:
        @echo no clean target

Reply via email to