Bug#923135: gravitation FTCBFS: uses the wrong compiler

Helmut Grohne helmut at subdivi.de
Sun Feb 24 11:53:44 GMT 2019


Source: gravitation
Version: 3+dfsg1-5
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

gravitation fails to cross build from source, the upstream build system
hard codes the build architecture compiler. Simply making it
substituable is insufficient here as dh_auto_build expects that
configure sets up cross tools, but the simplistic configure doesn't do
that. So we must tell dh_auto_build to pretend the simpler makefile
build system to make it pass cross tools. The attached patch makes
gravitation cross buildable. Please consider applying it.

Helmut
-------------- next part --------------
diff --minimal -Nru gravitation-3+dfsg1/debian/changelog gravitation-3+dfsg1/debian/changelog
--- gravitation-3+dfsg1/debian/changelog	2017-08-01 16:46:46.000000000 +0200
+++ gravitation-3+dfsg1/debian/changelog	2019-02-24 12:33:56.000000000 +0100
@@ -1,3 +1,12 @@
+gravitation (3+dfsg1-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + cross.patch: Make C++ compiler substitutable.
+    + Let dh_auto_build --buildsystem=makefile pass cross tools to make.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sun, 24 Feb 2019 12:33:56 +0100
+
 gravitation (3+dfsg1-5) unstable; urgency=medium
 
   * Fix build reproducibility issues due to use of imagemagick (Closes: #776872)
diff --minimal -Nru gravitation-3+dfsg1/debian/patches/cross.patch gravitation-3+dfsg1/debian/patches/cross.patch
--- gravitation-3+dfsg1/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ gravitation-3+dfsg1/debian/patches/cross.patch	2019-02-24 12:33:56.000000000 +0100
@@ -0,0 +1,13 @@
+--- gravitation-3+dfsg1.orig/game5/gameSource/Makefile.all
++++ gravitation-3+dfsg1/game5/gameSource/Makefile.all
+@@ -1,8 +1,8 @@
+ 
+ ROOT_PATH = ../..
+ 
+-COMPILE = g++ ${PLATFORM_COMPILE_FLAGS} -Wall -g -I${ROOT_PATH} -c
+-LINK = g++ -I${ROOT_PATH}
++COMPILE = $(CXX) ${PLATFORM_COMPILE_FLAGS} -Wall -g -I${ROOT_PATH} -c
++LINK = $(CXX) -I${ROOT_PATH}
+ 
+ 
+ 
diff --minimal -Nru gravitation-3+dfsg1/debian/patches/series gravitation-3+dfsg1/debian/patches/series
--- gravitation-3+dfsg1/debian/patches/series	2008-06-11 03:31:47.000000000 +0200
+++ gravitation-3+dfsg1/debian/patches/series	2019-02-24 12:33:56.000000000 +0100
@@ -1 +1,2 @@
 abs_path.patch
+cross.patch
diff --minimal -Nru gravitation-3+dfsg1/debian/rules gravitation-3+dfsg1/debian/rules
--- gravitation-3+dfsg1/debian/rules	2014-11-26 09:44:13.000000000 +0100
+++ gravitation-3+dfsg1/debian/rules	2019-02-24 12:33:55.000000000 +0100
@@ -19,7 +19,7 @@
 	convert 32x32/gravitation.png 32x32/gravitation.xpm
 	sed -i -e 's/PLATFORM_COMPILE_FLAGS = */PLATFORM_COMPILE_FLAGS = $$(CFLAGS) $$(CPPFLAGS) /' game5/gameSource/Makefile
 	sed -i -e 's/PLATFORM_LINK_FLAGS = */PLATFORM_LINK_FLAGS = $$(LDFLAGS) /' game5/gameSource/Makefile
-	$(MAKE) -C game5/gameSource LDFLAGS="-lpthread $(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS) -DETCDIR=\\\"/etc/gravitation\\\" -DDATADIR=\\\"/usr/share/games/gravitation/\\\""
+	dh_auto_build --buildsystem=makefile --sourcedirectory=game5/gameSource -- LDFLAGS="-lpthread $(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS) -DETCDIR=\\\"/etc/gravitation\\\" -DDATADIR=\\\"/usr/share/games/gravitation/\\\""
 
 override_dh_auto_clean:
 	find game5 -name "*.o" -delete


More information about the Pkg-games-devel mailing list