Source: roaraudio
Version: 1.0~beta11-10
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

roaraudio fails to cross build from source, because it configures for
the build architecture. Normally, the simple cure is using
dh_auto_configure, but roaraudio's ./configure does not follow the
typical autotools convenctions. For some reason, the --cc option seems
to be ignored by ./configure, but passing the cross compiler via the
environment works. The attached patch fixes the ./configure invocation,
but it does not make it cross buildable: The pkg-config file is
generated using roar-config and the build system decides to skip that
for cross compilation. Consequently the .pc file is missing and
dh_install complains. I don't see a simple fix for this issue. Most
likely, the .pc file should be generated without roar-config. Please
consider applying the attached patch anyway and close this bug when
doing so.

Helmut
diff --minimal -Nru roaraudio-1.0~beta11/debian/changelog 
roaraudio-1.0~beta11/debian/changelog
--- roaraudio-1.0~beta11/debian/changelog       2017-07-03 13:17:48.000000000 
+0200
+++ roaraudio-1.0~beta11/debian/changelog       2018-09-21 19:45:12.000000000 
+0200
@@ -1,3 +1,10 @@
+roaraudio (1.0~beta11-10.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Tell ./configure about cross building. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 21 Sep 2018 19:45:12 +0200
+
 roaraudio (1.0~beta11-10) unstable; urgency=low
 
   * Remove esound support.
diff --minimal -Nru roaraudio-1.0~beta11/debian/rules 
roaraudio-1.0~beta11/debian/rules
--- roaraudio-1.0~beta11/debian/rules   2017-07-03 13:17:48.000000000 +0200
+++ roaraudio-1.0~beta11/debian/rules   2018-09-21 19:45:12.000000000 +0200
@@ -3,7 +3,9 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 DEB_VERSION := $(shell dpkg-parsechangelog|egrep '^Version:'|cut -f 2 -d ' ')
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
+-include /usr/share/dpkg/buildtools.mk
+export CC
 
 DEB_CONFIGURE_EXTRA_FLAGS := \
        --cflags "$(CFLAGS)" \
@@ -25,6 +27,10 @@
        --no-slp \
        --distribution-version-string "Debian-$(DEB_VERSION)"
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+DEB_CONFIGURE_EXTRA_FLAGS += --cross-compile
+endif
+
 %:
        dh $@
 

Reply via email to