Source: holotz-castle
Version: 1.3.14-9
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

holotz-castle fails to cross build from source, because the upstream
build system hard codes the build architecture compiler "g++". After
making it substitutable, holotz-castle cross builds successfully. Please
consider applying the attached patch.

Helmut
--- holotz-castle-1.3.14.orig/JLib/Makefile
+++ holotz-castle-1.3.14/JLib/Makefile
@@ -33,15 +33,15 @@
 
 # JLib
 libJLib: $(JLIB_OBJS)
-	g++ $(HARDENING_LDFLAGS) -shared -L/usr/lib -fPIC -o $@.so $? \
+	$(CXX) $(HARDENING_LDFLAGS) -shared -L/usr/lib -fPIC -o $@.so $? \
 	&& ar rvus $@.a $? \
 
 $(GRAPHICS)/%.o: $(GRAPHICS)/%.cpp
-	g++ $(CFLAGS) -c -o $@ $<
+	$(CXX) $(CFLAGS) -c -o $@ $<
 $(UTIL)/%.o: $(UTIL)/%.cpp
-	g++ $(CFLAGS) -c -o $@ $<
+	$(CXX) $(CFLAGS) -c -o $@ $<
 $(MATH)/%.o: $(MATH)/%.cpp
-	g++ $(CFLAGS) -c -o $@ $<
+	$(CXX) $(CFLAGS) -c -o $@ $<
 
 .PHONY: install
 install:
--- holotz-castle-1.3.14.orig/src/Makefile
+++ holotz-castle-1.3.14/src/Makefile
@@ -58,15 +58,15 @@
 	$(MAKE) -C ../JLib;
 
 %.o: %.cpp %.h
-	g++ $(CFLAGS) $(DEFINES) $< -o $@
+	$(CXX) $(CFLAGS) $(DEFINES) $< -o $@
 
 HC: $(HC_OBJS) $(HC_OBJ_MAIN) ../JLib/libJLib.a
-	g++ $(LDFLAGS) $? -o $@ $(LIBS);\
+	$(CXX) $(LDFLAGS) $? -o $@ $(LIBS);\
 	mv HC ../holotz-castle
 
 # HCed (Holotz's Castle editor).
 HCed: $(HC_OBJS) $(HCED_OBJ_MAIN) ../JLib/libJLib.a
-	g++ $(LDFLAGS) $? -o $@ $(LIBS);\
+	$(CXX) $(LDFLAGS) $? -o $@ $(LIBS);\
 	mv HCed ../holotz-castle-editor
 
 install:

Reply via email to