Source: vodovod Version: 1.10-4 Tags: patch User: helm...@debian.org Usertags: rebootstrap
vodovod fails to cross build from source, because it uses the build architecture compiler. The easiest way to fix that is using dh_auto_build. After doing so, it uses the host architecture C (not C++) compiler, because vodovod stores the C++ compiler in $(CC). Renaming the variable to the more common $(CXX) fixes the cross build. Please consider applying the attached patch. Helmut
diff --minimal -Nru vodovod-1.10/debian/changelog vodovod-1.10/debian/changelog --- vodovod-1.10/debian/changelog 2015-11-26 20:09:01.000000000 +0100 +++ vodovod-1.10/debian/changelog 2018-07-10 22:13:39.000000000 +0200 @@ -1,3 +1,12 @@ +vodovod (1.10-4.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + cross.patch: Use CXX for the C++ compiler to avoid using a C compiler. + + -- Helmut Grohne <hel...@subdivi.de> Tue, 10 Jul 2018 22:13:39 +0200 + vodovod (1.10-4) unstable; urgency=medium * Team upload. diff --minimal -Nru vodovod-1.10/debian/patches/cross.patch vodovod-1.10/debian/patches/cross.patch --- vodovod-1.10/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ vodovod-1.10/debian/patches/cross.patch 2018-07-10 22:13:39.000000000 +0200 @@ -0,0 +1,26 @@ +--- vodovod-1.10.orig/Makefile ++++ vodovod-1.10/Makefile +@@ -27,7 +27,7 @@ + + PROGRAM = vodovod + OBJECTS = game.o map.o resource.o main.o allmenus.o njamfont.o sutils.o menu.o hiscore.o effects.o config.o keys.o +-CC = g++ ++CXX = g++ + LDFLAGS=`dpkg-buildflags --get LDFLAGS` + + # If you hate warnings under Cygwin use these flags instead +@@ -38,12 +38,12 @@ + MY_CFLAGS += `dpkg-buildflags --get CXXFLAGS` + + %.o: %.cpp +- $(CC) -c $(MY_CFLAGS) $< -o $@ ++ $(CXX) -c $(MY_CFLAGS) $< -o $@ + + all: $(PROGRAM) + + $(PROGRAM): $(OBJECTS) +- $(CC) $(LDFLAGS) `sdl-config --libs` -o$(PROGRAM) $(OBJECTS) -lSDL -lSDL_image -lSDL_mixer ++ $(CXX) $(LDFLAGS) `sdl-config --libs` -o$(PROGRAM) $(OBJECTS) -lSDL -lSDL_image -lSDL_mixer + + clean: + $(RM) *.o diff --minimal -Nru vodovod-1.10/debian/patches/series vodovod-1.10/debian/patches/series --- vodovod-1.10/debian/patches/series 2015-11-26 20:09:01.000000000 +0100 +++ vodovod-1.10/debian/patches/series 2018-07-10 22:13:39.000000000 +0200 @@ -4,3 +4,4 @@ fix-FTBFS-with-gcc-4.3.patch hardening-support.patch fix-format-not-a-string-literal-error.patch +cross.patch diff --minimal -Nru vodovod-1.10/debian/rules vodovod-1.10/debian/rules --- vodovod-1.10/debian/rules 2015-11-26 20:09:01.000000000 +0100 +++ vodovod-1.10/debian/rules 2018-07-10 22:13:37.000000000 +0200 @@ -6,7 +6,7 @@ dh $@ --parallel override_dh_auto_build: - $(MAKE) DATADIR=/usr/share/games/vodovod + dh_auto_build -- DATADIR=/usr/share/games/vodovod override_dh_installchangelogs: dh_installchangelogs CHANGES