Source: plotdrop
Version: 0.5.4-1
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

plotdrop fails to cross build from source, because its Makefile hard
codes build architecture build tools. It uses bare pkg-config, which is
the build architecture one. dh_auto_build passes a cross $(PKG_CONFIG)
and all the Makefile has to do is pick it up. Furthermore, it uses the
-s option for the install command, which strips using the build
architecture strip. Besides breaking cross compilation, it also breaks
-dbgsym packages, so it is best left to dh_strip. Please consider
applying the attached patch.

Helmut
Index: plotdrop-0.5.4/Makefile
===================================================================
--- plotdrop-0.5.4.orig/Makefile
+++ plotdrop-0.5.4/Makefile
@@ -9,9 +9,10 @@
 OBJECTS=main.o gnuplot.o droplist.o
 
 LDFLAGS = 
-LIBS = `pkg-config --libs gtk+-2.0 gio-2.0 glib-2.0 libglade-2.0`
+PKG_CONFIG ?= pkg-config
+LIBS = `$(PKG_CONFIG) --libs gtk+-2.0 gio-2.0 glib-2.0 libglade-2.0`
 CFLAGS = -g -Wall -pedantic -std=c99
-LCFLAGS = `pkg-config --cflags gtk+-2.0 gio-2.0 glib-2.0 libglade-2.0` -DDATADIR="\"$(DATADIR)\"" -DVERSION="\"$(VERSION)\""
+LCFLAGS = `$(PKG_CONFIG) --cflags gtk+-2.0 gio-2.0 glib-2.0 libglade-2.0` -DDATADIR="\"$(DATADIR)\"" -DVERSION="\"$(VERSION)\""
 
 all: $(TARGET)
 
@@ -26,7 +27,7 @@
 
 install: all
 	install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(DATADIR)
-	install -s $(TARGET) $(DESTDIR)$(BINDIR)
+	install $(TARGET) $(DESTDIR)$(BINDIR)
 	install -m 0644 droplist.glade $(DESTDIR)$(DATADIR)
 	install -d $(DESTDIR)$(PREFIX)/share/applications
 	install -m 0644 plotdrop.desktop $(DESTDIR)$(PREFIX)/share/applications

Reply via email to