aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@libreoffice.org>2018-05-17 20:55:58 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-18 16:58:16 -0700
commit8e2aaa42426e4ee407733c21c70ac7c449f30a9e (patch)
tree3b0e741246de19a2374a03c005fd44ec8ab708ba
parenta181020b193f0ae44c49a1ac095713cd2fa10213 (diff)
downloadsubsurface-8e2aaa42426e4ee407733c21c70ac7c449f30a9e.tar.gz
build-system: update get-dep-lib with Android fix.
Android build uses wget and not curl. Currently android uses older versions of some libs, due to that a new switch is added temporary. Old version tested for curl and if not found set the different versions, however this is not a stable method for obvious reasons Signed-off-by: Jan Iversen <jani@apache.org>
-rwxr-xr-xscripts/get-dep-lib.sh26
1 files changed, 20 insertions, 6 deletions
diff --git a/scripts/get-dep-lib.sh b/scripts/get-dep-lib.sh
index 4c9aee473..afa680720 100755
--- a/scripts/get-dep-lib.sh
+++ b/scripts/get-dep-lib.sh
@@ -14,14 +14,12 @@ CURRENT_SQLITE="3190200"
CURRENT_LIBXML2="v2.9.4"
CURRENT_LIBFTDI="1.3"
-
-
# deal with all the command line arguments
if [[ $# -ne 2 && $# -ne 3 ]] ; then
echo "wrong number of parameters, format:"
echo "get-dep-lib.sh <platform> <install dir>"
- echo "or"
echo "get-dep-lib.sh single <install dir> <lib>"
+ echo "get-dep-lib.sh singleAndroid <install dir> <lib>"
echo "where"
echo "<platform> is one of scripts, ios or android"
echo "(the name of the directory where build.sh resides)"
@@ -37,6 +35,19 @@ if [ ! -d ${INSTDIR} ] ; then
mkdir -p ${INSTDIR}
fi
+# FIX FOR ANDROID,
+if [ "$PLATFORM" == "singleAndroid" ] ; then
+ CURRENT_LIBZIP="1.1.3"
+ CURRENT_LIBUSB="v1.0.20"
+ CURRENT_OPENSSL="OpenSSL_1_0_2l"
+fi
+# no curl and old libs (never version breaks)
+# check whether to use curl or wget
+if [ "`which curl`" == "" ] ; then
+ CURL="wget "
+else
+ CURL="curl -O "
+fi
case ${PLATFORM} in
scripts)
BUILD="libzip libgit2 googlemaps hidapi libcurl libusb openssl libssh2"
@@ -50,6 +61,9 @@ case ${PLATFORM} in
single)
BUILD="$3"
;;
+ singleAndroid)
+ BUILD="$3"
+ ;;
*)
echo "Unknown platform ${PLATFORM}, choose between native, ios or android"
;;
@@ -74,7 +88,7 @@ if [[ "$BUILD" = *"libcurl"* && ! -d libcurl ]]; then
fi
if [[ "$BUILD" = *"libftdi"* && ! -d libftdi1 ]]; then
- curl -O https://www.intra2net.com/en/developer/libftdi/download/libftdi1-${CURRENT_LIBFTDI}.tar.bz2
+ ${CURL} https://www.intra2net.com/en/developer/libftdi/download/libftdi1-${CURRENT_LIBFTDI}.tar.bz2
tar -jxf libftdi1-${CURRENT_LIBFTDI}.tar.bz2
mv libftdi1-${CURRENT_LIBFTDI} libftdi1
fi
@@ -135,7 +149,7 @@ if [[ "$BUILD" = *"libxslt"* && ! -d libxslt ]]; then
fi
if [[ "$BUILD" = *"libzip"* && ! -d libzip ]]; then
- curl -O https://libzip.org/download/libzip-${CURRENT_LIBZIP}.tar.gz
+ ${CURL} https://libzip.org/download/libzip-${CURRENT_LIBZIP}.tar.gz
tar xzf libzip-${CURRENT_LIBZIP}.tar.gz
mv libzip-${CURRENT_LIBZIP} libzip
fi
@@ -173,7 +187,7 @@ if [[ "$BUILD" = *"openssl"* && ! -d openssl ]]; then
fi
if [[ "$BUILD" = *"sqlite"* && ! -d sqlite ]]; then
- curl -O http://www.sqlite.org/2017/sqlite-autoconf-${CURRENT_SQLITE}.tar.gz
+ ${CURL} http://www.sqlite.org/2017/sqlite-autoconf-${CURRENT_SQLITE}.tar.gz
tar -zxf sqlite-autoconf-${CURRENT_SQLITE}.tar.gz
mv sqlite-autoconf-${CURRENT_SQLITE} sqlite
fi