You are not logged in.

#1 2014-08-12 02:01:26

renanbs
Member
From: Porto Alegre
Registered: 2012-10-21
Posts: 11

android-qt5 compilation

This post is just to show another change I did in android-qt5 AUR package:

#PKGCONFIG for android-qt5 for qt 5.3
# Maintainer: Jiaxi Hu <sftrytry _AT_ gmail _DOT_ com>
# Contributor: jimmy00784 <jimmy00784@gmail.com>

pkgname='android-qt5'
pkgver=5.3.1
_pkgver=5.3
pkgrel=1
pkgdesc="Qt 5 for Android"
arch=('x86_64')
url='http://qt-project.org'
license=('GPL3' 'LGPL')
makedepends=('git' 'libgl' 'sqlite' 'zlib' 'python2' 'ruby' 'gperf' 'libxslt' 'fontconfig')
depends=('android-sdk' 'android-sdk-platform-tools' 'android-sdk-build-tools' 'android-ndk' 'java-runtime-headless>=7' 'android-platform-10' 'android-platform-11' 'android-platform-16' 'apache-ant')
groups=('qt-android' 'qt5-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")
md5sums=('f9a24a0d5645efa0715b6ff0fa13d60f')

prepare() {

  android_ndk=$( find /opt/ -maxdepth 1 -type d -name '*android-ndk*' )
  if [ -z ${android_ndk} ]; then
	echo "Cannot find android ndk instalation"
	return -1
  fi
  android_ndk=${android_ndk}"/"
}


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 ${android_ndk} \
    -android-sdk /opt/android-sdk \
    -android-toolchain-version 4.8 \
    -android-ndk-host linux-x86_64 \
    -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 \
     -v

  make || return 1
}

package() {
  cd ${_pkgfqn}
  make INSTALL_ROOT=${pkgdir} install
}

If an error like this shows: STL functionality check failed! Cannot build Qt with this STL library.
It mean you got the wrong android-ndk installed...

Offline

Board footer

Powered by FluxBB