Source: multimon
Version: 1.0-7.1
Tags: patch
User: [email protected]
Usertags: ftcbfs

multimon fails to cross build from source, because it fails running the
code generator mkcostab as it is built with the host architecture
compiler. Please consider applying the attached patch to use the build
architecture compiler for that step.

Helmut
diff --minimal -Nru multimon-1.0/debian/changelog multimon-1.0/debian/changelog
--- multimon-1.0/debian/changelog       2015-07-20 19:58:21.000000000 +0200
+++ multimon-1.0/debian/changelog       2019-10-03 21:06:30.000000000 +0200
@@ -1,3 +1,10 @@
+multimon (1.0-7.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Compile mkcostab.c with the build architecture compiler. 
(Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Thu, 03 Oct 2019 21:06:30 +0200
+
 multimon (1.0-7.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru multimon-1.0/debian/patches/cross.patch 
multimon-1.0/debian/patches/cross.patch
--- multimon-1.0/debian/patches/cross.patch     1970-01-01 01:00:00.000000000 
+0100
+++ multimon-1.0/debian/patches/cross.patch     2019-10-03 21:05:40.000000000 
+0200
@@ -0,0 +1,23 @@
+--- multimon-1.0.orig/Makefile
++++ multimon-1.0/Makefile
+@@ -32,8 +32,8 @@
+ AS            =as
+ LD            =ld
+ LDFLAGS               +=-lm
+-HOSTCC                =gcc
+ CC            =gcc
++CC_FOR_BUILD    ?= $(CC)
+ MAKE          =make
+ CPP           =$(CC) -E
+ AR            =ar
+@@ -75,8 +75,8 @@
+ $(BINDIR)/gen:                $(OBJ_GEN)
+                       $(CC) $^ $(LDFLAGS) -o $@
+ 
+-$(BINDIR)/mkcostab:   $(BINDIR)/mkcostab.o
+-                      $(CC) $^ $(LDFLAGS) -o $@
++$(BINDIR)/mkcostab:   mkcostab.c
++                      $(CC_FOR_BUILD) $^ -lm -o $@
+ 
+ costabi.c costabf.c:  $(BINDIR)/mkcostab
+                       $(BINDIR)/mkcostab
diff --minimal -Nru multimon-1.0/debian/patches/series 
multimon-1.0/debian/patches/series
--- multimon-1.0/debian/patches/series  2013-11-17 22:01:53.000000000 +0100
+++ multimon-1.0/debian/patches/series  2019-10-03 21:03:43.000000000 +0200
@@ -7,3 +7,4 @@
 quiet-output.patch
 fix-stereo.patch
 ccir-added.patch
+cross.patch
diff --minimal -Nru multimon-1.0/debian/rules multimon-1.0/debian/rules
--- multimon-1.0/debian/rules   2015-07-20 19:57:51.000000000 +0200
+++ multimon-1.0/debian/rules   2019-10-03 21:06:28.000000000 +0200
@@ -1,6 +1,10 @@
 #!/usr/bin/make -f
 
 export DEB_CFLAGS_MAINT_APPEND=-fgnu89-inline
+include /usr/share/dpkg/buildtools.mk
 
 %:
        dh $@
+
+override_dh_auto_build:
+       dh_auto_build -- 'CC_FOR_BUILD=$(CC_FOR_BUILD)'

Reply via email to