Source: mpg321
Version: 0.3.2-1.1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

mpg321 fails to cross build from source, because it (implicitly)
configures for the build architecture by not passing any --host flag to
./configure. I suggest indirecting ./configure through
dh_auto_configure, which handles this automatically. In addition, it the
packaging tries to detect Linux by looking at DEB_BUILD_ARCH_OS. That's
wrong and it needs to look at DEB_HOST_ARCH_OS. Please consider applying
the attached patch after stretch is released.

Helmut
diff --minimal -Nru mpg321-0.3.2/debian/changelog mpg321-0.3.2/debian/changelog
--- mpg321-0.3.2/debian/changelog       2012-05-01 08:55:17.000000000 +0200
+++ mpg321-0.3.2/debian/changelog       2017-06-09 17:45:24.000000000 +0200
@@ -1,3 +1,12 @@
+mpg321 (0.3.2-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_configure pass --host flag.
+    + Deconfuse build/host.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 09 Jun 2017 17:45:24 +0200
+
 mpg321 (0.3.2-1.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff --minimal -Nru mpg321-0.3.2/debian/rules mpg321-0.3.2/debian/rules
--- mpg321-0.3.2/debian/rules   2012-05-01 08:53:43.000000000 +0200
+++ mpg321-0.3.2/debian/rules   2017-06-09 17:45:24.000000000 +0200
@@ -3,10 +3,16 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpkg/architecture.mk
 
 CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall -Wunused
 
-MPG321_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
+CONFIGURE_FLAGS = --disable-mpg123-symlink
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+CONFIGURE_FLAGS += --enable-alsa=yes
+else
+CONFIGURE_FLAGS += --enable-alsa=no
+endif
 
 LDFLAGS += -Wl,-z,defs -Wl,--as-needed
 
@@ -16,12 +22,8 @@
 configure-stamp:
        dh_testdir
        # Add here commands to configure the package.
-       #CFLAGS="$(CFLAGS)" ./configure --prefix=/usr --mandir=/usr/share/man 
--disable-mpg123-symlink
-ifeq ($(MPG321_ARCH),linux)
-       ./configure --prefix=/usr --mandir=/usr/share/man 
--disable-mpg123-symlink --enable-alsa=yes
-else
-       ./configure --prefix=/usr --mandir=/usr/share/man 
--disable-mpg123-symlink --enable-alsa=no
-endif
+       #CFLAGS="$(CFLAGS)" dh_auto_configure -- $(CONFIGURE_FLAGS)
+       dh_auto_configure -- $(CONFIGURE_FLAGS)
        touch configure-stamp
 
 build: configure-stamp build-arch build-indep

Reply via email to