build-style qmake: detect qmake w/o qtchooser
Instead of relying on qtchooser to provide the link to the qmake binary for Qt4 or Qt5 test for either version and use that. Sometimes qtchooser can fail if e.g. a package was built with Qt4 and after that another package with Qt5 without zapping the masterdir.
This commit is contained in:
parent
37e61563d3
commit
ecf16a91da
1 changed files with 13 additions and 1 deletions
|
@ -2,7 +2,19 @@
|
|||
# This helper is for templates using Qt4/Qt5 qmake.
|
||||
#
|
||||
do_configure() {
|
||||
qmake ${configure_args} \
|
||||
local qmake
|
||||
if [ -x "/usr/lib/qt5/bin/qmake" ]; then
|
||||
# Qt5 qmake
|
||||
qmake="/usr/lib/qt5/bin/qmake"
|
||||
fi
|
||||
if [ -x "/usr/lib/qt/bin/qmake" ]; then
|
||||
# Qt4 qmake
|
||||
qmake="/usr/lib/qt/bin/qmake"
|
||||
fi
|
||||
if [ -z "${qmake}" ]; then
|
||||
msg_error "${pkgver}: Could not find qmake - missing in hostdepends?\n"
|
||||
fi
|
||||
${qmake} ${configure_args} \
|
||||
PREFIX=/usr \
|
||||
LIB=/usr/lib \
|
||||
QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX \
|
||||
|
|
Loading…
Reference in a new issue