Source: simulpic
Version: 1:2005-1-28-9
Tags: patch
User: hel...@debian.org
Usertags: rebootstrap

simulpic fails to cross build from source, due to bugs in the (patched)
Makefile. The final failure comes when the build architecture compiler
g++ is invoked on host architecture objects. Usually one would use
$(CXX) here, but $(CXX) contains $(CFLAGS). This is a problem of its own
as dh_auto_build replaces $(CXX) and thus clears those $(CFLAGS). So
Move the $(CFLAGS) into the proper place, $(CXXFLAGS), and use $(CXX) in
the way it usually is used. After doing so, simulpic cross builds
successfully. Please consider applying the attached patch.

Helmut
Index: simulpic-2005-1-28/Makefile
===================================================================
--- simulpic-2005-1-28.orig/Makefile
+++ simulpic-2005-1-28/Makefile
@@ -8,16 +8,16 @@
 
 ALLSRC=$(IECSRC) $(SRCS) $(INCLUDES) Makefile Copyright README simulpic.doc simulpic.1
 
-CFLAGS= -g -fPIC -O2 -Wall -fno-exceptions \
+CXXFLAGS= -g -fPIC -O2 -Wall -fno-exceptions \
 	-I. -I/usr/include/g++-3 -D_FILE_OFFSET_BITS=64
 
 
-CXX= g++ $(CFLAGS)
+CXX= g++
 
 OBJS= $(SRCS:.cc=.o)
 
 simulpic: $(OBJS)
-	g++ $(LDFLAGS) -g -o simulpic $(OBJS)
+	$(CXX) $(LDFLAGS) -g -o simulpic $(OBJS)
 
 clean:
 	- rm -f $(OBJS) a.out *.core simulpic

Reply via email to