blob: f4c510cb70b4b5549e560487725c4d971407d2c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# 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.
_android_arch=aarch64
pkgname=android-$_android_arch-qt6-declarative
_qtver=6.7.1
pkgver=${_qtver/-/}
pkgrel=1
arch=(any)
url='https://www.qt.io'
license=(GPL3 LGPL3 FDL custom)
pkgdesc='Classes for QML and JavaScript languages (android)'
depends=('android-aarch64-qt6-base')
makedepends=('android-cmake' 'qt6-declarative' 'qt6-shadertools' 'ninja' 'python' 'java-environment-openjdk=17')
optdepends=('qt6-declarative: development tools')
conflicts=('android-aarch64-qt6-quickcontrols2')
provides=('android-aarch64-qt6-quickcontrols2')
replaces=('android-aarch64-qt6-quickcontrols2')
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
groups=(android-${_android_arch}-qt6)
_pkgfqn="qtdeclarative-everywhere-src-${_qtver}"
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
'0001-Exclude-qmltime-when-cross-compiling.patch')
sha256sums=('81135c96ed2f599385b8a68c57f4f438dad193c62f946f5b200a321558fd9f1c'
'26142b67b67945e2259027b496524431f33374414118f113d0eecc0ecbfd99b2')
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() {
export PATH=/usr/lib/jvm/java-17-openjdk/bin:$PATH
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
cmake --build build-$_android_arch
}
package() {
DESTDIR="$pkgdir" cmake --install build-$_android_arch
# 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
install -d "$pkgdir"/usr/share/licenses
ln -s /usr/share/licenses/android-$_android_arch-qt6-base "$pkgdir"/usr/share/licenses/$pkgname
}
|