removed dynamic libssl dep

This commit is contained in:
veeso
2022-07-20 12:37:22 +02:00
parent 82489e7459
commit f5174ccac0
4 changed files with 13 additions and 47 deletions

42
dist/build/macos.sh vendored
View File

@@ -18,41 +18,6 @@ make_pkg() {
echo "$HASH"
}
build_openssl_arm64() {
# setup dirs
BUILD_DIR=$(pwd)
OPENSSL_BUILD_DIR=/tmp/openssl-build/
# setup openssl dir
mkdir -p $OPENSSL_DIR
cd $OPENSSL_DIR
# check if openssl has already been compiled
if [ -e ./include/ ]; then
return 0
fi
# download package
TEMP_TGZ=/tmp/openssl.tar.gz
wget https://www.openssl.org/source/openssl-1.1.1m.tar.gz -O $TEMP_TGZ
# setup build dir
mkdir -p $OPENSSL_BUILD_DIR
cd $OPENSSL_BUILD_DIR
# extract sources
tar xzvf $TEMP_TGZ
rm $TEMP_TGZ
# build
cd openssl-1.1.1m/
export MACOSX_DEPLOYMENT_TARGET=10.15
./Configure enable-rc5 zlib darwin64-arm64-cc no-asm
make
make install DESTDIR=$(pwd)/out/
# copy compiled assets to openssl dir
cp -r out/usr/local/* $OPENSSL_DIR/
# go back to build dir
cd $BUILD_DIR
# delete temp dir
rm -rf $OPENSSL_BUILD_DIR
return 0
}
if [ -z "$1" ]; then
echo "Usage: macos.sh <version>"
exit 1
@@ -76,13 +41,6 @@ cargo build --release
# Make pkg
X86_64_HASH=$(make_pkg "x86_64" $VERSION)
# set openssl dir
export OPENSSL_DIR=$BUILD_ROOT/dist/build/macos/openssl/
export OPENSSL_STATIC=1
export OPENSSL_LIB_DIR=${OPENSSL_DIR}/lib/
export OPENSSL_INCLUDE_DIR=${OPENSSL_DIR}/include/
# build openssl
build_openssl_arm64
cd $BUILD_ROOT
# Build ARM64 pkg
cargo build --release --target aarch64-apple-darwin