2021-05-08 20:45:18 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.qt.io/
|
|
|
|
TERMUX_PKG_DESCRIPTION="The Qt Declarative module provides classes for using GUIs created using QML"
|
|
|
|
TERMUX_PKG_LICENSE="LGPL-3.0"
|
|
|
|
TERMUX_PKG_MAINTAINER="Simeon Huang <symeon@librehat.com>"
|
2021-05-26 13:10:10 +02:00
|
|
|
TERMUX_PKG_VERSION=5.12.11
|
2021-06-19 17:37:02 +02:00
|
|
|
TERMUX_PKG_REVISION=1
|
2021-05-08 20:45:18 +02:00
|
|
|
TERMUX_PKG_SRCURL="https://download.qt.io/official_releases/qt/5.12/${TERMUX_PKG_VERSION}/submodules/qtdeclarative-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
|
2021-05-26 13:10:10 +02:00
|
|
|
TERMUX_PKG_SHA256=1267e029abc8424424c419bc1681db069ec76e51270cc220994e0f442c9f78d3
|
2021-05-08 20:45:18 +02:00
|
|
|
TERMUX_PKG_DEPENDS="qt5-qtbase"
|
|
|
|
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools"
|
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
TERMUX_PKG_NO_STATICSPLIT=true
|
|
|
|
|
2021-05-10 14:05:20 +02:00
|
|
|
# Ignore bootstrap changes because of the hijacking
|
2021-05-08 20:45:18 +02:00
|
|
|
TERMUX_PKG_RM_AFTER_INSTALL="
|
2021-05-10 14:05:20 +02:00
|
|
|
opt/qt/cross/lib/libQt5Bootstrap.*
|
2021-05-08 20:45:18 +02:00
|
|
|
"
|
|
|
|
|
|
|
|
# Replacing the old qt5-base packages
|
|
|
|
TERMUX_PKG_REPLACES="qt5-declarative"
|
|
|
|
|
|
|
|
termux_step_pre_configure () {
|
|
|
|
#######################################################
|
|
|
|
##
|
2021-05-10 14:05:20 +02:00
|
|
|
## Hijack the bootstrap library for cross building
|
2021-05-08 20:45:18 +02:00
|
|
|
##
|
|
|
|
#######################################################
|
|
|
|
for i in a prl; do
|
|
|
|
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}" \
|
|
|
|
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak"
|
|
|
|
ln -s -f "${TERMUX_PREFIX}/lib/libQt5Bootstrap.${i}" \
|
|
|
|
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
|
|
|
|
done
|
|
|
|
unset i
|
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_configure () {
|
|
|
|
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
|
|
|
|
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
|
|
|
|
}
|
|
|
|
|
2021-05-10 14:05:20 +02:00
|
|
|
termux_step_post_make_install () {
|
|
|
|
#######################################################
|
|
|
|
##
|
|
|
|
## Compiling necessary binaries for target.
|
|
|
|
##
|
|
|
|
#######################################################
|
|
|
|
|
|
|
|
## Qt Declarative utilities.
|
|
|
|
for i in qmlcachegen qmlimportscanner qmllint qmlmin; do
|
|
|
|
cd "${TERMUX_PKG_SRCDIR}/tools/${i}" && {
|
|
|
|
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
|
|
|
|
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
|
2021-05-08 20:45:18 +02:00
|
|
|
|
2021-05-10 14:05:20 +02:00
|
|
|
make -j "${TERMUX_MAKE_PROCESSES}"
|
|
|
|
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
|
|
|
|
}
|
|
|
|
done
|
|
|
|
|
|
|
|
# Install the QmlDevTools for target (needed by some packages such as qttools)
|
|
|
|
install -Dm644 ${TERMUX_PKG_SRCDIR}/lib/libQt5QmlDevTools.a "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.a"
|
|
|
|
install -Dm644 ${TERMUX_PKG_SRCDIR}/lib/libQt5QmlDevTools.prl "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.prl"
|
2021-05-12 13:53:41 +02:00
|
|
|
sed -i 's|/opt/qt/cross/|/|g' "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.prl"
|
2021-05-08 20:45:18 +02:00
|
|
|
|
|
|
|
#######################################################
|
|
|
|
##
|
2021-05-10 14:05:20 +02:00
|
|
|
## Restore the bootstrap library
|
|
|
|
##
|
|
|
|
#######################################################
|
|
|
|
for i in a prl; do
|
|
|
|
rm -f "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
|
|
|
|
cp -p "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak" \
|
|
|
|
"${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}"
|
|
|
|
rm -f "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5Bootstrap.${i}.bak"
|
|
|
|
done
|
|
|
|
unset i
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
##
|
|
|
|
## Compiling necessary binaries for the host
|
2021-05-08 20:45:18 +02:00
|
|
|
##
|
|
|
|
#######################################################
|
|
|
|
|
|
|
|
## libQt5QmlDevTools.a (qt5-declarative)
|
|
|
|
cd "${TERMUX_PKG_SRCDIR}/src/qmldevtools" && {
|
|
|
|
make clean
|
|
|
|
|
|
|
|
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
|
2021-05-10 14:05:20 +02:00
|
|
|
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
|
2021-05-08 20:45:18 +02:00
|
|
|
|
|
|
|
make -j "${TERMUX_MAKE_PROCESSES}"
|
2021-05-10 14:05:20 +02:00
|
|
|
install -Dm644 ../../lib/libQt5QmlDevTools.a "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.a"
|
|
|
|
install -Dm644 ../../lib/libQt5QmlDevTools.prl "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.prl"
|
2021-05-08 20:45:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
## Qt Declarative utilities.
|
|
|
|
for i in qmlcachegen qmlimportscanner qmllint qmlmin; do
|
|
|
|
cd "${TERMUX_PKG_SRCDIR}/tools/${i}" && {
|
|
|
|
make clean
|
|
|
|
|
|
|
|
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
|
2021-05-10 14:05:20 +02:00
|
|
|
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-host"
|
2021-05-08 20:45:18 +02:00
|
|
|
|
|
|
|
make -j "${TERMUX_MAKE_PROCESSES}"
|
2021-05-10 14:05:20 +02:00
|
|
|
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/opt/qt/cross/bin/${i}"
|
2021-05-08 20:45:18 +02:00
|
|
|
}
|
|
|
|
done
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
##
|
|
|
|
## Fixes & cleanup.
|
|
|
|
##
|
|
|
|
#######################################################
|
|
|
|
|
|
|
|
# Limit the scope, otherwise it'll touch qtbase files
|
|
|
|
for pref in Qml Quick Packet; do
|
|
|
|
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
|
|
|
|
find "${TERMUX_PREFIX}/lib" -type f -name "libQt5${pref}*.prl" \
|
|
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
|
|
|
|
done
|
|
|
|
unset pref
|
2021-05-12 13:53:41 +02:00
|
|
|
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "${TERMUX_PREFIX}/opt/qt/cross/lib/libQt5QmlDevTools.prl"
|
2021-05-08 20:45:18 +02:00
|
|
|
|
|
|
|
## Remove *.la files.
|
|
|
|
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
|
2021-05-10 14:05:20 +02:00
|
|
|
find "${TERMUX_PREFIX}/opt/qt/cross/lib" -iname \*.la -delete
|
2021-05-08 20:45:18 +02:00
|
|
|
}
|
|
|
|
|
2021-05-12 15:36:10 +02:00
|
|
|
termux_step_create_debscripts() {
|
|
|
|
# Some clean-up is happening via `postinst`
|
|
|
|
# Because we're using this package in both host (Ubuntu glibc) and device (Termux)
|
|
|
|
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
|
2021-05-12 13:53:41 +02:00
|
|
|
}
|