Source: patman
Version: 1.2.2+dfsg-5
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

patman fails to cross build from source, because the upstream Makefile
hard codes g++. It also hard codes "install -s", which breaks generation
of -dbgsym packages and DEB_BUILD_OPTIONS=nostrip in addition to
breaking cross compilation. Making these tools substitutable is enough
to fix all of these. Please consider applying the attached patch.

Helmut
--- patman-1.2.2+dfsg.orig/Makefile
+++ patman-1.2.2+dfsg/Makefile
@@ -9,6 +9,7 @@
 prefix := ${HOME}
 version := 1.2
 
+INSTALL ?= install
 TARGETS := patman
 OBJS := prefix_tree.o fasta.o main.o
 CXXFLAGS += -Wall
@@ -19,16 +20,16 @@
 all: $(TARGETS)
 
 patman:	$(OBJS)
-	g++ $(CXXFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
+	$(CXX) $(CXXFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS)
 
 %.o:	%.cpp
-	g++ -DVERSION="\"$(version)\"" $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
+	$(CXX) -DVERSION="\"$(version)\"" $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
 
 install: $(TARGETS)
-	install -d ${prefix}/bin
-	install -d ${prefix}/share/man/man1
-	install -s -m755 $^ ${prefix}/bin
-	install -m644 patman.1 ${prefix}/share/man/man1
+	$(INSTALL) -d ${prefix}/bin
+	$(INSTALL) -d ${prefix}/share/man/man1
+	$(INSTALL) -s -m755 $^ ${prefix}/bin
+	$(INSTALL) -m644 patman.1 ${prefix}/share/man/man1
 	
 fasta.o: fasta.h 
 prefix_tree.o: prefix_tree.h global.h

Reply via email to