aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-11-19 12:14:43 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-11-19 17:18:33 -0800
commit3071ea06f010664af636fbb26edec53abbbe58de (patch)
treebf82cfb55b4a59267c89c2e4593b34cde3ee1cbe
parent068c7f5de1f4bec6d670268398989317e60b385b (diff)
downloadsubsurface-3071ea06f010664af636fbb26edec53abbbe58de.tar.gz
android: ensure all required pieces are in place for the build
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-xpackaging/android/qmake-build.sh23
1 files changed, 19 insertions, 4 deletions
diff --git a/packaging/android/qmake-build.sh b/packaging/android/qmake-build.sh
index 402846f21..663e8628e 100755
--- a/packaging/android/qmake-build.sh
+++ b/packaging/android/qmake-build.sh
@@ -110,14 +110,29 @@ QMAKE=$QT5_ANDROID/android/bin/qmake
echo $QMAKE
$QMAKE -query
-
-# if we are just doing a quick rebuild, don't bother with any of the dependencies
-
-# autoconf based libraries are harder
export TOOLCHAIN="$ANDROID_NDK_ROOT"/toolchains/llvm/prebuilt/linux-x86_64
PATH=$TOOLCHAIN/bin:$PATH
export ANDROID_NDK_HOME=$ANDROID_NDK_ROOT # redundant, but that's what openssl wants
+# make sure we have the font that we need for OnePlus phones due to https://bugreports.qt.io/browse/QTBUG-69494
+if [ ! -f "$SUBSURFACE_SOURCE"/android-mobile/Roboto-Regular.ttf ] ; then
+ cp "$ANDROID_SDK_ROOT"/platforms/"$ANDROID_PLATFORMS"/data/fonts/Roboto-Regular.ttf "$SUBSURFACE_SOURCE"/android-mobile || exit 1
+fi
+
+# next, make sure that the libdivecomputer sources are downloaded and
+# ready for autoconfig
+pushd "$SUBSURFACE_SOURCE"
+if [ ! -d libdivecomputer/src ] ; then
+ git submodule init
+ git submodule update
+fi
+if [ ! -f libdivecomputer/configure ] ; then
+ cd libdivecomputer
+ autoreconf -i
+fi
+popd
+
+# autoconf based libraries are harder
# build default architectures, or the given one?
if [ "$ARCHITECTURES" = "" ] ; then
ARCHITECTURES="armv7a aarch64"