Source: gpscorrelate Version: 1.6.1-6 Tags: patch User: helm...@debian.org Usertags: rebootstrap
gpscorrelate fails to cross build from source, because it uses the build architecture toolchain. The upstream makefile hard codes build architecture build tools (pkg-config, gcc, g++) and the packaging does not supply substitutes either. The attached patch makes gpscorrelate cross buildable. Please consider applying it. Helmut
diff --minimal -Nru gpscorrelate-1.6.1/debian/changelog gpscorrelate-1.6.1/debian/changelog --- gpscorrelate-1.6.1/debian/changelog 2018-04-08 22:28:23.000000000 +0200 +++ gpscorrelate-1.6.1/debian/changelog 2018-06-10 19:22:21.000000000 +0200 @@ -1,3 +1,12 @@ +gpscorrelate (1.6.1-6.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + cross.patch: Make build tools substitutable. + + -- Helmut Grohne <hel...@subdivi.de> Sun, 10 Jun 2018 19:22:21 +0200 + gpscorrelate (1.6.1-6) unstable; urgency=medium * Bump to Standard-Version 4.1.3. No changes required. diff --minimal -Nru gpscorrelate-1.6.1/debian/patches/cross.patch gpscorrelate-1.6.1/debian/patches/cross.patch --- gpscorrelate-1.6.1/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ gpscorrelate-1.6.1/debian/patches/cross.patch 2018-06-10 19:17:25.000000000 +0200 @@ -0,0 +1,41 @@ +--- gpscorrelate-1.6.1.orig/Makefile ++++ gpscorrelate-1.6.1/Makefile +@@ -2,13 +2,14 @@ + # Written by Daniel Foote. + + ++PKG_CONFIG ?= pkg-config + COBJS = main-command.o unixtime.o gpx-read.o correlate.o exif-gps.o + GOBJS = main-gui.o gui.o unixtime.o gpx-read.o correlate.o exif-gps.o + CFLAGS = -Wall +-override CFLAGS += $(shell pkg-config --cflags libxml-2.0 gtk+-2.0) -I/usr/include/exiv2 ++override CFLAGS += $(shell $(PKG_CONFIG) --cflags libxml-2.0 gtk+-2.0) -I/usr/include/exiv2 + OFLAGS = -Wall +-OFLAGS_CON = $(OFLAGS) -Wl,--as-needed $(shell pkg-config --libs libxml-2.0) -lm -lexiv2 +-OFLAGS_GTK = $(OFLAGS) -Wl,--as-needed $(shell pkg-config --libs libxml-2.0 gtk+-2.0) -lm -lexiv2 ++OFLAGS_CON = $(OFLAGS) -Wl,--as-needed $(shell $(PKG_CONFIG) --libs libxml-2.0) -lm -lexiv2 ++OFLAGS_GTK = $(OFLAGS) -Wl,--as-needed $(shell $(PKG_CONFIG) --libs libxml-2.0 gtk+-2.0) -lm -lexiv2 + prefix = /usr/local + bindir = $(prefix)/bin + datadir = $(prefix)/share +@@ -19,16 +20,16 @@ + all: gpscorrelate gpscorrelate-gui gpscorrelate.1 + + gpscorrelate: $(COBJS) +- g++ -o $@ $(COBJS) $(OFLAGS_CON) ++ $(CXX) -o $@ $(COBJS) $(OFLAGS_CON) + + gpscorrelate-gui: $(GOBJS) +- g++ -o $@ $(GOBJS) $(OFLAGS_GTK) ++ $(CXX) -o $@ $(GOBJS) $(OFLAGS_GTK) + + .c.o: +- gcc $(CFLAGS) -c -o $*.o $< ++ $(CC) $(CFLAGS) -c -o $*.o $< + + .cpp.o: +- g++ $(CFLAGS) -c -o $*.o $< ++ $(CXX) $(CFLAGS) -c -o $*.o $< + + clean: + rm -f *.o gpscorrelate gpscorrelate-gui doc/gpscorrelate-manpage.xml gpscorrelate.1 diff --minimal -Nru gpscorrelate-1.6.1/debian/patches/series gpscorrelate-1.6.1/debian/patches/series --- gpscorrelate-1.6.1/debian/patches/series 2018-03-19 09:59:50.000000000 +0100 +++ gpscorrelate-1.6.1/debian/patches/series 2018-06-10 19:14:18.000000000 +0200 @@ -5,3 +5,4 @@ 50-add-keywords-entry-desktop-file.patch 60-gpstimestamp-unsigned.patch 70-option-overwrite-gpstags.patch +cross.patch diff --minimal -Nru gpscorrelate-1.6.1/debian/rules gpscorrelate-1.6.1/debian/rules --- gpscorrelate-1.6.1/debian/rules 2012-05-06 23:38:48.000000000 +0200 +++ gpscorrelate-1.6.1/debian/rules 2018-06-10 19:13:41.000000000 +0200 @@ -20,7 +20,7 @@ dh $@ override_dh_auto_build: - $(MAKE) prefix=/usr CFLAGS="$(CFLAGS) $(CPPFLAGS) $(CXXFLAGS)" OFLAGS="$(LDFLAGS)" + dh_auto_build -- prefix=/usr CFLAGS="$(CFLAGS) $(CPPFLAGS) $(CXXFLAGS)" OFLAGS="$(LDFLAGS)" override_dh_auto_install: $(MAKE) DESTDIR=debian/tmp prefix=/usr install