blob: 3f0996c71e38375f348213a2a42a49b8c6bb08bb (
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
#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>
android_arch=armeabi-v7a
_pkgname=android-qt5
pkgname=${_pkgname}-${android_arch}
_pkgver=5.6
pkgver=${_pkgver}.0
pkgrel=2
pkgdesc="Qt 5 for Android"
arch=('i686' 'x86_64')
url='https://www.qt.io'
license=('GPL3' 'LGPL')
makedepends=('libgl'
'sqlite'
'zlib'
'python2'
'ruby'
'gperf'
'libxslt'
'fontconfig')
depends=('java-runtime-headless>=7'
'apache-ant'
'android-ndk'
'android-platform'
'android-sdk'
'android-sdk-build-tools'
'android-sdk-platform-tools')
groups=('android-qt5')
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
_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
source=("http://download.qt-project.org/official_releases/qt/${_pkgver}/${pkgver}/single/${_pkgfqn}.tar.xz"
"Misc.cpp.patch"
"JavaScriptCore.pri.patch"
"imageformats.pro.patch"
"src.pro.patch")
sha256sums=('76a95cf6c1503290f75a641aa25079cd0c5a8fcd7cff07ddebff80a955b07de7'
'096eef8234f0ea964ac20ca887c8da2e7b5b836de417515acde103c2a27a04de'
'133dad6c8d0bedaa5d561be26b2f7185e671900c50d11476ecb2e2ef6792d455'
'943e8c03dc2218250f75cec3b663d90e6bb98d9b64b9f12b01713c284e5e4673'
'1e0bda5274a17a0aea431e53adf737beab8552b7a0ff70d478ba07004ffbdcf8')
prepare() {
cd ${_pkgfqn}
# Disable qtplugininfo build.
patch -Np1 -i "../src.pro.patch"
# Fix problem with time.h.
patch -Np1 -i "../Misc.cpp.patch"
# Platform specific patches.
case "$android_arch" in
arm64-v8a)
# Disable WebP image format.
patch -Np1 -i "../imageformats.pro.patch"
;;
armeabi)
# Disable JIT.
patch -Np1 -i "../JavaScriptCore.pri.patch"
;;
*)
;;
esac
}
build() {
cd ${_pkgfqn}
unset CC
unset CXX
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
unset CHOST
unset QMAKESPEC
unset QTDIR
if [ "${CARCH}" == 'i686' ]; then
ndkhost='linux-x86'
elif [ "${CARCH}" == 'x86_64' ]; then
ndkhost='linux-x86_64'
fi
unset CARCH
export ANDROID_NDK_ROOT=/opt/android-ndk
export ANDROID_SDK_ROOT=/opt/android-sdk
export ANDROID_BUILD_TOOLS_REVISION=$(ls ${ANDROID_SDK_ROOT}/build-tools)
export ANDROID_API_VERSION=$(ls ${ANDROID_SDK_ROOT}/platforms)
export PYTHON=/usr/bin/python2
ndkPlatform=$(ls ${ANDROID_NDK_ROOT}/platforms | sort -V | tail -n 1)
_pref=/opt/${_pkgname}/${pkgver}/${android_arch}
configue_opts="
-confirm-license
-opensource
-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 ${ndkhost}
-android-toolchain-version 4.9
-skip qttranslations
-skip qtserialport
-no-warnings-are-errors
-no-pkg-config
-qt-zlib
-qt-freetype
-android-arch ${android_arch}
-android-ndk-platform ${ndkPlatform}"
# Platform specific patches
case "$android_arch" in
mips)
configue_opts+="
-skip qt3d"
;;
*)
;;
esac
./configure ${configue_opts}
make || return 1
}
package() {
cd ${_pkgfqn}
make INSTALL_ROOT=${pkgdir} install
}
|