Commit b0e2316c authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Android: have the clang docker image target 5.12

Which supposedly will be the default
parent cc24215c
......@@ -3,8 +3,9 @@ FROM ubuntu:16.04
# inspired by rabits/qt which we use for the gcc toolkit
MAINTAINER Aleix Pol <aleixpol@kde.org>
ARG QT_VERSION=5.11.2
ARG NDK_VERSION=r16b
ARG QT_VERSION=5.12.0
ARG QT_TAG=5.12.0
ARG NDK_VERSION=r18b
ARG SDK_PLATFORM=android-21
ARG SDK_BUILD_TOOLS=21.1.2
ARG SDK_PACKAGES="tools platform-tools"
......@@ -15,7 +16,7 @@ ENV QT_ANDROID ${QT_PATH}/${QT_VERSION}/android_armv7
ENV ANDROID_HOME /opt/android-sdk
ENV ANDROID_SDK_ROOT ${ANDROID_HOME}
ENV ANDROID_NDK_ROOT /opt/android-ndk
ENV ANDROID_NDK_TOOLCHAIN_PREFIX arm-linux-androideabi
ENV ANDROID_NDK_TOOLCHAIN_PREFIX arm-linux-androideabi-clang
ENV ANDROID_NDK_HOST linux-x86_64
ENV ANDROID_NDK_PLATFORM ${SDK_PLATFORM}
ENV ANDROID_NDK_TOOLS_PREFIX ${ANDROID_NDK_TOOLCHAIN_PREFIX}
......@@ -64,7 +65,7 @@ RUN mkdir /tmp/android && cd /tmp/android && curl -Lo ndk.zip "https://dl.google
&& unzip -q ndk.zip && mv android-ndk-* $ANDROID_NDK_ROOT && chmod -R +rX $ANDROID_NDK_ROOT \
&& rm -rf /tmp/android
RUN cd && git clone git://code.qt.io/qt/qt5.git --single-branch --branch v${QT_VERSION} && \
RUN cd && git clone git://code.qt.io/qt/qt5.git --single-branch --branch ${QT_TAG} && \
cd qt5 && \
./init-repository && \
./configure -xplatform android-clang --disable-rpath -nomake tests -nomake examples -android-ndk /opt/android-ndk -android-sdk /opt/android-sdk -skip qttranslations -skip qtserialport -skip qtwebengine -no-warnings-are-errors -opensource -confirm-license -c++std c++14 -prefix $QT_ANDROID && \
......@@ -119,7 +120,7 @@ ENV PATH="/opt/cmake/bin:${PATH}"
RUN $QT_ANDROID/src/3rdparty/gradle/gradlew
# pull some generally required deps
RUN GIT_EXTRA="--single-branch --branch v${QT_VERSION}" /opt/helpers/build-qt qtscript git://code.qt.io/qt/qtscript.git
RUN GIT_EXTRA="--single-branch --branch ${QT_TAG}" /opt/helpers/build-qt qtscript git://code.qt.io/qt/qtscript.git
# needs to be after building qt, otherwise it breaks weirdly
ENV ANDROID_NDK_TOOLCHAIN_VERSION clang
......@@ -129,7 +130,7 @@ RUN /opt/helpers/build-cmake-native extra-cmake-modules kde:extra-cmake-modules
RUN /opt/helpers/build-cmake libintl-lite https://github.com/j-jorge/libintl-lite.git
# compile kf5 tooling
RUN cd && git clone git://code.qt.io/qt/qtbase.git --single-branch --branch v${QT_VERSION} && cd qtbase \
RUN cd && git clone git://code.qt.io/qt/qtbase.git --single-branch --branch ${QT_TAG} && cd qtbase \
&& QMAKESPEC= ./configure -prefix /opt/nativetooling -opensource -confirm-license -no-gui -release -optimize-size -nomake tests -nomake examples -no-feature-concurrent \
&& QMAKESPEC= make -j`nproc` && QMAKESPEC= make install && rm -rf ~/qtbase
RUN /opt/helpers/build-cmake-native kconfig kde:kconfig -DCMAKE_INSTALL_PREFIX=/opt/nativetooling -DBUILD_SHARED_LIBS=OFF -DCMAKE_PREFIX_PATH=/opt/kdeandroid-deps/ -DBUILD_TESTING=OFF -DQt5_DIR=/opt/nativetooling/lib/cmake/Qt5 -DKCONFIG_USE_GUI=OFF
......@@ -162,7 +163,7 @@ RUN unset ANDROID_NDK_TOOLCHAIN_VERSION \
&& sudo sed -i.bak "s|#define QT_NO_DBUS|//#define QT_NO_DBUS //we install it separate from the SDK|g" $QT_ANDROID/include/QtCore/qconfig.h \
&& sudo sed -i.bak "s/QT_FEATURE_dbus -1/QT_FEATURE_dbus 1/g" $QT_ANDROID/include/QtCore/${QT_VERSION}/QtCore/private/qconfig_p.h \
&& sudo sed -i.bak "s/QT_FEATURE_dbus_linked -1/QT_FEATURE_dbus_linked 1/g" $QT_ANDROID/include/QtCore/${QT_VERSION}/QtCore/private/qconfig_p.h \
&& cd && git clone git://code.qt.io/qt/qtbase.git --single-branch --branch v${QT_VERSION} && cd qtbase/src/dbus && qmake && make -j`nproc` && sudo make install && cd && rm -rf qtbase \
&& cd && git clone git://code.qt.io/qt/qtbase.git --single-branch --branch ${QT_TAG} && cd qtbase/src/dbus && qmake && make -j`nproc` && sudo make install && cd && rm -rf qtbase \
&& sudo ln -s /opt/nativetooling/bin/qdbusxml2cpp $QT_ANDROID/bin/ \
&& sudo ln -s /opt/nativetooling/bin/qdbuscpp2xml $QT_ANDROID/bin/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment