From: Jens Steinhauser Date: Wed, 29 Apr 2015 19:03:28 +0000 (+0200) Subject: sigrok-cross-android: Use newer Qt version and require only one SDK API. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6e39ae141c82a394f31b990b98d25633ab0e82ee;p=sigrok-util.git sigrok-cross-android: Use newer Qt version and require only one SDK API. --- diff --git a/cross-compile/android/android-qt.patch b/cross-compile/android/android-qt.patch index fc3b188..762ac85 100644 --- a/cross-compile/android/android-qt.patch +++ b/cross-compile/android/android-qt.patch @@ -12,3 +12,13 @@ diff --git a/qtbase/mkspecs/features/qt_common.prf b/qtbase/mkspecs/features/qt_ } } unset(ver) +--- a/qttools/src/qdbus/qdbus.pro 2015-02-17 05:57:17.000000000 +0100 ++++ b/qttools/src/qdbus/qdbus.pro 2015-04-29 15:55:19.740997627 +0200 +@@ -1,3 +1,5 @@ + TEMPLATE = subdirs +-SUBDIRS = qdbus +-qtHaveModule(widgets): SUBDIRS += qdbusviewer ++!android:!ios:!qnx:!wince*:!winrt* { ++ SUBDIRS = qdbus ++ qtHaveModule(widgets): SUBDIRS += qdbusviewer ++} diff --git a/cross-compile/android/sigrok-cross-android b/cross-compile/android/sigrok-cross-android index 30519f7..caa374b 100755 --- a/cross-compile/android/sigrok-cross-android +++ b/cross-compile/android/sigrok-cross-android @@ -75,9 +75,11 @@ VER_LIBFTDI1=1.2 VER_LIBUSB=1.0.19 VER_PYTHON=3.3.3 VER_BOOST=1.57.0 -VER_QT=5.3.1 +VER_QT=5.4.1 VER_NDK=10d VER_SDK=23.0.2 +VER_AND_BT=22.0.1 # android build tools version +VER_AND_API=16 # target android API version SF_MIRROR=download.sourceforge.net @@ -112,7 +114,7 @@ if [ "x$1" = "xprepare" ]; then $WGET http://dl.google.com/android/android-sdk_r$VER_SDK-linux.tgz tar xfz android-sdk_r$VER_SDK-linux.tgz cd android-sdk-linux - ./tools/android update sdk --no-ui --filter platform-tools,build-tools-21.1.2,android-8,android-10,android-11,android-14,android-16 + ./tools/android update sdk --no-ui --filter platform-tools,build-tools-$VER_AND_BT,android-$VER_AND_API cd .. exit @@ -153,7 +155,7 @@ if test -d "$TOOLCHAIN"/sysroot; then SYSROOT= else STANDALONE_TOOLCHAIN= - NATIVE_API_LEVEL=16 + NATIVE_API_LEVEL=$VER_AND_API SYSROOT_DIR=${ANDROID_NDK}/platforms/android-${NATIVE_API_LEVEL}/arch-${TARGET_ARCH%eabi*} if [ ! -d "$SYSROOT_DIR" ]; then echo >&2 "Can't build with NDK toolchain; sysroot $SYSROOT_DIR is missing" @@ -392,13 +394,8 @@ if [ -z "$ANDROID_NDK" -o ! -d "$ANDROID_NDK" ]; then exit 0 fi -if [ -z "$ANDROID_SDK" -o \ - ! -d "$ANDROID_SDK"/platforms/android-8 -o \ - ! -d "$ANDROID_SDK"/platforms/android-10 -o \ - ! -d "$ANDROID_SDK"/platforms/android-11 -o \ - ! -d "$ANDROID_SDK"/platforms/android-14 -o \ - ! -d "$ANDROID_SDK"/platforms/android-16 ]; then - echo "Android SDK with platforms 8 10 11 14 16 not available, not building PulseView." +if [ -z "$ANDROID_SDK" -o ! -d "$ANDROID_SDK"/platforms/android-$VER_AND_API ]; then + echo "Android SDK with platform $VER_AND_API not available, not building PulseView." exit 0 fi @@ -423,7 +420,26 @@ $WGET http://download.qt-project.org/official_releases/qt/${VER_QT%.*}/${VER_QT} tar xfz qt-everywhere-opensource-src-${VER_QT}.tar.gz cd qt-everywhere-opensource-src-${VER_QT} patch -p1 < ../../android-qt.patch -CC= CXX= ./configure --prefix="$PREFIX" -developer-build -xplatform android-g++ -nomake tests -nomake examples -android-sdk "$ANDROID_SDK" -android-ndk "$ANDROID_NDK" -android-ndk-host "$NDK_HOST" -android-arch "$TARGET_ARCH" -android-toolchain-version "$NDK_TOOLCHAIN_VERSION" -skip qttranslations -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip qtlocation -skip qtconnectivity -opensource -confirm-license -silent +CC= CXX= ./configure \ + --prefix="$PREFIX" \ + -developer-build \ + -xplatform android-g++ \ + -nomake tests \ + -nomake examples \ + -android-sdk "$ANDROID_SDK" \ + -android-ndk "$ANDROID_NDK" \ + -android-ndk-host "$NDK_HOST" \ + -android-arch "$TARGET_ARCH" \ + -android-toolchain-version "$NDK_TOOLCHAIN_VERSION" \ + -skip qttranslations \ + -skip qtwebkit \ + -skip qtserialport \ + -skip qtwebkit-examples \ + -skip qtlocation \ + -skip qtconnectivity \ + -opensource -confirm-license -silent +export ANDROID_API_VERSION=android-$VER_AND_API +export ANDROID_BUILD_TOOLS_REVISION=$VER_AND_BT make module-qtbase module-qtandroidextras module-qtsvg module-qtimageformats $PARALLEL $V make install $V cd .. @@ -432,7 +448,7 @@ cd .. $GIT_CLONE git://sigrok.org/sigrok-androidutils cd sigrok-androidutils ./autogen.sh -./configure $C --with-android-sdk="${ANDROID_SDK}" +./configure $C --with-android-sdk="${ANDROID_SDK}" --with-android-platform=android-$VER_AND_API make $PARALLEL $V make install $V cd .. @@ -448,7 +464,6 @@ make $PARALLEL $V make install $V ${TOOLCHAIN_TRIPLET}-strip -S libs/$TARGET_ARCH/libpulseview.so cd android -"${ANDROID_SDK}/tools/android" update project -p . -t android-14 -n PulseView +"${ANDROID_SDK}/tools/android" update project -p . -t android-$VER_AND_API -n PulseView ant debug cd ../.. -