Source: mumble
Version: 1.3.0~git20190114.9fcc588+dfsg-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

mumble fails to cross build from source, because it calls the build
architecture qmake. It actually calls qmake twice: Once via
dh_auto_configure and once directly from debian/rules. The call via
dh_auto_configure uses the right qmake, but the wrong flags. Merging
those calls into one fixes this part. Then mumble hard codes the build
architecture pkg-config in a lot of places. Making those calls
substitutable should be upstreamable and makes mumble cross buildable.
Please consider applying the attached patch.

Helmut
diff --minimal -Nru mumble-1.3.0~git20190114.9fcc588+dfsg/debian/changelog 
mumble-1.3.0~git20190114.9fcc588+dfsg/debian/changelog
--- mumble-1.3.0~git20190114.9fcc588+dfsg/debian/changelog      2019-01-15 
06:53:33.000000000 +0100
+++ mumble-1.3.0~git20190114.9fcc588+dfsg/debian/changelog      2019-01-16 
06:24:27.000000000 +0100
@@ -1,3 +1,12 @@
+mumble (1.3.0~git20190114.9fcc588+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Call qmake once only. Via dh_auto_configure.
+    + cross.patch: Do not hard code pkg-config.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 16 Jan 2019 06:24:27 +0100
+
 mumble (1.3.0~git20190114.9fcc588+dfsg-1) unstable; urgency=medium
 
   * New upstream git snapshot from 2019-01-14
diff --minimal -Nru 
mumble-1.3.0~git20190114.9fcc588+dfsg/debian/patches/cross.path 
mumble-1.3.0~git20190114.9fcc588+dfsg/debian/patches/cross.path
--- mumble-1.3.0~git20190114.9fcc588+dfsg/debian/patches/cross.path     
1970-01-01 01:00:00.000000000 +0100
+++ mumble-1.3.0~git20190114.9fcc588+dfsg/debian/patches/cross.path     
2019-01-16 06:24:27.000000000 +0100
@@ -0,0 +1,148 @@
+--- mumble-1.3.0~git20190114.9fcc588+dfsg.orig/main.pro
++++ mumble-1.3.0~git20190114.9fcc588+dfsg/main.pro
+@@ -11,7 +11,7 @@
+ SUBDIRS *= src/mumble_proto
+ 
+ !CONFIG(no-client) {
+-  unix:!CONFIG(bundled-speex):system(pkg-config --atleast-version=1.2 
speexdsp):system(pkg-config --atleast-version=1.2 speex) {
++  unix:!CONFIG(bundled-speex):system($$PKG_CONFIG --atleast-version=1.2 
speexdsp):system($$PKG_CONFIG --atleast-version=1.2 speex) {
+     CONFIG *= no-bundled-speex
+   }
+   !CONFIG(no-bundled-speex) {
+@@ -21,7 +21,7 @@
+   CONFIG(sbcelt) {
+     SUBDIRS *= 3rdparty/celt-0.7.0-build 3rdparty/sbcelt-lib-build 
3rdparty/sbcelt-helper-build
+   } else {
+-    unix:!CONFIG(bundled-celt):system(pkg-config --atleast-version=0.7.0 
celt) {
++    unix:!CONFIG(bundled-celt):system($$PKG_CONFIG --atleast-version=0.7.0 
celt) {
+       CONFIG *= no-bundled-celt
+     }
+     !CONFIG(no-bundled-celt) {
+@@ -100,7 +100,7 @@
+     SUBDIRS *= src/murmur/murmur_ice
+   }
+   CONFIG(grpc) {
+-    !system(pkg-config --atleast-version=3 protobuf) {
++    !system($$PKG_CONFIG --atleast-version=3 protobuf) {
+       error(grpc requires protobuf>=3)
+     }
+     SUBDIRS *= src/murmur_grpcwrapper_protoc_plugin
+--- mumble-1.3.0~git20190114.9fcc588+dfsg.orig/qmake/compiler.pri
++++ mumble-1.3.0~git20190114.9fcc588+dfsg/qmake/compiler.pri
+@@ -8,6 +8,7 @@
+ include(buildenv.pri)
+ include(builddir.pri)
+ include(cplusplus.pri)
++include(pkgconfig.pri)
+ 
+ CONFIG *= warn_on
+ 
+--- mumble-1.3.0~git20190114.9fcc588+dfsg.orig/qmake/pkgconfig.pri
++++ mumble-1.3.0~git20190114.9fcc588+dfsg/qmake/pkgconfig.pri
+@@ -3,6 +3,8 @@
+ # that can be found in the LICENSE file at the root of the
+ # Mumble source tree or at <https://www.mumble.info/LICENSE>.
+ 
++PKG_CONFIG = $$pkgConfigExecutable()
++
+ # must_pkgconfig(pkg)
+ #
+ # This function checks if the passed-in package
+@@ -17,7 +19,7 @@
+ #
+ defineTest(must_pkgconfig) {
+       pkg = $$1
+-      system(pkg-config --exists $$pkg) {
++      system($$PKG_CONFIG --exists $$pkg) {
+               PKGCONFIG *= $$pkg
+               export(PKGCONFIG)
+       } else {
+--- mumble-1.3.0~git20190114.9fcc588+dfsg.orig/src/mumble.pri
++++ mumble-1.3.0~git20190114.9fcc588+dfsg/src/mumble.pri
+@@ -123,7 +123,7 @@
+ 
+ unix {
+       CONFIG(static) {
+-              PKG_CONFIG = pkg-config --static
++              PKG_CONFIG += --static
+       }
+ 
+       INCLUDEPATH *= "/usr/include/speech-dispatcher"
+--- mumble-1.3.0~git20190114.9fcc588+dfsg.orig/src/mumble/mumble.pro
++++ mumble-1.3.0~git20190114.9fcc588+dfsg/src/mumble/mumble.pro
+@@ -281,7 +281,7 @@
+   DEFINES *= USE_MANUAL_PLUGIN
+ }
+ 
+-unix:!CONFIG(bundled-speex):system(pkg-config --atleast-version=1.2 
speexdsp):system(pkg-config --atleast-version=1.2 speex) {
++unix:!CONFIG(bundled-speex):system($$PKG_CONFIG --atleast-version=1.2 
speexdsp):system($$PKG_CONFIG --atleast-version=1.2 speex) {
+   CONFIG *= no-bundled-speex
+ }
+ 
+@@ -315,7 +315,7 @@
+   LIBS *= -lcelt -lsbcelt
+   DEFINES *= SBCELT_PREFIX_API SBCELT_COMPAT_API USE_SBCELT
+ } else {
+-  unix:!CONFIG(bundled-celt):system(pkg-config --atleast-version=0.7.0 celt) {
++  unix:!CONFIG(bundled-celt):system($$PKG_CONFIG --atleast-version=0.7.0 
celt) {
+     CONFIG *= no-bundled-celt
+   }
+   CONFIG(no-bundled-celt) {
+@@ -349,7 +349,7 @@
+   DEFINES *= NO_VORBIS_RECORDING
+ }
+ 
+-unix:!CONFIG(bundled-opus):system(pkg-config --exists opus) {
++unix:!CONFIG(bundled-opus):system($$PKG_CONFIG --exists opus) {
+   must_pkgconfig(opus)
+   DEFINES *= USE_OPUS
+ } else {
+@@ -369,7 +369,7 @@
+   }
+ }
+ 
+-unix:!CONFIG(bundled-rnnoise):system(pkg-config --exists rnnoise) {
++unix:!CONFIG(bundled-rnnoise):system($$PKG_CONFIG --exists rnnoise) {
+   must_pkgconfig(rnnoise)
+   DEFINES *= USE_RNNOISE
+ } else {
+@@ -468,8 +468,8 @@
+ }
+ 
+ unix {
+-  HAVE_PULSEAUDIO=$$system(pkg-config --modversion --silence-errors libpulse)
+-  HAVE_JACKAUDIO=$$system(pkg-config --modversion --silence-errors jack)
++  HAVE_PULSEAUDIO=$$system($$PKG_CONFIG --modversion --silence-errors 
libpulse)
++  HAVE_JACKAUDIO=$$system($$PKG_CONFIG --modversion --silence-errors jack)
+ 
+   !isEmpty(HAVE_PULSEAUDIO):!CONFIG(no-pulseaudio) {
+     CONFIG *= pulseaudio
+@@ -623,7 +623,7 @@
+     LIBS *= -lDNSSD
+   }
+   unix:!macx {
+-    system(pkg-config --exists avahi-compat-libdns_sd avahi-client) {
++    system($$PKG_CONFIG --exists avahi-compat-libdns_sd avahi-client) {
+       must_pkgconfig(avahi-compat-libdns_sd)
+       must_pkgconfig(avahi-client)
+     } else {
+@@ -641,7 +641,7 @@
+ 
+ speechd {
+   DEFINES *= USE_SPEECHD
+-  system(pkg-config --atleast-version=0.8 speech-dispatcher) {
++  system($$PKG_CONFIG --atleast-version=0.8 speech-dispatcher) {
+     DEFINES *= USE_SPEECHD_PKGCONFIG
+     must_pkgconfig(speech-dispatcher)
+   } else {
+--- mumble-1.3.0~git20190114.9fcc588+dfsg.orig/src/murmur/murmur.pro
++++ mumble-1.3.0~git20190114.9fcc588+dfsg/src/murmur/murmur.pro
+@@ -199,7 +199,7 @@
+     LIBS *= -lDNSSD
+   }
+   unix:!macx {
+-    system(pkg-config --exists avahi-compat-libdns_sd avahi-client) {
++    system($$PKG_CONFIG --exists avahi-compat-libdns_sd avahi-client) {
+       must_pkgconfig(avahi-compat-libdns_sd)
+       must_pkgconfig(avahi-client)
+     } else {
diff --minimal -Nru mumble-1.3.0~git20190114.9fcc588+dfsg/debian/patches/series 
mumble-1.3.0~git20190114.9fcc588+dfsg/debian/patches/series
--- mumble-1.3.0~git20190114.9fcc588+dfsg/debian/patches/series 2019-01-14 
23:53:12.000000000 +0100
+++ mumble-1.3.0~git20190114.9fcc588+dfsg/debian/patches/series 2019-01-16 
06:24:27.000000000 +0100
@@ -6,3 +6,4 @@
 44-add-speechd-header.diff
 46-var-run-to-run.diff
 52-use-update-rc.d-for-disable.diff
+cross.path
diff --minimal -Nru mumble-1.3.0~git20190114.9fcc588+dfsg/debian/rules 
mumble-1.3.0~git20190114.9fcc588+dfsg/debian/rules
--- mumble-1.3.0~git20190114.9fcc588+dfsg/debian/rules  2019-01-15 
06:53:06.000000000 +0100
+++ mumble-1.3.0~git20190114.9fcc588+dfsg/debian/rules  2019-01-16 
06:24:27.000000000 +0100
@@ -20,8 +20,8 @@
        dh  $@
 
 override_dh_auto_configure:
-       dh_auto_configure
-       qmake -recursive main.pro \
+       dh_auto_configure -- \
+       -recursive main.pro \
        CONFIG*=dpkg-buildflags \
        CONFIG*=release \
        CONFIG*=symbols \

Reply via email to