Bug#908635: wing FTCBFS: does not pass cross tools to make

Helmut Grohne helmut at subdivi.de
Wed Sep 12 05:06:38 BST 2018


Source: wing
Version: 0.7-31
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

wing fails to cross build from source, because it uses the build
architecture compiler. debian/rules does not pass cross tools to make.
The easiest way to fix that is using dh_auto_build. Unfortunately, it
now uses the C compiler rather than the C++ compiler, because "CC"
usually is a C compiler. Fixing the upstream Makefile to use the
standard variable "CXX" makes the cross build succeed. Please consider
applying the attached patch.

Helmut
-------------- next part --------------
diff --minimal -Nru wing-0.7/debian/changelog wing-0.7/debian/changelog
--- wing-0.7/debian/changelog	2017-10-18 18:01:52.000000000 +0200
+++ wing-0.7/debian/changelog	2018-09-12 06:02:59.000000000 +0200
@@ -1,3 +1,12 @@
+wing (0.7-31.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + cross.patch: Use the standard variable for C++ compilers.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Wed, 12 Sep 2018 06:02:59 +0200
+
 wing (0.7-31) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru wing-0.7/debian/patches/cross.patch wing-0.7/debian/patches/cross.patch
--- wing-0.7/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ wing-0.7/debian/patches/cross.patch	2018-09-12 06:02:55.000000000 +0200
@@ -0,0 +1,24 @@
+--- wing-0.7.orig/makefile.unx
++++ wing-0.7/makefile.unx
+@@ -3,7 +3,7 @@
+ 
+ TARGET := wing
+ 
+-CC := g++
++CXX := g++
+ CPPFLAGS := 
+ CFLAGS := -Wall -Wno-deprecated-declarations -g -O2
+ CXXFLAGS := $(CFLAGS)
+@@ -26,10 +26,10 @@
+ 
+ 
+ wing : $(OBJ)
+-	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(OBJ) -o $(TARGET) $(LIBS)
++	$(CXX) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(OBJ) -o $(TARGET) $(LIBS)
+ 
+ .o : .cpp
+-	$(CC) $(CFLAGS) -c $^ -o $@
++	$(CXX) $(CFLAGS) -c $^ -o $@
+ 
+ clean:
+ 	rm -f *.o additional/*.o
diff --minimal -Nru wing-0.7/debian/patches/series wing-0.7/debian/patches/series
--- wing-0.7/debian/patches/series	2017-10-18 18:01:52.000000000 +0200
+++ wing-0.7/debian/patches/series	2018-09-12 06:02:34.000000000 +0200
@@ -1,2 +1,3 @@
 010_makefile.diff
 020_misc.diff
+cross.patch
diff --minimal -Nru wing-0.7/debian/rules wing-0.7/debian/rules
--- wing-0.7/debian/rules	2017-10-18 18:01:52.000000000 +0200
+++ wing-0.7/debian/rules	2018-09-12 06:02:12.000000000 +0200
@@ -9,7 +9,7 @@
 	dh $@
 
 override_dh_auto_build:
-	$(MAKE) -f makefile.unx CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)'
+	dh_auto_build --buildsystem=makefile -- -f makefile.unx CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)'
 
 override_dh_install:
 	mkdir -p debian/wing-data/usr/share/games/wing


More information about the Pkg-games-devel mailing list