summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2018-05-14 21:56:54 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-17 07:36:44 -0700
commita8c47cb75dd0246e5386f28592c88dc5951a8351 (patch)
tree4ff5527b24ec422b81a926477e0a153c40450af5 /packaging
parentd12e842c6845b6afd9cc6070423e6e2338722a59 (diff)
downloadsubsurface-a8c47cb75dd0246e5386f28592c88dc5951a8351.tar.gz
android-build: Build googlemaps plugin same way as others
This reworks the googlemaps build to be more like the other builds, with the same pattern and way of detecting what we need to do, and when we need to rebuild it. Signed-off-by: Anton Lundin <glance@acc.umu.se>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/android/build.sh40
1 files changed, 21 insertions, 19 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index e5c10562e..fc4845196 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -164,30 +164,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
+else
+ pushd googlemaps
+ git checkout master
+ git pull --rebase
+ popd
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
-sed -i.bak -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' Makefile
-make -j4
-QT_PLUGINS_PATH=`$QMAKE -query QT_INSTALL_PLUGINS`
+# find qmake
+QMAKE=$QT5_ANDROID/android_armv7/bin/qmake
+$QMAKE -query
+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 "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN ] || [ googlemaps/.git/HEAD -nt "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN ] ; then
+ mkdir -p googlemaps-build-"$ARCH"
+ pushd googlemaps-build-"$ARCH"
+ $QMAKE ../googlemaps/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
+ sed -i.bak -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' Makefile
+ make -j4
+ $QMAKE -install qinstall -exe $GOOGLEMAPS_BIN "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN
+ popd
+fi
if [ ! -e sqlite-autoconf-${SQLITE_VERSION}.tar.gz ] ; then
wget http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_VERSION}.tar.gz