2015-08-20 21:29:37 +02:00
|
|
|
#
|
|
|
|
# This helper is for templates using Qt4/Qt5 qmake.
|
|
|
|
#
|
|
|
|
do_configure() {
|
2017-03-21 19:35:01 +01:00
|
|
|
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} \
|
2015-08-23 17:45:45 +02:00
|
|
|
PREFIX=/usr \
|
|
|
|
LIB=/usr/lib \
|
2017-03-07 02:03:35 +01:00
|
|
|
QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX \
|
2015-08-23 17:45:45 +02:00
|
|
|
QMAKE_CFLAGS="${CFLAGS}" \
|
|
|
|
QMAKE_CXXFLAGS="${CXXFLAGS}" \
|
|
|
|
QMAKE_LFLAGS="${LDFLAGS}"
|
2015-08-20 21:29:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
: ${make_cmd:=make}
|
|
|
|
|
2016-10-05 14:03:16 +02:00
|
|
|
${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} \
|
|
|
|
CC="$CC" CXX="$CXX" LINK="$CXX"
|
2015-08-20 21:29:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
: ${make_cmd:=make}
|
|
|
|
: ${make_install_target:=install}
|
|
|
|
|
|
|
|
${make_cmd} STRIP=true PREFIX=/usr DESTDIR=${DESTDIR} \
|
2015-08-22 19:32:38 +02:00
|
|
|
INSTALL_ROOT=${DESTDIR} ${make_install_args} ${make_install_target}
|
2015-08-20 21:29:37 +02:00
|
|
|
}
|