Source: vfu
Version: 4.18-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs
vfu fails to cross build from source, because it uses build architecture
build tools. It starts with using the autoconf build system and then
skipping configure. That results in debhelper not passing cross tools to
make. Using the makefile build system is better here as it also skips
makes dh_auto_configure a noop. Then the upstream build system uses
non-standard variables for g++ in lots of places. I think it is best to
canonicalize that and hope that this change is upstreamable. Also the
build strips by default. Doing so also breaks generation of -dbgsym
packages as well as DEB_BUILD_OPTIONS=nostrip. The attached patch fixes
all of that. Please consider applying it.
Helmut
diff --minimal -Nru vfu-4.18/debian/changelog vfu-4.18/debian/changelog
--- vfu-4.18/debian/changelog 2020-01-02 01:49:06.0 +0100
+++ vfu-4.18/debian/changelog 2020-02-09 07:01:09.0 +0100
@@ -1,3 +1,12 @@
+vfu (4.18-2) UNRELEASED; urgency=medium
+
+ * Fix FTCBFS: (Closes: #-1)
++ Use the makefile debhelper build system to pass cross tools.
++ Defer stripping to dh_strip.
++ cross.patch: make build tools substitutable via standard means.
+
+ -- Helmut Grohne Sun, 09 Feb 2020 07:01:09 +0100
+
vfu (4.18-1) unstable; urgency=medium
* QA upload.
diff --minimal -Nru vfu-4.18/debian/patches/cross.patch
vfu-4.18/debian/patches/cross.patch
--- vfu-4.18/debian/patches/cross.patch 1970-01-01 01:00:00.0 +0100
+++ vfu-4.18/debian/patches/cross.patch 2020-02-09 07:01:09.0 +0100
@@ -0,0 +1,389 @@
+--- vfu-4.18.orig/vslib/makefile
vfu-4.18/vslib/makefile
+@@ -25,8 +25,8 @@
+
+
+ AR = ar rv
+-CC = g++
+-LD = g++
++CXX = g++
++LD = $(CXX)
+ MKDIR = mkdir -p
+ RANLIB = ranlib
+ RMDIR = rm -rf
+@@ -36,8 +36,8 @@
+
+ ### TARGET 1: libvslib.a
###
+
+-CC_1 = g++
+-LD_1 = g++
++CXX_1 = $(CXX)
++LD_1 = $(CXX_1)
+ AR_1 = ar rv
+ RANLIB_1 = ranlib
+ CCFLAGS_1 = -I. -O2 $(CCDEF)
+@@ -100,33 +100,33 @@
+ ### TARGET OBJECTS FOR TARGET 1: libvslib.a
+
+ .OBJ.libvslib.a/clusters.o: clusters.cpp clusters.cpp clusters.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c clusters.cpp -o
.OBJ.libvslib.a/clusters.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c clusters.cpp -o
.OBJ.libvslib.a/clusters.o
+ .OBJ.libvslib.a/dlog.o: dlog.cpp dlog.cpp dlog.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c dlog.cpp -o
.OBJ.libvslib.a/dlog.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c dlog.cpp -o
.OBJ.libvslib.a/dlog.o
+ .OBJ.libvslib.a/eval.o: eval.cpp eval.cpp eval.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c eval.cpp -o
.OBJ.libvslib.a/eval.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c eval.cpp -o
.OBJ.libvslib.a/eval.o
+ .OBJ.libvslib.a/fnmatch2.o: fnmatch2.cpp fnmatch2.cpp fnmatch2.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c fnmatch2.cpp -o
.OBJ.libvslib.a/fnmatch2.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c fnmatch2.cpp -o
.OBJ.libvslib.a/fnmatch2.o
+ .OBJ.libvslib.a/getopt2.o: getopt2.cpp getopt2.cpp getopt2.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c getopt2.cpp -o
.OBJ.libvslib.a/getopt2.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c getopt2.cpp -o
.OBJ.libvslib.a/getopt2.o
+ .OBJ.libvslib.a/scroll.o: scroll.cpp scroll.cpp scroll.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c scroll.cpp -o
.OBJ.libvslib.a/scroll.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c scroll.cpp -o
.OBJ.libvslib.a/scroll.o
+ .OBJ.libvslib.a/vslib.o: vslib.cpp vslib.cpp
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c vslib.cpp-o
.OBJ.libvslib.a/vslib.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c vslib.cpp-o
.OBJ.libvslib.a/vslib.o
+ .OBJ.libvslib.a/vstring.o: vstring.cpp vstring.cpp vstring.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c vstring.cpp -o
.OBJ.libvslib.a/vstring.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c vstring.cpp -o
.OBJ.libvslib.a/vstring.o
+ .OBJ.libvslib.a/vstrlib.o: vstrlib.cpp vstrlib.cpp vstrlib.h vstring.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c vstrlib.cpp -o
.OBJ.libvslib.a/vstrlib.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c vstrlib.cpp -o
.OBJ.libvslib.a/vstrlib.o
+ .OBJ.libvslib.a/vsuti.o: vsuti.cpp vsuti.cpp vsuti.h target.h vstring.h
vstrlib.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c vsuti.cpp-o
.OBJ.libvslib.a/vsuti.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c vsuti.cpp-o
.OBJ.libvslib.a/vsuti.o
+ .OBJ.libvslib.a/vscrc.o: vscrc.cpp vscrc.cpp vsuti.h target.h vstring.h
+- $(CC_1) $(CFLAGS_1) $(CCFLAGS_1) -c vscrc.cpp-o
.OBJ.libvslib.a/vscrc.o
++ $(CXX_1) $(CFLAGS_1) $(CCFLAGS_1) -c vscrc.cpp-o
.OBJ.libvslib.a/vscr