Bug#946324: excellent-bifurcation FTCBFS: builds for the build architecture

Helmut Grohne helmut at subdivi.de
Sat Dec 7 06:29:39 GMT 2019


Source: excellent-bifurcation
Version: 0.0.20071015-8
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

excellent-bifurcation fails to cross build from source, because it uses
build architecture build tools. The easiest way of fixing that - using
dh_auto_build - does not suffice, because the upstream Makefile hard
codes the build architecture pkg-config. Another change is necessary to
make that substitutable. Please consider applying the attached patch to
make excellent-bifurcation cross buildable.

Helmut
-------------- next part --------------
diff --minimal -Nru excellent-bifurcation-0.0.20071015/debian/changelog excellent-bifurcation-0.0.20071015/debian/changelog
--- excellent-bifurcation-0.0.20071015/debian/changelog	2016-06-06 04:23:40.000000000 +0200
+++ excellent-bifurcation-0.0.20071015/debian/changelog	2019-12-07 07:18:14.000000000 +0100
@@ -1,3 +1,12 @@
+excellent-bifurcation (0.0.20071015-8.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + cross.patch: Make pkg-config substitutable.
+    + Let dh_auto_build pass cross tools to make.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sat, 07 Dec 2019 07:18:14 +0100
+
 excellent-bifurcation (0.0.20071015-8) unstable; urgency=medium
 
   * Make build reproducible by sorting list of source files to ensure
diff --minimal -Nru excellent-bifurcation-0.0.20071015/debian/patches/cross.patch excellent-bifurcation-0.0.20071015/debian/patches/cross.patch
--- excellent-bifurcation-0.0.20071015/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ excellent-bifurcation-0.0.20071015/debian/patches/cross.patch	2019-12-07 07:18:12.000000000 +0100
@@ -0,0 +1,23 @@
+--- excellent-bifurcation-0.0.20071015.orig/src/Makefile
++++ excellent-bifurcation-0.0.20071015/src/Makefile
+@@ -1,8 +1,9 @@
+ CC=gcc
+ CFLAGS=-Wall -O2
++PKG_CONFIG?=pkg-config
+ PKGCONFIG_FILES=libxdg-basedir
+-PKGCONFIG_CFLAGS= `pkg-config $(PKGCONFIG_FILES) --cflags`
+-PKGCONFIG_LDFLAGS= `pkg-config $(PKGCONFIG_FILES) --libs`
++PKGCONFIG_CFLAGS= `$(PKG_CONFIG) $(PKGCONFIG_FILES) --cflags`
++PKGCONFIG_LDFLAGS= `$(PKG_CONFIG) $(PKGCONFIG_FILES) --libs`
+ LDFLAGS=`allegro-config --libs`
+ SOURCES=$(sort $(shell find . -name "*.c"))
+ OBJECTS=$(SOURCES:.c=.o)
+@@ -14,7 +15,7 @@
+ 	$(CC) $(OBJECTS) -o $@ $(LDFLAGS) $(PKGCONFIG_LDFLAGS) -lm
+ 
+ .c.o:
+-	$(CC) $(CFLAGS) $(PKGCONFIG_CFLAGS) `pkg-config libxdg-basedir --libs` -c $< -o $@
++	$(CC) $(CFLAGS) $(PKGCONFIG_CFLAGS) `$(PKG_CONFIG) libxdg-basedir --libs` -c $< -o $@
+ 
+ clean:
+ 	rm -f $(EXECUTABLE) $(OBJECTS)
diff --minimal -Nru excellent-bifurcation-0.0.20071015/debian/patches/series excellent-bifurcation-0.0.20071015/debian/patches/series
--- excellent-bifurcation-0.0.20071015/debian/patches/series	2016-06-06 04:18:00.000000000 +0200
+++ excellent-bifurcation-0.0.20071015/debian/patches/series	2019-12-07 07:17:37.000000000 +0100
@@ -5,3 +5,4 @@
 fix_allegro_linker_flag.patch
 fix_hurd_ftbfs.patch
 reproducible-build.patch
+cross.patch
diff --minimal -Nru excellent-bifurcation-0.0.20071015/debian/rules excellent-bifurcation-0.0.20071015/debian/rules
--- excellent-bifurcation-0.0.20071015/debian/rules	2015-06-29 08:03:06.000000000 +0200
+++ excellent-bifurcation-0.0.20071015/debian/rules	2019-12-07 07:18:14.000000000 +0100
@@ -8,4 +8,4 @@
 	dh_clean
 
 override_dh_auto_build:
-	$(MAKE) -C src CFLAGS="$(CFLAGS) -std=gnu89 -DDATA_DIR=\\\"/usr/share/games/excellent-bifurcation\\\""
+	dh_auto_build --sourcedirectory=src -- CFLAGS="$(CFLAGS) -std=gnu89 -DDATA_DIR=\\\"/usr/share/games/excellent-bifurcation\\\""


More information about the Pkg-games-devel mailing list