2018-07-11 10:58:40 +02:00
|
|
|
# PKGCONFIG for android-qt5
|
2018-11-24 02:41:08 +01:00
|
|
|
# Maintainer in the AUR: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
|
2018-07-11 10:58:40 +02:00
|
|
|
# Contributor: Jiaxi Hu <sftrytry _AT_ gmail _DOT_ com>
|
|
|
|
# Contributor: jimmy00784 <jimmy00784@gmail.com>
|
|
|
|
# Contributor: Ricardo (XenGi) Band <email@ricardo.band>
|
|
|
|
# Contributor: Martchus <martchus@gmx.net>
|
|
|
|
|
2018-11-24 02:41:08 +01:00
|
|
|
_pkg_arch=aarch64
|
2018-12-29 20:08:48 +01:00
|
|
|
_android_arch=arm64-v8a
|
2020-12-05 21:42:56 +01:00
|
|
|
_android_platform=22
|
2018-07-11 10:58:40 +02:00
|
|
|
|
2018-11-24 02:41:08 +01:00
|
|
|
pkgname=android-$_pkg_arch-qt5
|
2020-12-05 21:42:56 +01:00
|
|
|
pkgver=5.13.1
|
2019-09-06 23:45:08 +02:00
|
|
|
pkgrel=1
|
2018-07-11 10:58:40 +02:00
|
|
|
pkgdesc="Qt 5 for Android"
|
|
|
|
arch=('x86_64')
|
|
|
|
url='https://www.qt.io'
|
|
|
|
license=('GPL3' 'LGPL')
|
|
|
|
makedepends=('libgl'
|
|
|
|
'sqlite'
|
|
|
|
'zlib'
|
|
|
|
'python2'
|
|
|
|
'python' # Qt Qml requires Python 3
|
|
|
|
'ruby'
|
|
|
|
'gperf'
|
|
|
|
'libxslt'
|
|
|
|
'fontconfig'
|
2019-04-05 17:30:10 +02:00
|
|
|
'java-environment-openjdk<=8'
|
2019-07-23 17:54:38 +02:00
|
|
|
'android-environment'
|
2020-12-05 21:42:56 +01:00
|
|
|
'android-pkg-config'
|
|
|
|
"android-$_pkg_arch-openssl")
|
2019-03-16 16:58:50 +01:00
|
|
|
depends=('java-runtime-headless-openjdk<=8'
|
2018-07-11 10:58:40 +02:00
|
|
|
'apache-ant'
|
|
|
|
'android-ndk'
|
2020-12-05 21:42:56 +01:00
|
|
|
"android-platform-$_android_platform"
|
2018-07-11 10:58:40 +02:00
|
|
|
'android-sdk'
|
|
|
|
'android-sdk-build-tools'
|
2019-09-06 23:45:08 +02:00
|
|
|
'android-sdk-platform-tools'
|
2020-12-05 21:42:56 +01:00
|
|
|
"android-$_pkg_arch-zlib"
|
2019-09-06 23:45:08 +02:00
|
|
|
"android-$_pkg_arch-libpng"
|
2020-12-05 21:42:56 +01:00
|
|
|
"android-$_pkg_arch-libjpeg-turbo")
|
2018-07-11 10:58:40 +02:00
|
|
|
groups=('android-qt5')
|
2018-12-08 22:06:32 +01:00
|
|
|
conflicts=("android-qt5-${_android_arch}")
|
|
|
|
replaces=("android-qt5-${_android_arch}")
|
2018-11-24 02:41:08 +01:00
|
|
|
|
|
|
|
case "$_pkg_arch" in
|
|
|
|
aarch64)
|
|
|
|
optdepends=('android-google-apis-aarch64: AVD support'
|
|
|
|
'android-aarch64-system-image: AVD support')
|
|
|
|
;;
|
|
|
|
armv7a-eabi)
|
|
|
|
optdepends=('android-google-apis-armv7a-eabi: AVD support'
|
|
|
|
'android-armv7a-eabi-system-image: AVD support')
|
|
|
|
;;
|
|
|
|
x86)
|
|
|
|
optdepends=('android-google-apis-x86: AVD support'
|
|
|
|
'android-x86-system-image: AVD support')
|
|
|
|
;;
|
|
|
|
x86-64)
|
|
|
|
optdepends=('android-google-apis-x86-64: AVD support'
|
|
|
|
'android-x86-64-system-image: AVD support')
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
optdepends+=("android-$_pkg_arch-openssl: SSL support for Qt Network")
|
2018-07-11 10:58:40 +02:00
|
|
|
|
2019-04-05 17:30:10 +02:00
|
|
|
options=(!strip !buildflags staticlibs !emptydirs)
|
2018-07-11 10:58:40 +02:00
|
|
|
_pkgfqn="qt-everywhere-src-${pkgver}"
|
2018-10-07 22:26:11 +02:00
|
|
|
source=("http://download.qt-project.org/official_releases/qt/${pkgver:0:4}/${pkgver}/single/${_pkgfqn}.tar.xz"
|
2020-12-05 21:42:56 +01:00
|
|
|
'0001-Fix-clang-libc-build-under-Android.patch'
|
|
|
|
'0002-Fix-androiddeployqt-search-paths.patch'
|
|
|
|
'0003-Support-pkg-config-under-Android.patch'
|
|
|
|
'0004-Use-pkg-config-to-find-libjpeg.patch'
|
|
|
|
'0001-Disable-mapboxgl.patch')
|
|
|
|
sha256sums=('adf00266dc38352a166a9739f1a24a1e36f1be9c04bf72e16e142a256436974e'
|
|
|
|
'29bcb93f9c79ad4b0709efa42694ed917b6e4cfce69a805e79a7dc3144be7765'
|
|
|
|
'7a5520311ba2edee2ffcd546cd6e08248c8f73deed33bd8075649577f8cb1446'
|
|
|
|
'5c3f0725f3c27263661ff5ebb4b279e4483de8ed70dee4fe42a84d31b3f2e4a9'
|
|
|
|
'4f3ba22616040a2979bfdf840b44bf105374ea2fac866c42977ad7ec6e87ddcc'
|
|
|
|
'6151b784050f9d4ef3eec22dd33360d3f566d4834592f1171df91a10c95fab77')
|
2018-07-11 10:58:40 +02:00
|
|
|
|
|
|
|
prepare() {
|
2020-12-05 21:42:56 +01:00
|
|
|
export ANDROID_MINIMUM_PLATFORM=${_android_platform}
|
2019-07-23 17:54:38 +02:00
|
|
|
source android-env ${_pkg_arch}
|
2019-04-05 17:30:10 +02:00
|
|
|
|
2019-04-21 22:37:50 +02:00
|
|
|
cd ${_pkgfqn}
|
|
|
|
|
2018-12-08 22:06:32 +01:00
|
|
|
pushd qtbase
|
2020-12-05 21:42:56 +01:00
|
|
|
patch -Np1 -i "../../0001-Fix-clang-libc-build-under-Android.patch"
|
|
|
|
#patch -Np1 -i "../../0002-Fix-androiddeployqt-search-paths.patch"
|
|
|
|
patch -Np1 -i "../../0003-Support-pkg-config-under-Android.patch"
|
|
|
|
patch -Np1 -i "../../0004-Use-pkg-config-to-find-libjpeg.patch"
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd qtlocation
|
|
|
|
# skip building mapboxgl as it increases compile time significantly and
|
|
|
|
# likely not a lot of people actually using it; if you need it, just remove the
|
|
|
|
# following line:
|
|
|
|
patch -Np1 -i "../../0001-Disable-mapboxgl.patch"
|
2018-12-08 22:06:32 +01:00
|
|
|
popd
|
2018-11-30 12:54:18 +01:00
|
|
|
|
2020-12-05 21:42:56 +01:00
|
|
|
sed -i "s/android-16/android-$ANDROID_MINIMUM_PLATFORM/g" qtbase/mkspecs/features/android/sdk.prf
|
|
|
|
sed -i "s/android-16/android-$ANDROID_MINIMUM_PLATFORM/g" qtbase/src/android/jar/jar.pro
|
|
|
|
sed -i "s/android-16/android-$ANDROID_MINIMUM_PLATFORM/g" qtgamepad/src/plugins/gamepads/android/jar/jar.pro
|
|
|
|
sed -i "s/android-16/android-$ANDROID_MINIMUM_PLATFORM/g" qtbase/configure.pri
|
2018-07-11 10:58:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2020-12-05 21:42:56 +01:00
|
|
|
export ANDROID_MINIMUM_PLATFORM=${_android_platform}
|
2019-07-23 17:54:38 +02:00
|
|
|
source android-env ${_pkg_arch}
|
2018-07-11 10:58:40 +02:00
|
|
|
|
2018-10-07 22:26:11 +02:00
|
|
|
unset CC CXX CFLAGS CXXFLAGS LDFLAGS CHOST QMAKESPEC QTDIR CARCH
|
2018-07-11 10:58:40 +02:00
|
|
|
|
2019-04-05 17:30:10 +02:00
|
|
|
export PKG_CONFIG=$ANDROID_PKGCONFIG
|
2018-07-11 10:58:40 +02:00
|
|
|
export PYTHON=/usr/bin/python2
|
|
|
|
|
2019-04-21 22:37:50 +02:00
|
|
|
cd ${_pkgfqn}
|
2019-04-05 17:30:10 +02:00
|
|
|
|
2018-07-11 10:58:40 +02:00
|
|
|
configue_opts="
|
|
|
|
-confirm-license
|
|
|
|
-opensource
|
2019-09-06 23:45:08 +02:00
|
|
|
-prefix ${ANDROID_PREFIX}
|
|
|
|
-examplesdir ${ANDROID_PREFIX_SHARE}/qt5/examples
|
|
|
|
-testsdir ${ANDROID_PREFIX_SHARE}/qt5/tests
|
2018-10-07 22:26:11 +02:00
|
|
|
-xplatform android-clang
|
2018-07-11 10:58:40 +02:00
|
|
|
-nomake tests
|
|
|
|
-nomake examples
|
2020-09-16 18:35:50 +02:00
|
|
|
-android-ndk ${ANDROID_NDK_HOME}
|
2020-12-05 21:42:56 +01:00
|
|
|
-android-sdk ${ANDROID_HOME}
|
2018-07-11 10:58:40 +02:00
|
|
|
-android-ndk-host linux-x86_64
|
2020-12-05 21:42:56 +01:00
|
|
|
-android-toolchain-version 4.9
|
2018-07-11 10:58:40 +02:00
|
|
|
-skip qtserialport
|
|
|
|
-no-warnings-are-errors
|
2019-09-06 23:45:08 +02:00
|
|
|
-pkg-config
|
|
|
|
-system-zlib
|
|
|
|
-system-libpng
|
|
|
|
-system-libjpeg
|
2018-07-11 10:58:40 +02:00
|
|
|
-qt-freetype
|
|
|
|
-openssl-runtime
|
2020-12-05 21:42:56 +01:00
|
|
|
-android-arch ${ANDROID_ABI}
|
|
|
|
-android-ndk-platform ${ANDROID_NDK_PLATFORM}
|
|
|
|
-recheck-all
|
2019-09-06 23:45:08 +02:00
|
|
|
-optimized-qmake
|
|
|
|
-I${ANDROID_PREFIX}/include"
|
2018-11-24 02:41:08 +01:00
|
|
|
|
|
|
|
[[ $ANDROID_DEBUG_BUILD ]] \
|
|
|
|
&& configue_opts+=' -debug-and-release' \
|
|
|
|
|| configue_opts+=' -release'
|
2018-07-11 10:58:40 +02:00
|
|
|
|
2018-10-07 22:26:11 +02:00
|
|
|
# add architecture specific options
|
2018-11-24 02:41:08 +01:00
|
|
|
case "$_pkg_arch" in
|
2018-07-11 10:58:40 +02:00
|
|
|
x86*)
|
|
|
|
configue_opts+="
|
|
|
|
-no-sql-mysql
|
|
|
|
-no-sql-psql"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
./configure ${configue_opts}
|
|
|
|
|
|
|
|
make $MAKEFLAGS
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2020-12-05 21:42:56 +01:00
|
|
|
export ANDROID_MINIMUM_PLATFORM=${_android_platform}
|
2019-07-23 17:54:38 +02:00
|
|
|
source android-env ${_pkg_arch}
|
2019-04-05 17:30:10 +02:00
|
|
|
|
2019-04-21 22:37:50 +02:00
|
|
|
cd ${_pkgfqn}
|
2018-07-11 10:58:40 +02:00
|
|
|
|
2019-04-05 17:30:10 +02:00
|
|
|
make INSTALL_ROOT=${pkgdir} install
|
2019-04-21 22:37:50 +02:00
|
|
|
|
2019-09-06 23:45:08 +02:00
|
|
|
find ${pkgdir}/${ANDROID_PREFIX_BIN} -type f ! -name '*.pl' -exec strip {} \;
|
|
|
|
find ${pkgdir}/${ANDROID_PREFIX_LIB} -type f -name 'lib*.so' -exec ${ANDROID_STRIP} {} \;
|
|
|
|
find ${pkgdir}/${ANDROID_PREFIX_LIB} -type f \( -name 'lib*.a' ! -name 'libQt5Bootstrap.a' ! -name 'libQt5QmlDevTools.a' \) -exec ${ANDROID_STRIP} {} \;
|
|
|
|
find ${pkgdir}/${ANDROID_PREFIX}/plugins -type f -name 'lib*.so' -exec ${ANDROID_STRIP} {} \;
|
|
|
|
find ${pkgdir}/${ANDROID_PREFIX}/qml -type f -name 'lib*.so' -exec ${ANDROID_STRIP} {} \;
|
2018-11-30 12:54:18 +01:00
|
|
|
|
|
|
|
# fix plugin path in Android-specific dependency file
|
2019-09-06 23:45:08 +02:00
|
|
|
sed -i 's/\"plugins\//\"lib\/qt\/plugins\//g' ${pkgdir}/${ANDROID_PREFIX_LIB}/*-android-dependencies.xml
|
2018-07-11 10:58:40 +02:00
|
|
|
|
2018-10-07 22:26:11 +02:00
|
|
|
# drop QMAKE_PRL_BUILD_DIR because reference the build dir
|
2018-07-11 10:58:40 +02:00
|
|
|
find "${pkgdir}/" -type f -name '*.prl' \
|
|
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
|
|
|
|
}
|