Changed the openssl url and bumped the version. Refactored the openssl.sh script to avoid version duplication in the code.

This commit is contained in:
Jeremy Lempereur 2017-06-08 19:44:57 +02:00
parent 71eb672923
commit a02c074ba9
3 changed files with 9 additions and 8 deletions

View file

@ -247,6 +247,7 @@ class MachCommands(CommandBase):
if android: if android:
# Build OpenSSL for android # Build OpenSSL for android
env["OPENSSL_VERSION"] = "1.0.2k"
make_cmd = ["make"] make_cmd = ["make"]
if jobs is not None: if jobs is not None:
make_cmd += ["-j" + jobs] make_cmd += ["-j" + jobs]
@ -264,7 +265,7 @@ class MachCommands(CommandBase):
verbose=verbose) verbose=verbose)
if status: if status:
return status return status
openssl_dir = path.join(openssl_dir, "openssl-1.0.1t") openssl_dir = path.join(openssl_dir, "openssl-{}".format(env["OPENSSL_VERSION"]))
env['OPENSSL_LIB_DIR'] = openssl_dir env['OPENSSL_LIB_DIR'] = openssl_dir
env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include") env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
env['OPENSSL_STATIC'] = 'TRUE' env['OPENSSL_STATIC'] = 'TRUE'

View file

@ -4,11 +4,11 @@ all: openssl
# From http://wiki.openssl.org/index.php/Android # From http://wiki.openssl.org/index.php/Android
.PHONY: openssl .PHONY: openssl
openssl: openssl-1.0.1t/libssl.so openssl: openssl-${OPENSSL_VERSION}/libssl.so
openssl-1.0.1t/libssl.so: openssl-1.0.1t/Configure openssl-${OPENSSL_VERSION}/libssl.so: openssl-${OPENSSL_VERSION}/Configure
./openssl.sh ${ANDROID_NDK} ./openssl.sh ${ANDROID_NDK} ${OPENSSL_VERSION}
openssl-1.0.1t/Configure: openssl-${OPENSSL_VERSION}/Configure:
wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1t.tar.gz URL=https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/openssl-${OPENSSL_VERSION}.tar.gz; \
tar -zxf openssl-1.0.1t.tar.gz curl $$URL | tar xzf -

View file

@ -181,7 +181,7 @@ if [ ! -z "$VERBOSE" ] && [ "$VERBOSE" != "0" ]; then
echo "ANDROID_DEV: $ANDROID_DEV" echo "ANDROID_DEV: $ANDROID_DEV"
fi fi
cd openssl-1.0.1t cd openssl-$2
perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.org perl -pi -e 's/install: all install_docs install_sw/install: install_docs install_sw/g' Makefile.org
# The code being built isn't maintained by us, so we redirect stderr to stdout # The code being built isn't maintained by us, so we redirect stderr to stdout