Skip to content

Instantly share code, notes, and snippets.

@tklam
Created July 27, 2015 13:09
Show Gist options
  • Save tklam/321e7a66cc6cae4681b2 to your computer and use it in GitHub Desktop.
Save tklam/321e7a66cc6cae4681b2 to your computer and use it in GitHub Desktop.
PKGBUILD for android-qt5 (Qt 5.4.2) on ArchLinux i686 (https://aur.archlinux.org/packages/android-qt5/)
#PKGCONFIG for android-qt5 for qt 5.3
# Maintainer: Jiaxi Hu <sftrytry _AT_ gmail _DOT_ com>
# Contributor: jimmy00784 <[email protected]>
# Contributor: Ricardo (XenGi) Band <[email protected]>
pkgname='android-qt5'
pkgver=5.4.2
_pkgver=5.4
pkgrel=1
pkgdesc="Qt 5 for Android"
arch=('i686')
url='http://qt-project.org'
license=('GPL3' 'LGPL')
makedepends=('git' 'libgl' 'sqlite' 'zlib' 'python2' 'ruby' 'gperf' 'libxslt' 'fontconfig'
'android-platform-10' 'android-platform-11' 'android-platform-16' 'android-platform-18')
depends=('android-sdk' 'android-sdk-platform-tools' 'android-sdk-build-tools' 'android-ndk'
'java-runtime-headless>=7' 'apache-ant' 'android-platform-22')
# Android API level 11 is required to build QtMultimedia
# Android API level 18 is required to build QtBluetooth (from Qt 5.5 onwards)
# Android API level 11 and 16 are required for QtBase
# You can build Qt applications against any API level you wish, As long as it is equal to or higher
# than 13.
groups=('qt-android' 'qt5-android')
conflicts=('qt-android')
options=('!libtool' '!strip')
optdepends=('qtcreator: Qt IDE with support for Android')
_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
source=("http://download.qt-project.org/official_releases/qt/${_pkgver}/${pkgver}/single/${_pkgfqn}.tar.xz")
#source=("http://anychimirror101.mirrors.tds.net/pub/Qt/archive/qt/5.4/5.4.2/single/qt-everywhere-opensource-src-5.4.2.tar.gz")
sha256sums=('cfc768c55f0a0cd232bed914a9022528f8f2e50cb010bf0e4f3f62db3dfa17bd')
build() {
cd ${_pkgfqn}
unset CC
unset CXX
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
unset CARCH
unset CHOST
unset QMAKESPEC
unset QTDIR
#5.2 seems to enable neon by default for optimization of latest devices.
#If you want to use your old ones, like my xoom. You can disable it with
#-no-neon and recompile it.
#export ANDROID_BUILD_TOOLS_REVISION=19
./configure -confirm-license -opensource \
-prefix /opt/android-qt5/${pkgver} \
-docdir /usr/share/doc/android-qt5-${_pkgver} \
-xplatform android-g++ \
-nomake tests \
-nomake examples \
-android-ndk /opt/android-ndk32 \
-android-sdk /opt/android-sdk \
-android-toolchain-version 4.8 \
-android-ndk-host linux-x86 \
-android-arch armeabi-v7a \
-android-ndk-platform android-19 \
-no-pkg-config \
-skip qttranslations \
-skip qtwebkit \
-skip qtserialport \
-skip qtwebkit-examples \
-no-warnings-are-errors
make || return 1
}
package() {
cd ${_pkgfqn}
make INSTALL_ROOT=${pkgdir} install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment