Fixed broken download/extraction of OpenSSL archives by getting them from GitHub.

The reason for this is that old archived versions of OpenSSL do not exist any more in the original location.
This commit is contained in:
Steffen André Langnes 2016-03-08 15:20:28 +01:00
parent c26602c9af
commit e154f51cd4
1 changed files with 8 additions and 6 deletions

View File

@ -80,11 +80,13 @@ case $CURRENTPATH in
esac esac
set -e set -e
if [ ! -e openssl-${VERSION}.tar.gz ]; then OPENSSL_ARCHIVE_BASE_NAME=OpenSSL_${VERSION//./_}
echo "Downloading openssl-${VERSION}.tar.gz" OPENSSL_ARCHIVE_FILE_NAME=${OPENSSL_ARCHIVE_BASE_NAME}.tar.gz
curl ${CURL_OPTIONS} -O https://www.openssl.org/source/openssl-${VERSION}.tar.gz if [ ! -e ${OPENSSL_ARCHIVE_FILE_NAME} ]; then
echo "Downloading ${OPENSSL_ARCHIVE_FILE_NAME}"
curl ${CURL_OPTIONS} -L -O https://github.com/openssl/openssl/archive/${OPENSSL_ARCHIVE_FILE_NAME}
else else
echo "Using openssl-${VERSION}.tar.gz" echo "Using ${OPENSSL_ARCHIVE_FILE_NAME}"
fi fi
mkdir -p "${CURRENTPATH}/src" mkdir -p "${CURRENTPATH}/src"
@ -143,8 +145,8 @@ do
src_work_dir="${CURRENTPATH}/src/${PLATFORM}-${ARCH}" src_work_dir="${CURRENTPATH}/src/${PLATFORM}-${ARCH}"
mkdir -p "$src_work_dir" mkdir -p "$src_work_dir"
tar zxf "${CURRENTPATH}/openssl-${VERSION}.tar.gz" -C "$src_work_dir" tar zxf "${CURRENTPATH}/${OPENSSL_ARCHIVE_FILE_NAME}" -C "$src_work_dir"
cd "${src_work_dir}/openssl-${VERSION}" cd "${src_work_dir}/openssl-${OPENSSL_ARCHIVE_BASE_NAME}"
chmod u+x ./Configure chmod u+x ./Configure
if [[ "${PLATFORM}" == "AppleTVSimulator" || "${PLATFORM}" == "AppleTVOS" ]]; then if [[ "${PLATFORM}" == "AppleTVSimulator" || "${PLATFORM}" == "AppleTVOS" ]]; then