summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Exequiel Pedone2018-11-22 16:14:53 -0300
committerGonzalo Exequiel Pedone2018-11-22 16:14:53 -0300
commitadd7ce37eeba003556d9dae19df77945971e3ab9 (patch)
treeda19d861c124cb194bebccd2c2690efde8406724
downloadaur-add7ce37eeba003556d9dae19df77945971e3ab9.tar.gz
Changed package name format and architecture names.
-rw-r--r--.SRCINFO41
-rw-r--r--.gitignore5
-rw-r--r--0001-Fix-clang-build.patch23
-rw-r--r--0002-Disable-mapbox.patch15
-rw-r--r--PKGBUILD217
5 files changed, 301 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3c087a8aa074
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,41 @@
+# Generated by mksrcinfo v8
+# jue nov 22 19:10:34 UTC 2018
+pkgbase = android-armv7a-eabi-qt5
+ pkgdesc = Qt 5 for Android
+ pkgver = 5.11.2
+ pkgrel = 1
+ url = https://www.qt.io
+ arch = x86_64
+ groups = android-qt5
+ license = GPL3
+ license = LGPL
+ makedepends = libgl
+ makedepends = sqlite
+ makedepends = zlib
+ makedepends = python2
+ makedepends = ruby
+ makedepends = gperf
+ makedepends = libxslt
+ makedepends = fontconfig
+ depends = java-runtime-headless>=7
+ depends = apache-ant
+ depends = android-ndk
+ depends = android-platform-22
+ depends = android-sdk
+ depends = android-sdk-build-tools
+ depends = android-sdk-platform-tools
+ optdepends = android-google-apis-armv7a-eabi: AVD support
+ optdepends = android-armv7a-eabi-system-image: AVD support
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ options = !emptydirs
+ source = http://download.qt-project.org/official_releases/qt/5.11/5.11.2/single/qt-everywhere-src-5.11.2.tar.xz
+ source = 0001-Fix-clang-build.patch
+ source = 0002-Disable-mapbox.patch
+ md5sums = 152a8ade9c11fe33ff5bc95310a1bb64
+ md5sums = 511eafcabe9e0c6210f1dc5e26daa5c8
+ md5sums = 20d8bdd24102e9011b561b7361394728
+
+pkgname = android-armv7a-eabi-qt5
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0a5636a9ee5f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg
+src
+android-*-qt5
+*.tar.xz
+*.tar.gz
diff --git a/0001-Fix-clang-build.patch b/0001-Fix-clang-build.patch
new file mode 100644
index 000000000000..431f20e727e1
--- /dev/null
+++ b/0001-Fix-clang-build.patch
@@ -0,0 +1,23 @@
+--- a/qtbase/mkspecs/android-clang/qmake.conf 2018-09-13 01:25:10.000000000 -0300
++++ b/qtbase/mkspecs/android-clang/qmake.conf 2018-09-23 15:53:19.000000000 -0300
+@@ -31,16 +31,17 @@
+
+ QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH
+ QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a
+-QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \
++QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$ANDROID_PLATFORM_ROOT_PATH \
+ -isystem $$NDK_ROOT/sysroot/usr/include/$$NDK_TOOLS_PREFIX \
+ -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++/include \
+ -isystem $$NDK_ROOT/sources/android/support/include \
+- -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++abi/include
++ -isystem $$NDK_ROOT/sources/cxx-stl/llvm-libc++abi/include \
++ -isystem $$NDK_ROOT/sysroot/usr/include
+
+ ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH
+
+ ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so
+-ANDROID_CXX_STL_LIBS = -lc++
++ANDROID_CXX_STL_LIBS = -lc++_shared
+
+ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz
+
diff --git a/0002-Disable-mapbox.patch b/0002-Disable-mapbox.patch
new file mode 100644
index 000000000000..2266f773a475
--- /dev/null
+++ b/0002-Disable-mapbox.patch
@@ -0,0 +1,15 @@
+--- a/qtlocation/src/plugins/geoservices/geoservices.pro 2018-08-31 09:50:06.000000000 -0300
++++ b/qtlocation/src/plugins/geoservices/geoservices.pro 2018-09-29 09:32:24.465419357 -0300
+@@ -7,12 +7,3 @@
+ qtConfig(geoservices_esri): SUBDIRS += esri
+ qtConfig(geoservices_itemsoverlay): SUBDIRS += itemsoverlay
+ qtConfig(geoservices_osm): SUBDIRS += osm
+-
+-qtConfig(geoservices_mapboxgl) {
+- !exists(../../3rdparty/mapbox-gl-native/mapbox-gl-native.pro) {
+- warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.")
+- } else {
+- SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native
+- mapboxgl.depends = ../../3rdparty/mapbox-gl-native
+- }
+-}
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b81c89cbf15a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,217 @@
+# 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=armv7a-eabi
+
+# Minimum Android platform based on:
+#
+# https://developer.android.com/about/dashboards/
+if [ -z "${ANDROID_MINIMUM_PLATFORM}" ]; then
+ export ANDROID_MINIMUM_PLATFORM=22
+fi
+
+if [ -z "${ANDROID_NDK_ROOT}" ]; then
+ export ANDROID_NDK_ROOT=/opt/android-ndk
+fi
+
+if [ -z "${ANDROID_SDK_ROOT}" ]; then
+ export ANDROID_SDK_ROOT=/opt/android-sdk
+fi
+
+pkgname=android-${_android_arch}-qt5
+pkgver=5.11.2
+pkgrel=1
+pkgdesc="Qt 5 for Android"
+arch=('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_MINIMUM_PLATFORM"
+ 'android-sdk'
+ 'android-sdk-build-tools'
+ 'android-sdk-platform-tools')
+groups=('android-qt5')
+
+case "$_android_arch" in
+ aarch64)
+ optdepends=('android-google-apis-armv7a-eabi: AVD support'
+ 'android-armv7a-eabi-system-image: AVD support')
+ ;;
+ armv7a-eabi)
+ 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"
+ "0001-Fix-clang-build.patch"
+ "0002-Disable-mapbox.patch")
+md5sums=('152a8ade9c11fe33ff5bc95310a1bb64'
+ '511eafcabe9e0c6210f1dc5e26daa5c8'
+ '20d8bdd24102e9011b561b7361394728')
+
+_pref=/opt/android-libs/$_android_arch
+
+prepare() {
+ cd ${_pkgfqn}
+
+ # Platform specific patches.
+ patch -Np1 -i "../0001-Fix-clang-build.patch"
+ patch -Np1 -i "../0002-Disable-mapbox.patch"
+}
+
+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
+
+ 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
+
+ case "$_android_arch" in
+ aarch64)
+ target_arch=arm64-v8a
+ ;;
+ armv7a-eabi)
+ target_arch=armeabi-v7a
+ ;;
+ x86)
+ target_arch=x86
+ ;;
+ x86-64)
+ target_arch=x86_64
+ ;;
+ esac
+
+ configue_opts="
+ -confirm-license
+ -opensource
+ -silent
+ -prefix ${_pref}
+ -archdatadir ${_pref}/lib/qt
+ -datadir ${_pref}/share/qt
+ -examplesdir ${_pref}/share/qt/examples
+ -testsdir ${_pref}/share/qt/tests
+ -xplatform android-clang
+ -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
+ -android-arch ${target_arch}
+ -android-ndk-platform ${ANDROID_NDK_PLATFORM}"
+
+ [[ $ANDROID_DEBUG_BUILD ]] \
+ && configue_opts+=' -debug-and-release' \
+ || configue_opts+=' -release'
+
+ # 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
+ aarch64)
+ toolchain=aarch64-linux-android-4.9
+ stripFolder=aarch64-linux-android
+ ;;
+ armv7a-eabi)
+ 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
+
+ STRIP=${ANDROID_NDK_ROOT}/toolchains/${toolchain}/prebuilt/linux-x86_64/${stripFolder}/bin/strip
+ find ${pkgdir}/${_pref}/bin ! -name '*.pl' -exec ${STRIP} {} \;
+ find ${pkgdir}/${_pref}/lib -name 'lib*.so' -exec ${STRIP} {} \;
+ find ${pkgdir}/${_pref}/lib \( -name 'lib*.a' ! -name 'libQt5Bootstrap.a' ! -name 'libQt5QmlDevTools.a' \) -exec ${STRIP} {} \;
+ find ${pkgdir}/${_pref}/lib/qt/plugins -name 'lib*.so' -exec ${STRIP} {} \;
+ sed -i '/QMAKE_PRL_BUILD_DIR/d' ${pkgdir}/${_pref}/lib/lib*.prl
+}