From 8e2aaa42426e4ee407733c21c70ac7c449f30a9e Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Thu, 17 May 2018 20:55:58 +0200 Subject: 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 --- scripts/get-dep-lib.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'scripts') 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 " - echo "or" echo "get-dep-lib.sh single " + echo "get-dep-lib.sh singleAndroid " echo "where" echo " 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 -- cgit v1.2.3-70-g09d2