Bug#926498: blastem FTCBFS: builds for the wrong architecture

Helmut Grohne helmut at subdivi.de
Sat Apr 6 06:05:20 BST 2019


Source: blastem
Version: 0.6.3-1
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

blastem fails to cross build from source, because it builds for the
build architecture. It does not pass any cross tools to make. The
easiest fix here is using dh_auto_build. Then the upstream Makefile hard
codes the build architecture pkg-config. It needs to be made
substitutable. The attached patch makes blastem cross buildable. Please
consider applying it.

Helmut
-------------- next part --------------
diff --minimal -Nru blastem-0.6.3/debian/changelog blastem-0.6.3/debian/changelog
--- blastem-0.6.3/debian/changelog	2019-03-10 02:10:42.000000000 +0100
+++ blastem-0.6.3/debian/changelog	2019-04-06 07:01:54.000000000 +0200
@@ -1,3 +1,12 @@
+blastem (0.6.3-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 <helmut at subdivi.de>  Sat, 06 Apr 2019 07:01:54 +0200
+
 blastem (0.6.3-1) unstable; urgency=medium
 
   * New upstream release
diff --minimal -Nru blastem-0.6.3/debian/patches/cross.patch blastem-0.6.3/debian/patches/cross.patch
--- blastem-0.6.3/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ blastem-0.6.3/debian/patches/cross.patch	2019-04-06 07:01:51.000000000 +0200
@@ -0,0 +1,36 @@
+--- blastem-0.6.3.orig/Makefile
++++ blastem-0.6.3/Makefile
+@@ -1,3 +1,4 @@
++PKG_CONFIG ?= pkg-config
+ ifndef OS
+ OS:=$(shell uname -s)
+ endif
+@@ -62,7 +63,7 @@
+ ifdef PORTABLE
+ ifdef USE_GLES
+ ifndef GLES_LIB
+-GLES_LIB:=$(shell pkg-config --libs glesv2)
++GLES_LIB:=$(shell $(PKG_CONFIG) --libs glesv2)
+ endif
+ LDFLAGS:=-lm $(GLES_LIB)
+ else
+@@ -78,7 +79,7 @@
+ CFLAGS+= -Isdl/include
+ LDFLAGS+= -Wl,-rpath='$$ORIGIN/lib' -Llib -lSDL2
+ ifndef USE_GLES
+-LDFLAGS+= $(shell pkg-config --libs gl)
++LDFLAGS+= $(shell $(PKG_CONFIG) --libs gl)
+ endif
+ endif #Darwin
+ 
+@@ -86,8 +87,8 @@
+ ifeq ($(MAKECMDGOALS),libblastem.so)
+ LDFLAGS:=-lm
+ else
+-CFLAGS:=$(shell pkg-config --cflags-only-I $(LIBS)) $(CFLAGS)
+-LDFLAGS:=-lm $(shell pkg-config --libs $(LIBS))
++CFLAGS:=$(shell $(PKG_CONFIG) --cflags-only-I $(LIBS)) $(CFLAGS)
++LDFLAGS:=-lm $(shell $(PKG_CONFIG) --libs $(LIBS))
+ endif #libblastem.so
+ 
+ ifeq ($(OS),Darwin)
diff --minimal -Nru blastem-0.6.3/debian/patches/series blastem-0.6.3/debian/patches/series
--- blastem-0.6.3/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ blastem-0.6.3/debian/patches/series	2019-04-06 07:00:56.000000000 +0200
@@ -0,0 +1 @@
+cross.patch
diff --minimal -Nru blastem-0.6.3/debian/rules blastem-0.6.3/debian/rules
--- blastem-0.6.3/debian/rules	2019-01-24 06:08:50.000000000 +0100
+++ blastem-0.6.3/debian/rules	2019-04-06 07:00:48.000000000 +0200
@@ -7,5 +7,5 @@
 	dh $@
 
 override_dh_auto_build:
-	make HOST_ZLIB=1 CONFIG_PATH=/etc/blastem \
+	dh_auto_build -- HOST_ZLIB=1 CONFIG_PATH=/etc/blastem \
 	DATA_PATH=/usr/share/games/blastem


More information about the Pkg-games-devel mailing list