diff options
Diffstat (limited to 'packaging/android/build.sh')
-rwxr-xr-x | packaging/android/build.sh | 40 |
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 |