summaryrefslogtreecommitdiffstats
path: root/packaging/android/build.sh
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-03-09 00:24:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-03-11 11:40:12 -0700
commitcdba35530ba5f9fedc0c803a0dbfada70cb57d7d (patch)
tree3618c51816432cf3150b14f4c81f850f7ae4512b /packaging/android/build.sh
parentc52df79cf1f666a5d7c39030da653059bc3749f7 (diff)
downloadsubsurface-cdba35530ba5f9fedc0c803a0dbfada70cb57d7d.tar.gz
android/build.sh: build the googlemaps plugin
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'packaging/android/build.sh')
-rwxr-xr-xpackaging/android/build.sh28
1 files changed, 27 insertions, 1 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index dea5cb6fe..66642d91b 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -104,7 +104,7 @@ if [ "$PLATFORM" = "Darwin" ] ; then
export ANDROID_NDK_HOST=darwin-x86_64
else
export ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT-$SUBSURFACE_SOURCE/../android-sdk-linux}
- export ANDROID_NDK_HOST=linux-x86
+ export ANDROID_NDK_HOST=linux-x86_64
fi
# Which versions are we building against?
@@ -162,6 +162,32 @@ else
export JAVA_HOME=/usr
fi
+
+# find qmake
+QMAKE=$QT5_ANDROID/android_armv7/bin/qmake
+$QMAKE -query
+
+# build google maps plugin
+if [ ! -e googlemaps ] ; then
+ git clone https://github.com/Subsurface-divelog/googlemaps.git
+fi
+cd googlemaps
+git checkout master
+git pull --rebase
+mkdir -p build-"$ARCH"
+cd build-"$ARCH"
+$QMAKE ../googlemaps.pro
+# on Travis the compiler doesn't support c++1z, yet qmake adds that flag;
+# since things compile fine with c++11, let's just hack that away
+# similarly, don't use -Wdata-time
+mv Makefile Makefile.bak
+cat Makefile.bak | sed -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' > Makefile
+make -j4
+QT_PLUGINS_PATH=`$QMAKE -query QT_INSTALL_PLUGINS`
+GOOGLEMAPS_BIN=libqtgeoservices_googlemaps.so
+$QMAKE -install qinstall -exe $GOOGLEMAPS_BIN $QT_PLUGINS_PATH/geoservices/$GOOGLEMAPS_BIN
+cd ../../
+
if [ ! -e sqlite-autoconf-${SQLITE_VERSION}.tar.gz ] ; then
wget http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_VERSION}.tar.gz
fi