From: Marcus Comstedt Date: Sat, 17 May 2014 10:54:45 +0000 (+0200) Subject: sigrok-cross-android: Build Qt5 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7b8889711d74c1d669fab2b026d5e634a8d9b0f3;p=sigrok-util.git sigrok-cross-android: Build Qt5 --- diff --git a/cross-compile/android/android-qt.patch b/cross-compile/android/android-qt.patch index 33ac8b2..f284284 100644 --- a/cross-compile/android/android-qt.patch +++ b/cross-compile/android/android-qt.patch @@ -1,61 +1,14 @@ -diff --git a/android/androidconfigbuild.sh b/android/androidconfigbuild.sh -index 12ad414..b78f907 100755 ---- a/android/androidconfigbuild.sh -+++ b/android/androidconfigbuild.sh -@@ -281,7 +281,7 @@ then - - $SRC_DIR_QT/configure -v -opensource -qpa -arch $ANDROID_ARCHITECTURE \ - -no-phonon -freetype -fast -xplatform android-g++ \ -- -host-arch i386 $PLATFORM -host-little-endian \ -+ $PLATFORM \ - -little-endian -no-qt3support -no-largefile \ - -openssl -pch \ - -nomake demos -no-multimedia -nomake examples -confirm-license \ -diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf -index db28cb6..bc8802f 100644 ---- a/mkspecs/android-g++/qmake.conf -+++ b/mkspecs/android-g++/qmake.conf -@@ -74,8 +74,8 @@ ANDROID_PLATFORM_PATH = $$ANDROID_PLATFORM_ROOT_PATH/usr - QMAKE_ANDROID_PLATFORM_INCDIR = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/usr/include - QMAKE_ANDROID_PLATFORM_LIBDIR = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/usr/lib - --ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl$$ANDROID_CXXSTL_SUFFIX/gnu-libstdc++/libs/$$ANDROID_TARGET_ARCH --ANDROID_SOURCES_CXX_STL_INCDIR = $$NDK_ROOT/sources/cxx-stl$$ANDROID_CXXSTL_SUFFIX/gnu-libstdc++/include $$ANDROID_SOURCES_CXX_STL_LIBDIR/include -+ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/libs/$$ANDROID_TARGET_ARCH -+ANDROID_SOURCES_CXX_STL_INCDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/include $$ANDROID_SOURCES_CXX_STL_LIBDIR/include - - # modifications to g++.conf - QMAKE_CC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-gcc -@@ -159,7 +159,7 @@ QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined - QMAKE_LFLAGS_RPATH = -Wl,-rpath= - - --QMAKE_LIBS = -lstdc++ -lsupc++ -llog -lz -lm -ldl -lc -lgcc -+QMAKE_LIBS = -lgnustl_shared -lstdc++ -lsupc++ -llog -lz -lm -ldl -lc -lgcc - QMAKE_LIBS_X11 = - QMAKE_LIBS_X11SM = - QMAKE_LIBS_QT_THREAD = -diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp -index 9309db1..1df9f06 100644 ---- a/src/tools/moc/moc.cpp -+++ b/src/tools/moc/moc.cpp -@@ -525,12 +525,18 @@ void Moc::parse() - case NAMESPACE: { - int rewind = index; - if (test(IDENTIFIER)) { -+ QByteArray name = lexem(); -+ if (index + 1 < symbols.size() && symbols.at(index).token == IDENTIFIER && -+ symbols.at(index).lexem() == "_GLIBCXX_VISIBILITY" && -+ symbols.at(index+1).token == LPAREN) { -+ until(RPAREN); -+ } - if (test(EQ)) { - // namespace Foo = Bar::Baz; - until(SEMIC); - } else if (!test(SEMIC)) { - NamespaceDef def; -- def.name = lexem(); -+ def.name = name; - next(LBRACE); - def.begin = index - 1; - until(RBRACE); +diff --git a/qtbase/mkspecs/features/qt_common.prf b/qtbase/mkspecs/features/qt_common.prf +--- a/qtbase/mkspecs/features/qt_common.prf 2014-05-16 18:41:54.964880350 +0200 ++++ b/qtbase/mkspecs/features/qt_common.prf 2014-05-16 18:44:21.529590747 +0200 +@@ -56,7 +56,9 @@ + QMAKE_CXXFLAGS += -Wno-error=strict-overflow + + # Work-around for bug https://code.google.com/p/android/issues/detail?id=58135 +- android: QMAKE_CXXFLAGS += -Wno-error=literal-suffix ++ contains(ver, "4\\.8") { ++ android: QMAKE_CXXFLAGS += -Wno-error=literal-suffix ++ } + } + } + unset(ver) diff --git a/cross-compile/android/sigrok-cross-android b/cross-compile/android/sigrok-cross-android index 130afda..5e08bda 100755 --- a/cross-compile/android/sigrok-cross-android +++ b/cross-compile/android/sigrok-cross-android @@ -63,7 +63,7 @@ VER_LIBFTDI1=1.1 VER_LIBUSBX=1.0.17 VER_PYTHON=3.3.3 VER_BOOST=1.55.0 -VER_QT=n0.31 +VER_QT=5.2.1 SF_MIRROR=switch.dl.sourceforge.net @@ -271,11 +271,12 @@ if [ -z "$ANDROID_NDK" -o ! -d "$ANDROID_NDK" ]; then exit 0 fi -if [ -z "$ANDROID_SDK" -o ! -d "$ANDROID_SDK"/platforms/android-4 -o \ - ! -d "$ANDROID_SDK"/platforms/android-7 -o \ - ! -d "$ANDROID_SDK"/platforms/android-8 -o \ - ! -d "$ANDROID_SDK"/platforms/android-14 ]; then - echo "Android SDK with platforms 4 7 8 14 not available, not building PulseView" +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" exit 0 fi @@ -302,10 +303,13 @@ echo "using gcc : $NDK_TOOLCHAIN_VERSION : \"${TOOLCHAIN_TRIPLET}-g++\" :