Source: concavity
Version: 0.1+dfsg.1-2
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

concavity fails to cross build from source, because it uses a C compiler
for C++ sources. The upstream Makefile assigns CC=g++, which is quite
non-standard. When dh_auto_build overrides CC with a cross C compiler,
things go wrong badly. Renaming CC to the standard CXX variable makes
the build succeed as dh_auto_build passes a C++ compiler there. Please
consider applying the attached patch.

Helmut
--- concavity-0.1+dfsg.1.orig/scripts/Makefile.apps
+++ concavity-0.1+dfsg.1/scripts/Makefile.apps
@@ -74,7 +74,7 @@
 
 $(EXE):	    $(OBJS) $(LIBDIR)
 	    mkdir -p $(EXE_DIR)
-	    $(CC) -o $(EXE) $(LDFLAGS) $(USER_OBJS) $(OBJS) $(LIBS)
+	    $(CXX) -o $(EXE) $(LDFLAGS) $(USER_OBJS) $(OBJS) $(LIBS)
 
 release:
 	    mkdir -p $(RELEASE_DIR)/apps
--- concavity-0.1+dfsg.1.orig/scripts/Makefile.std
+++ concavity-0.1+dfsg.1/scripts/Makefile.std
@@ -17,7 +17,7 @@
 # C flags
 #
 
-CC=g++
+CXX=g++
 BASE_CFLAGS=$(USER_CFLAGS) -Wall -I. -I../../pkgs 
 DEBUG_CFLAGS=$(BASE_CFLAGS) -g
 OPT_CFLAGS=$(BASE_CFLAGS) -O3 -DNDEBUG
@@ -52,7 +52,7 @@
 .SUFFIXES: .c .C .o
 
 .C.o:
-	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
+	$(CXX) $(CPPFLAGS) $(CFLAGS) -c $<
 
 .c.o:
 	gcc $(CPPFLAGS) $(CFLAGS) -c $<

Reply via email to