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>
This commit is contained in:
Anton Lundin 2018-05-14 21:56:54 +02:00 committed by Dirk Hohndel
parent d12e842c68
commit a8c47cb75d

View file

@ -164,30 +164,32 @@ else
export JAVA_HOME=/usr export JAVA_HOME=/usr
fi fi
# find qmake
QMAKE=$QT5_ANDROID/android_armv7/bin/qmake
$QMAKE -query
# build google maps plugin # build google maps plugin
if [ ! -e googlemaps ] ; then if [ ! -e googlemaps ] ; then
git clone https://github.com/Subsurface-divelog/googlemaps.git git clone https://github.com/Subsurface-divelog/googlemaps.git
fi else
cd googlemaps pushd googlemaps
git checkout master git checkout master
git pull --rebase git pull --rebase
mkdir -p build-"$ARCH" popd
cd build-"$ARCH" fi
$QMAKE ../googlemaps.pro # find qmake
QMAKE=$QT5_ANDROID/android_armv7/bin/qmake
$QMAKE -query
QT_PLUGINS_PATH=$($QMAKE -query QT_INSTALL_PLUGINS)
GOOGLEMAPS_BIN=libqtgeoservices_googlemaps.so
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; # 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 # since things compile fine with c++11, let's just hack that away
# similarly, don't use -Wdata-time # similarly, don't use -Wdata-time
sed -i.bak -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' Makefile sed -i.bak -e 's/std=c++1z/std=c++11/g ; s/-Wdate-time//' Makefile
make -j4 make -j4
QT_PLUGINS_PATH=`$QMAKE -query QT_INSTALL_PLUGINS` $QMAKE -install qinstall -exe $GOOGLEMAPS_BIN "$QT_PLUGINS_PATH"/geoservices/$GOOGLEMAPS_BIN
GOOGLEMAPS_BIN=libqtgeoservices_googlemaps.so popd
$QMAKE -install qinstall -exe $GOOGLEMAPS_BIN $QT_PLUGINS_PATH/geoservices/$GOOGLEMAPS_BIN fi
cd ../../
if [ ! -e sqlite-autoconf-${SQLITE_VERSION}.tar.gz ] ; then if [ ! -e sqlite-autoconf-${SQLITE_VERSION}.tar.gz ] ; then
wget http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_VERSION}.tar.gz wget http://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_VERSION}.tar.gz