Skip to content
Closed
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
19 changes: 18 additions & 1 deletion pkg/mac/build-cpp-deps-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,19 @@ if [ ! -f openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.done ]; then
else
PLATFORM=darwin64-x86_64-cc
fi
./Configure --prefix=$PREFIX no-shared no-unit-test $PLATFORM
./Configure --prefix=$PREFIX --openssldir=/etc/ssl no-shared no-unit-test $PLATFORM
make -j8
make install_sw
popd

if [ $ARCH = 'x64' ]; then
OPENSSL_DIR=$(./install/bin/openssl version -d | sed 's/\"//g')
if [[ $OPENSSL_DIR =~ "\/etc\/ssl" ]]; then
echo "The openssl dir is not set as expected: " $OPENSSL_DIR
exit 1
fi
fi

rm -rf OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}
touch openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.done
else
Expand Down Expand Up @@ -169,6 +177,7 @@ if [ ! -f curl-${CURL_VERSION}.done ]; then
CFLAGS="-fPIC -arch ${ARCH} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}" \
./configure --with-ssl=$PREFIX \
--without-nghttp2 \
--with-ca-bundle="/etc/ssl/cert.pem" \
--without-libidn2 \
--disable-ldap \
--without-brotli \
Expand All @@ -179,6 +188,14 @@ if [ ! -f curl-${CURL_VERSION}.done ]; then
make -j16 install
popd

if [ $ARCH = 'x64' ]; then
CERT_PATH=$(./install/bin/curl -v https://example.com 2>&1 | grep CAfile)
if [[ $CERT_PATH =~ "\/etc\/ssl" ]]; then
echo "The certification path is not set as expected: " $CERT_PATH
exit 1
fi
fi

rm -rf curl-${CURL_VERSION} curl-${CURL_VERSION}.tar.gz
touch curl-${CURL_VERSION}.done
else
Expand Down