Add android-qt5-arm64-v8a with OpenSSL support
This commit is contained in:
parent
71e475d8cd
commit
6748926cf7
|
@ -0,0 +1,195 @@
|
|||
# PKGCONFIG for android-qt5
|
||||
# Maintainer: Gonzalo Exequiel Pedone <hipersayan DOT x AT gmail DOT com>
|
||||
# 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>
|
||||
|
||||
# Useful link to keep track of latest API changes:
|
||||
#
|
||||
# https://developer.android.com/ndk/downloads/revision_history
|
||||
|
||||
android_arch=arm64-v8a
|
||||
|
||||
# Minimum Android platform based on:
|
||||
#
|
||||
# https://developer.android.com/about/dashboards/
|
||||
ANDROID_MINIMUM_PLATFORM=21
|
||||
export ANDROID_MINIMUM_PLATFORM
|
||||
|
||||
# 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:
|
||||
_mapboxcfg='QT.global.disabled_features+=geoservices_mapboxgl'
|
||||
|
||||
_pkgname=android-qt5
|
||||
pkgname=${_pkgname}-${android_arch}
|
||||
pkgver=5.11.1
|
||||
pkgrel=1
|
||||
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'
|
||||
'android-openssl-'$android_arch)
|
||||
depends=('java-runtime-headless>=7'
|
||||
'apache-ant'
|
||||
'android-ndk'
|
||||
"android-platform-$ANDROID_MINIMUM_PLATFORM"
|
||||
'android-sdk'
|
||||
'android-sdk-build-tools'
|
||||
'android-sdk-platform-tools')
|
||||
groups=('android-qt5')
|
||||
optdepends=("android-openssl-${android_arch}: OpenSSL support")
|
||||
|
||||
case "$android_arch" in
|
||||
arm*)
|
||||
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
|
||||
|
||||
options=('!strip'
|
||||
'!buildflags'
|
||||
'staticlibs'
|
||||
'!emptydirs')
|
||||
_pkgfqn="qt-everywhere-src-${pkgver}"
|
||||
source=("http://download.qt-project.org/official_releases/qt/${pkgver:0:4}/${pkgver}/single/${_pkgfqn}.tar.xz")
|
||||
md5sums=('c6f0854d7de7bde80cfd8cc85bb7152b')
|
||||
|
||||
prepare() {
|
||||
cd ${_pkgfqn}
|
||||
|
||||
# Platform specific patches.
|
||||
}
|
||||
|
||||
get_last() {
|
||||
ls $1 | sort -V | tail -n 1
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${_pkgfqn}
|
||||
|
||||
unset CC
|
||||
unset CXX
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
unset LDFLAGS
|
||||
unset CHOST
|
||||
unset QMAKESPEC
|
||||
unset QTDIR
|
||||
unset CARCH
|
||||
|
||||
export ANDROID_NDK_ROOT=/opt/android-ndk
|
||||
export ANDROID_SDK_ROOT=/opt/android-sdk
|
||||
export OPENSSL_PREFIX=/opt/android-openssl/${android_arch}
|
||||
|
||||
if [ -z "${ANDROID_BUILD_TOOLS_REVISION}" ]; then
|
||||
export ANDROID_BUILD_TOOLS_REVISION=$(get_last ${ANDROID_SDK_ROOT}/build-tools)
|
||||
fi
|
||||
|
||||
if [ -z "${ANDROID_API_VERSION}" ]; then
|
||||
export ANDROID_API_VERSION=android-$ANDROID_MINIMUM_PLATFORM
|
||||
fi
|
||||
|
||||
export PYTHON=/usr/bin/python2
|
||||
|
||||
if [ -z "${ANDROID_NDK_PLATFORM}" ]; then
|
||||
export ANDROID_NDK_PLATFORM=android-$ANDROID_MINIMUM_PLATFORM
|
||||
fi
|
||||
|
||||
_pref=/opt/${_pkgname}/${pkgver}/${android_arch}
|
||||
|
||||
configue_opts="
|
||||
-confirm-license
|
||||
-opensource
|
||||
-silent
|
||||
-prefix ${_pref}
|
||||
-docdir ${_pref}/doc
|
||||
-xplatform android-g++
|
||||
-nomake tests
|
||||
-nomake examples
|
||||
-android-ndk ${ANDROID_NDK_ROOT}
|
||||
-android-sdk ${ANDROID_SDK_ROOT}
|
||||
-android-ndk-host linux-x86_64
|
||||
-android-toolchain-version 4.9
|
||||
-skip qttranslations
|
||||
-skip qtserialport
|
||||
-no-warnings-are-errors
|
||||
-no-pkg-config
|
||||
-qt-zlib
|
||||
-qt-freetype
|
||||
-openssl-runtime
|
||||
-android-arch ${android_arch}
|
||||
-android-ndk-platform ${ANDROID_NDK_PLATFORM}
|
||||
-I${OPENSSL_PREFIX}/include
|
||||
${_mapboxcfg}"
|
||||
|
||||
# Platform specific patches
|
||||
case "$android_arch" in
|
||||
x86*)
|
||||
configue_opts+="
|
||||
-no-sql-mysql
|
||||
-no-sql-psql"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
./configure ${configue_opts}
|
||||
|
||||
make $MAKEFLAGS
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${_pkgfqn}
|
||||
|
||||
make INSTALL_ROOT=${pkgdir} install
|
||||
|
||||
case "$android_arch" in
|
||||
arm64-v8a)
|
||||
toolchain=aarch64-linux-android-4.9
|
||||
stripFolder=aarch64-linux-android
|
||||
;;
|
||||
armeabi-v7a)
|
||||
toolchain=arm-linux-androideabi-4.9
|
||||
stripFolder=arm-linux-androideabi
|
||||
;;
|
||||
x86)
|
||||
toolchain=x86-4.9
|
||||
stripFolder=i686-linux-android
|
||||
;;
|
||||
x86_64)
|
||||
toolchain=x86_64-4.9
|
||||
stripFolder=x86_64-linux-android
|
||||
;;
|
||||
esac
|
||||
|
||||
export ANDROID_NDK_ROOT=/opt/android-ndk
|
||||
STRIP=${ANDROID_NDK_ROOT}/toolchains/${toolchain}/prebuilt/linux-x86_64/${stripFolder}/bin/strip
|
||||
find ${pkgdir}/opt/${_pkgname}/${pkgver}/${android_arch}/lib -name 'lib*.so' -exec ${STRIP} {} \;
|
||||
find ${pkgdir}/opt/${_pkgname}/${pkgver}/${android_arch}/lib \( -name 'lib*.a' ! -name 'libQt5Bootstrap.a' ! -name 'libQt5QmlDevTools.a' \) -exec ${STRIP} {} \;
|
||||
find ${pkgdir}/opt/${_pkgname}/${pkgver}/${android_arch}/plugins -name 'lib*.so' -exec ${STRIP} {} \;
|
||||
|
||||
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
|
||||
find "${pkgdir}/" -type f -name '*.prl' \
|
||||
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
|
||||
}
|
Loading…
Reference in New Issue