107 lines
4.9 KiB
Bash
107 lines
4.9 KiB
Bash
# Maintainer: Martchus <martchus@gmx.net>
|
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
# you also find the URL of a binary repository.
|
|
|
|
# This file is created from PKGBUILD.sh.ep contained by the mentioned repository.
|
|
# Do not edit it manually! See README.md in the repository's root directory
|
|
# for more information.
|
|
|
|
# All patches are managed at https://github.com/Martchus/qtbase
|
|
|
|
_android_arch=aarch64
|
|
pkgname=android-aarch64-qt6-base
|
|
_qtver=6.4.3
|
|
pkgver=${_qtver/-/}
|
|
pkgrel=1
|
|
arch=(any)
|
|
url='https://www.qt.io'
|
|
license=(GPL3 LGPL3 FDL custom)
|
|
pkgdesc='A cross-platform application and UI framework (android)'
|
|
depends=('java-runtime-headless-openjdk>=11' 'ant' 'android-ndk' 'android-sdk' 'android-sdk-build-tools'
|
|
'android-sdk-platform-tools' 'android-platform' "android-${_android_arch}-libjpeg-turbo"
|
|
"android-${_android_arch}-libpng" "android-${_android_arch}-openssl" "android-${_android_arch}-zlib")
|
|
makedepends=('android-cmake' 'android-pkg-config'
|
|
'java-environment-openjdk>=11' 'qt6-base' 'ninja')
|
|
optdepends=('qt6-base: development tools')
|
|
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
|
|
groups=(android-${_android_arch}-qt6)
|
|
_pkgfqn="qtbase-everywhere-src-${_qtver}"
|
|
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
|
|
'0001-Use-CMake-s-default-import-library-suffix.patch'
|
|
'0002-Fix-finding-D-Bus.patch'
|
|
'0003-Fix-using-static-PCRE2-and-DBus-1.patch'
|
|
'0004-Fix-transitive-dependencies-of-static-libraries.patch'
|
|
'0005-Fix-libjpeg-workaround-for-conflict-with-rpcndr.h.patch'
|
|
'0006-Support-finding-static-MariaDB-client-library.patch'
|
|
'0007-Allow-overriding-CMAKE_FIND_LIBRARY_SUFFIXES-to-pref.patch'
|
|
'0008-Fix-crashes-in-rasterization-code-using-setjmp.patch'
|
|
'0009-Find-fontconfig-via-pkg-config-for-correct-handling-.patch'
|
|
'0010-Fix-dependency-of-xcb-image-on-xcb-util.patch'
|
|
'0011-Allow-using-properties-of-PkgConfig-targets-for-glib.patch'
|
|
'0012-Allow-using-properties-of-PkgConfig-targets-for-Wayl.patch')
|
|
sha256sums=('5087c9e5b0165e7bc3c1a4ab176b35d0cd8f52636aea903fa377bdba00891a60'
|
|
'90910e209a4ee9e5ce7a8e6352bd3d53197a8d11a6f6385b2cbc1be2732c10b0'
|
|
'12089a41e68e5708707301dac514e69578791c57926f79903b6011ddfedaf3b3'
|
|
'a6aa4d12dd99c1cfa4dc53f6f8d348e3f0a9f5a4f56ef55934d93763540af1b0'
|
|
'e9ba0c08d4ba390d501f7b0973c59effe71902d6fb577db2b1eda070e50036c0'
|
|
'6dcdb034cebe1c3db9e3c26e3eb3ed5cd73b2f32b2a69ec65b2d490ebc28eadb'
|
|
'35e3e9f71af5bff857f4d8fec2f7805b5e74e998212f9e0468713fb79b5bc28b'
|
|
'a023ba4db23599ef8141da35e576c169fd2d98266b3c33af0b555da971299b51'
|
|
'6b417acac9059b5b2da850a3da48432526ac3f95fa6b713a6cad9ad1cc9c2c2e'
|
|
'58fdfd58b66a4ee2c968b7190c47b058b576c374483f3860e59e44f5856e6fe0'
|
|
'47434e7a794ac04e689658458331abdb839abb0407577d9edf50272fe864d329'
|
|
'0fbc4aee0aaf9fbb34f1b9ffaf82b1ceeb07d1d0bd25f3a2a441a13b06d650ac'
|
|
'a98277ea7bfa934ae9f3378125dc5b6d9849dfe861da787f760e89208f99c763')
|
|
|
|
prepare () {
|
|
cd $_pkgfqn
|
|
|
|
# apply patches; further descriptions can be found in patch files itself
|
|
for patch in "$srcdir/"*.patch; do
|
|
msg2 "Applying patch $patch"
|
|
patch -p1 -i "$patch"
|
|
done
|
|
}
|
|
|
|
build() {
|
|
source android-env ${_android_arch}
|
|
android-${_android_arch}-cmake -G Ninja -B build-$_android_arch -S $_pkgfqn \
|
|
-DCMAKE_FIND_ROOT_PATH="${ANDROID_PREFIX}" \
|
|
-DQT_BINARY_DIR=${ANDROID_PREFIX_BIN} \
|
|
-DQT_INCLUDE_DIRS_NO_SYSTEM=ON \
|
|
-DQT_HOST_PATH=/usr \
|
|
-DANDROID_SDK_ROOT=${ANDROID_HOME} \
|
|
-DANDROID_NDK_ROOT=${ANDROID_NDK_HOME} \
|
|
-DANDROID_STL="c++_shared" \
|
|
-DFEATURE_pkg_config=ON \
|
|
-DFEATURE_system_pcre2=OFF \
|
|
-DFEATURE_system_freetype=OFF \
|
|
-DFEATURE_system_harfbuzz=OFF \
|
|
-DFEATURE_system_sqlite=OFF \
|
|
-DFEATURE_system_libjpeg=ON \
|
|
-DFEATURE_system_libpng=ON \
|
|
-DFEATURE_system_zlib=ON \
|
|
-DINSTALL_DOCDIR=share/doc/qt6 \
|
|
-DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
|
|
-DINPUT_openssl=runtime
|
|
VERBOSE=1 cmake --build build-$_android_arch
|
|
|
|
# note: Avoid using `-DINSTALL_` options like in the regular package to avoid any problems with androiddeployqt.
|
|
}
|
|
|
|
package() {
|
|
source android-env ${_android_arch}
|
|
DESTDIR="$pkgdir" cmake --install build-$_android_arch
|
|
|
|
install -Dm644 $_pkgfqn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
|
|
find "$pkgdir/${ANDROID_PREFIX}/" -type f -name '*.prl' \
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
|
|
|
|
find ${pkgdir}/${ANDROID_PREFIX} -type f -name 'lib*.so' -exec ${ANDROID_STRIP} -g --strip-unneeded {} \;
|
|
find ${pkgdir}/${ANDROID_PREFIX} -type f -name 'lib*.a' -exec ${ANDROID_STRIP} -g {} \;
|
|
[[ -d "${pkgdir}/${ANDROID_PREFIX}/share/doc" ]] && rm -r "${pkgdir}/${ANDROID_PREFIX}/share/doc" || true
|
|
}
|