mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-29 13:40:20 +00:00
ad84a96fdb
cmake 3.10 (which comes with Ubuntu 18.04) in combination with Qt 5.12 and the current qt-android-cmake causes an odd bug. Paths are set with a double slash at the start '//' and later in the process this causes garbled path names for some of the objects which in return causes the APKs built in the container to fail. Upgrading the cmake inside the container to 3.13.2 fixes that problem. All the credit for identifying the problem and figuring out a solution goes to Jan Mulder. The resulting container was pushed to Docker hub as version to 5.12.03. Reported-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
56 lines
1.7 KiB
Docker
56 lines
1.7 KiB
Docker
From ubuntu:18.04
|
|
|
|
RUN apt-get update && \
|
|
apt-get upgrade -y && \
|
|
apt-get install -y \
|
|
autoconf \
|
|
automake \
|
|
git \
|
|
libtool-bin \
|
|
make \
|
|
wget \
|
|
unzip \
|
|
python \
|
|
bzip2 \
|
|
pkg-config \
|
|
libx11-xcb1 \
|
|
libgl1-mesa-glx \
|
|
libglib2.0-0 \
|
|
openjdk-8-jdk
|
|
|
|
# create our working directory and place the local copies of the Qt
|
|
# install, NDK and SDK there, plus the three files from the Subsurface
|
|
# sources that we need to get the prep routines to run
|
|
RUN mkdir -p /android
|
|
ADD qt-opensource-linux-x64-5.*.run /android/
|
|
ADD android-ndk-r*-linux-x86_64.zip /android/
|
|
ADD sdk-tools-linux-*.zip /android/
|
|
ADD android-build-wrapper.sh variables.sh qt-installer-noninteractive.qs /android/
|
|
|
|
# install current cmake
|
|
ADD cmake-3.13.2.tar.gz /android/
|
|
RUN cd /android/cmake-3.13.2 && \
|
|
bash ./bootstrap && \
|
|
make -j6 && make install
|
|
|
|
# run the build wrapper in prep mode
|
|
RUN cd /android && bash -x /android/android-build-wrapper.sh -prep-only
|
|
|
|
# uggly hack to work around some breakage in the NDK which makes our
|
|
# compiles fail
|
|
RUN sed -i '313,+13s/^using/\/\/using/' /android/android-ndk-r18b/sources/cxx-stl/llvm-libc++/include/cmath
|
|
|
|
# clean up the files that we don't need to keep the container smaller
|
|
RUN cd /android && \
|
|
rm -rf qt-opensource-linux-x64-*.run \
|
|
Qt/[a-zA-Z]* \
|
|
sdk-tools-linux-*.zip \
|
|
android-ndk-r*-linux-x86_64.zip \
|
|
android-sdk-linux/emulator \
|
|
$( find android-ndk*/platforms -name arch-mips -o -name arch-x86 ) \
|
|
android-ndk*/toolchains/x86-* android-ndk*/toolchains/llvm/prebuilt/x86-* \
|
|
cmake-3.13* && \
|
|
ls -l && \
|
|
du -sh *
|
|
RUN apt-get clean
|
|
RUN touch /android/finished-`date`
|