From 586ad2cb604846ffd0c3eb1b8c84264d606efa4f Mon Sep 17 00:00:00 2001 From: Tony Mountifield Date: Thu, 8 Feb 2024 18:53:20 +0000 Subject: [PATCH] Fix linux/debian/rules for building on Ubuntu 20.04 --- linux/debian/rules | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/linux/debian/rules b/linux/debian/rules index b9d715807c..bb1f655499 100755 --- a/linux/debian/rules +++ b/linux/debian/rules @@ -5,10 +5,18 @@ DEB_TARGET_GNU_TYPE := $(shell dpkg-architecture -qDEB_TARGET_GNU_TYPE) DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +# DEB_BUILD_GNU_TYPE is the system running the build (this system) +# DEB_HOST_GNU_TYPE is the system jamulus is being built for (the target) +# DEB_TARGET_GNU_TYPE is only relevant when building cross-compilers +$(info DEB_BUILD_GNU_TYPE=$(DEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE=$(DEB_HOST_GNU_TYPE) DEB_TARGET_GNU_TYPE=$(DEB_TARGET_GNU_TYPE)) + ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) QMAKE := qmake else - QMAKE := "/usr/lib/$(DEB_BUILD_GNU_TYPE)/qt5/bin/qmake" -qtconf "/usr/lib/$(DEB_TARGET_GNU_TYPE)/qt5/qt.conf" -spec "/usr/lib/$(DEB_TARGET_GNU_TYPE)/qt5/mkspecs/$(DEB_TARGET_GNU_TYPE)-g++" LIBS+="-lstdc++ -lm" + # For an unknown reason, when called from this makefile in Ubuntu 20.04, + # qmake needs an option between qmake and -qtconf, else it gives an error. + # We use -makefile, which is the default mode anyway, and this avoids the issue. + QMAKE := qmake -makefile -qtconf "/usr/lib/$(DEB_HOST_GNU_TYPE)/qt5/qt.conf" -spec "/usr/lib/$(DEB_HOST_GNU_TYPE)/qt5/mkspecs/$(DEB_HOST_GNU_TYPE)-g++" LIBS+="-lstdc++ -lm" endif %: