Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL 1.0.2t #702

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions scripts/openssl/1.0.2t/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
language: cpp

matrix:
include:
- os: osx
compiler: clang
sudo: false
- os: osx
env: MASON_PLATFORM=ios
compiler: clang
- os: linux
env: MASON_PLATFORM_VERSION=cortex_a9
addons:
apt:
packages:
- xutils-dev
- os: linux
env: MASON_PLATFORM_VERSION=i686
addons:
apt:
packages:
- xutils-dev
- os: linux
compiler: clang
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-5-dev
- xutils-dev
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v5
addons:
apt:
packages:
- xutils-dev
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v7
addons:
apt:
packages:
- xutils-dev
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v8
addons:
apt:
packages:
- xutils-dev
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86
addons:
apt:
packages:
- xutils-dev
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86-64
addons:
apt:
packages:
- xutils-dev
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips
addons:
apt:
packages:
- xutils-dev
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips-64
addons:
apt:
packages:
- xutils-dev

script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
108 changes: 108 additions & 0 deletions scripts/openssl/1.0.2t/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#!/usr/bin/env bash

MASON_NAME=openssl
MASON_VERSION=1.0.2t
MASON_LIB_FILE=lib/libssl.a
MASON_PKGCONFIG_FILE=lib/pkgconfig/openssl.pc

. ${MASON_DIR}/mason.sh

function mason_load_source {
mason_download \
https://www.openssl.org/source/openssl-${MASON_VERSION}.tar.gz \
3928bb4c265a2d8e2e86bc0bd8dec04501cbfc62

mason_extract_tar_gz

export MASON_BUILD_PATH=${MASON_ROOT}/.build/openssl-${MASON_VERSION}
}

function mason_prepare_compile {
MASON_MAKEDEPEND="gccmakedep"

if [ ${MASON_PLATFORM} = 'osx' ]; then
MASON_MAKEDEPEND="makedepend"
MASON_OS_COMPILER="darwin64-x86_64-cc enable-ec_nistp_64_gcc_128"
elif [ ${MASON_PLATFORM} = 'linux' ]; then
MASON_OS_COMPILER="linux-x86_64 enable-ec_nistp_64_gcc_128"
elif [[ ${MASON_PLATFORM} == 'android' ]]; then
COMMON="-fPIC -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-integrated-as -O2 -g -DNDEBUG -fomit-frame-pointer -fstrict-aliasing -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes"
if [ ${MASON_ANDROID_ABI} = 'arm-v5' ]; then
MASON_OS_COMPILER="linux-armv4 -march=armv5te -mtune=xscale -msoft-float -fuse-ld=gold $COMMON"
elif [ ${MASON_ANDROID_ABI} = 'arm-v7' ]; then
MASON_OS_COMPILER="linux-armv4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -Wl,--fix-cortex-a8 -fuse-ld=gold $COMMON"
elif [ ${MASON_ANDROID_ABI} = 'x86' ]; then
MASON_OS_COMPILER="linux-elf -march=i686 -msse3 -mfpmath=sse -fuse-ld=gold $COMMON"
elif [ ${MASON_ANDROID_ABI} = 'mips' ]; then
MASON_OS_COMPILER="linux-generic32 $COMMON"
elif [ ${MASON_ANDROID_ABI} = 'arm-v8' ]; then
MASON_OS_COMPILER="linux-generic64 enable-ec_nistp_64_gcc_128 -fuse-ld=gold $COMMON"
elif [ ${MASON_ANDROID_ABI} = 'x86-64' ]; then
MASON_OS_COMPILER="linux-x86_64 enable-ec_nistp_64_gcc_128 -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -fuse-ld=gold $COMMON"
elif [ ${MASON_ANDROID_ABI} = 'mips-64' ]; then
MASON_OS_COMPILER="linux-generic32 $COMMON"
fi
fi
}

function mason_compile {
NO_ASM=

# Work around a Android 6.0 TEXTREL exception. See https://github.com/mapbox/mapbox-gl-native/issues/2772
if [[ ${MASON_PLATFORM} == 'android' ]]; then
if [ ${MASON_ANDROID_ABI} = 'x86' ]; then
NO_ASM=-no-asm
fi
fi

./Configure \
--prefix=${MASON_PREFIX} \
enable-tlsext \
${NO_ASM} \
-no-dso \
-no-hw \
-no-engines \
-no-comp \
-no-gmp \
-no-zlib \
-no-shared \
-no-ssl2 \
-no-ssl3 \
-no-krb5 \
-no-camellia \
-no-capieng \
-no-cast \
-no-dtls \
-no-gost \
-no-idea \
-no-jpake \
-no-md2 \
-no-mdc2 \
-no-rc5 \
-no-rdrand \
-no-ripemd \
-no-rsax \
-no-sctp \
-no-seed \
-no-sha0 \
-no-whirlpool \
-fPIC \
-DOPENSSL_PIC \
-DOPENSSL_NO_COMP \
-DOPENSSL_NO_HEARTBEATS \
--openssldir=${MASON_PREFIX}/etc/openssl \
${MASON_OS_COMPILER}

make depend MAKEDEPPROG=${MASON_MAKEDEPEND}

make

# https://github.com/openssl/openssl/issues/57
make install_sw
}

function mason_clean {
make clean
}

mason_run "$@"