Source: mp3info
Version: 0.8.5a-1
Tags: patch
User: [email protected]
Usertags: rebootstrap
mp3info fails to cross build from source, because it uses the build
architecture compiler. Adding a host architecture triplet prefix to both
gcc and pkg-config fixes the cross build. Please consider applying the
attached patch.
Helmut
diff -u mp3info-0.8.5a/Makefile mp3info-0.8.5a/Makefile
--- mp3info-0.8.5a/Makefile
+++ mp3info-0.8.5a/Makefile
@@ -45,6 +45,7 @@
LIBS = -lncurses
CC = gcc
+PKG_CONFIG = pkg-config
CFLAGS = -g -O2 -Wall
all: mp3info gmp3info doc
@@ -55,7 +56,7 @@
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
gmp3info: $(XSRC) $(XOBJ)
- $(CC) $(XSRC) $(CFLAGS) -o $@ $(XOBJ) `pkg-config --cflags --libs
gtk+-2.0`
+ $(CC) $(XSRC) $(CFLAGS) -o $@ $(XOBJ) `$(PKG_CONFIG) --cflags --libs
gtk+-2.0`
mp3info.txt: mp3info.1
groff -t -e -mandoc -Tascii mp3info.1 | col -bx > mp3info.txt
diff -u mp3info-0.8.5a/debian/rules mp3info-0.8.5a/debian/rules
--- mp3info-0.8.5a/debian/rules
+++ mp3info-0.8.5a/debian/rules
@@ -9,6 +9,14 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+-include /usr/share/dpkg/architecture.mk
+ifneq ($(DEB_HOST_GNU_TYPE),)
+TOOL_PREFIX = $(DEB_HOST_GNU_TYPE)-
+endif
+ifeq ($(origin CC),default)
+CC = $(TOOL_PREFIX)gcc
+endif
+
# This has to be exported to make some magic below work.
export DH_OPTIONS
@@ -25,7 +33,7 @@
dh_testdir
# Add here commands to compile the package.
- $(MAKE)
+ $(MAKE) CC='$(CC)' PKG_CONFIG='$(TOOL_PREFIX)pkg-config'
touch build-stamp
diff -u mp3info-0.8.5a/debian/changelog mp3info-0.8.5a/debian/changelog
--- mp3info-0.8.5a/debian/changelog
+++ mp3info-0.8.5a/debian/changelog
@@ -1,3 +1,10 @@
+mp3info (0.8.5a-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Use triplet-prefixed build tools (Closes #-1)
+
+ -- Helmut Grohne <[email protected]> Fri, 13 Jan 2017 16:59:44 +0100
+
mp3info (0.8.5a-1) unstable; urgency=low
* New upstream version