iOS: added get-dep-lib to build.sh

Removed all 3rd party download/clone, and used common
get-dep-lib instead

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-05-13 13:09:40 +02:00 committed by Dirk Hohndel
parent b55c5d55e6
commit 77b9a62f7f

View file

@ -43,13 +43,6 @@ if [ -z $QT_VERSION ] ; then
exit 1 exit 1
fi fi
# Which versions are we building against?
LIBXSLT_VERSION=1.1.28
LIBZIP_VERSION=1.2.0
LIBGIT2_VERSION=v0.26.0
# remark LIBXSLT are only used on this platform
# due to Apple not publizing the version included in iOS
# set up the Subsurface versions by hand # set up the Subsurface versions by hand
GITVERSION=$(git describe --abbrev=12) GITVERSION=$(git describe --abbrev=12)
CANONICALVERSION=$(git describe --abbrev=12 | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./') CANONICALVERSION=$(git describe --abbrev=12 | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./')
@ -131,15 +124,10 @@ echo next building for $ARCH
target=$ARCH target=$ARCH
hosttarget=$ARCH hosttarget=$ARCH
if [ ! -d libxslt ] ; then ../../scripts/get-dep-lib.sh ios .
git clone https://github.com/GNOME/libxslt.git libxslt
fi
# libxslt have too old config.sub # libxslt have too old config.sub
pushd libxslt pushd libxslt
if ! git checkout v$LIBXSLT_VERSION ; then
echo "Can't find the right tag in libxslt - giving up"
exit 1
fi
autoreconf --install autoreconf --install
popd popd
if [ ! -e $PKG_CONFIG_LIBDIR/libxslt.pc ] ; then if [ ! -e $PKG_CONFIG_LIBDIR/libxslt.pc ] ; then
@ -151,30 +139,16 @@ echo next building for $ARCH
popd popd
fi fi
if [ ! -e libzip-${LIBZIP_VERSION}.tar.gz ] ; then
curl -O https://libzip.org/download/libzip-${LIBZIP_VERSION}.tar.gz
fi
if [ ! -e libzip-${LIBZIP_VERSION} ] ; then
tar -zxf libzip-${LIBZIP_VERSION}.tar.gz
fi
if [ ! -e $PKG_CONFIG_LIBDIR/libzip.pc ] ; then if [ ! -e $PKG_CONFIG_LIBDIR/libzip.pc ] ; then
mkdir -p libzip-build-$ARCH_NAME mkdir -p libzip-build-$ARCH_NAME
pushd libzip-build-$ARCH_NAME pushd libzip-build-$ARCH_NAME
../libzip-${LIBZIP_VERSION}/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared ../libzip/configure --host=${BUILDCHAIN} --prefix=${PREFIX} --enable-static --disable-shared
make make
make install make install
popd popd
fi fi
if [ ! -d libgit2 ] ; then
git clone https://github.com/libgit2/libgit2.git
fi
pushd libgit2 pushd libgit2
git fetch origin
if ! git checkout $LIBGIT2_VERSION ; then
echo "Can't find the right tag in libgit2 - giving up"
exit 1
fi
# libgit2 with -Wall on iOS creates megabytes of warnings... # libgit2 with -Wall on iOS creates megabytes of warnings...
sed -i.bak 's/ADD_C_FLAG_IF_SUPPORTED(-W/# ADD_C_FLAG_IF_SUPPORTED(-W/' CMakeLists.txt sed -i.bak 's/ADD_C_FLAG_IF_SUPPORTED(-W/# ADD_C_FLAG_IF_SUPPORTED(-W/' CMakeLists.txt
popd popd
@ -205,9 +179,9 @@ echo next building for $ARCH
if [ ! -d ../../libdivecomputer/src ] ; then if [ ! -d ../../libdivecomputer/src ] ; then
pushd ../.. pushd ../..
git submodule init git submodule init
git submodule update --recursive
popd popd
fi fi
git submodule update --recursive
if [ ! -f ../../libdivecomputer/configure ] ; then if [ ! -f ../../libdivecomputer/configure ] ; then
pushd ../../libdivecomputer pushd ../../libdivecomputer
autoreconf --install autoreconf --install
@ -232,9 +206,6 @@ echo next building for $ARCH
done done
# build googlemaps # build googlemaps
if [ ! -d googlemaps ] ; then
git clone git://github.com/subsurface-divelog/googlemaps
fi
mkdir -p googlemaps-build mkdir -p googlemaps-build
pushd googlemaps-build pushd googlemaps-build
${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../googlemaps/googlemaps.pro CONFIG+=release ${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../googlemaps/googlemaps.pro CONFIG+=release