diff --git a/openssl b/openssl deleted file mode 120000 index 2cfa02d05e..0000000000 --- a/openssl +++ /dev/null @@ -1 +0,0 @@ -openssl@1.1 \ No newline at end of file diff --git a/openssl b/openssl new file mode 100644 index 0000000000..126f97500e --- /dev/null +++ b/openssl @@ -0,0 +1,27 @@ +# Use legacy bundle on high-sierra +if [ "x${OSTYPE:6:1}" = "x1" ]; then +bottle="https://github.com/autobrew/bundler/releases/download/openssl-3.1.1/openssl-1.1.1h-high_sierra.tar.xz" +else +bottle="https://github.com/autobrew/bundler/releases/download/openssl-3.1.1/openssl-3.1.1-universal.tar.xz" +fi + +# Skip if disabled +if [ "$DISABLE_AUTOBREW" ]; then return 0; fi +echo "Using autobrew bundle: $(basename $bottle)" + +# General setup +BREWDIR="$PWD/.deps" +mkdir -p $BREWDIR +curl -sSL $bottle -o libs.tar.xz +tar -xf libs.tar.xz --strip 1 -C $BREWDIR +cp ${BREWDIR}/lib/libssl.a ${BREWDIR}/lib/libbrewssl.a +cp ${BREWDIR}/lib/libcrypto.a ${BREWDIR}/lib/libbrewcrypto.a +rm -f libs.tar.xz + +# Flags +PKG_CFLAGS="-I${BREWDIR}/include" +PKG_LIBS="-L${BREWDIR}/lib -lbrewssl -lbrewcrypto" + +# Cleanup +echo "rm -Rf .deps" >> cleanup +chmod +x cleanup