[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#918724: smtube FTCBFS: runs qmake for the build architecture



Source: smtube
Version: 18.3.0-1
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

smtube fails to cross build from source, because it runs qmake for the
build architecture. Since dh_auto_* is unaware of qmake, it doesn't pass
the necessary flags. For cross compiling, one should use
${DEB_HOST_GNU_TYPE}-qmake. Also for using lrelease, you must add
qt5-qmake:native to Build-Depends. After doing both, smtube cross builds
successfully. Please consider applying the attached patch.

Helmut
diff --minimal -Nru smtube-18.3.0/debian/changelog smtube-18.3.0/debian/changelog
--- smtube-18.3.0/debian/changelog	2018-06-27 19:39:11.000000000 +0200
+++ smtube-18.3.0/debian/changelog	2019-01-08 20:13:08.000000000 +0100
@@ -1,3 +1,12 @@
+smtube (18.3.0-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Build-Depends: qt5-qmake:native for lrelease.
+    + Pass a cross QMAKE to make.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Tue, 08 Jan 2019 20:13:08 +0100
+
 smtube (18.3.0-1) unstable; urgency=medium
 
   [ Ondřej Nový ]
diff --minimal -Nru smtube-18.3.0/debian/control smtube-18.3.0/debian/control
--- smtube-18.3.0/debian/control	2018-06-27 19:39:11.000000000 +0200
+++ smtube-18.3.0/debian/control	2019-01-08 20:13:07.000000000 +0100
@@ -8,6 +8,7 @@
 Build-Depends:
  debhelper (>= 10~),
  libqt5webkit5-dev,
+ qt5-qmake:native,
  qttools5-dev-tools,
  qtscript5-dev,
  zlib1g-dev
diff --minimal -Nru smtube-18.3.0/debian/rules smtube-18.3.0/debian/rules
--- smtube-18.3.0/debian/rules	2018-06-22 09:50:55.000000000 +0200
+++ smtube-18.3.0/debian/rules	2019-01-08 20:12:50.000000000 +0100
@@ -1,8 +1,12 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
 export QT_SELECT=5
 QMAKE_OPTS = DEFINES+=NO_DEBUG_ON_CONSOLE
 MAKE_OPTS  = PREFIX=/usr QMAKE_OPTS="$(QMAKE_OPTS)"
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+MAKE_OPTS += QMAKE=$(DEB_HOST_GNU_TYPE)-qmake
+endif
 
 override_dh_auto_clean:
 	[ ! -f src/Makefile ] || dh_auto_clean

Reply to: