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

[wip] fix(curl): build with multiple tls endpoints on macOS #26

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@getinsomnia/node-libcurl",
"version": "2.4.1-5",
"version": "2.4.1-8-alpha.2",
"description": "The fastest http(s) client (and much more) for Node.js - Node.js bindings for libcurl",
"keywords": [
"node-curl",
Expand Down
13 changes: 10 additions & 3 deletions scripts/ci/build-libcurl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ mkdir -p $2/source
FORCE_REBUILD=${FORCE_REBUILD:-}
FORCE_REBUILD_LIBCURL=${FORCE_REBUILD_LIBCURL:-}

# has a cache issue which will skip the rebuild of libcurl
if [ "${RUNNER_OS}" == "macOS" ]; then
FORCE_REBUILD_LIBCURL="true"
fi

# @TODO We are explicitly checking the static lib
if [[ -f $build_folder/lib/libcurl.a ]] && [[ -z $FORCE_REBUILD || $FORCE_REBUILD != "true" ]] && [[ -z $FORCE_REBUILD_LIBCURL || $FORCE_REBUILD_LIBCURL != "true" ]]; then
echo "Skipping rebuild of libcurl because lib file already exists"
Expand Down Expand Up @@ -134,13 +139,15 @@ fi
#####
# ssl
####
if [ "${RUNNER_OS}" == "macOS" ]; then
libcurl_args+=("--with-secure-transport")
elif [ ! -z "$OPENSSL_BUILD_FOLDER" ]; then
if [ ! -z "$OPENSSL_BUILD_FOLDER" ]; then
CPPFLAGS="$CPPFLAGS -I$OPENSSL_BUILD_FOLDER/include"
LDFLAGS="$LDFLAGS -L$OPENSSL_BUILD_FOLDER/lib -Wl,-rpath,$OPENSSL_BUILD_FOLDER/lib"

libcurl_args+=("--with-ssl=$OPENSSL_BUILD_FOLDER")
if [ "${RUNNER_OS}" == "macOS" ]; then
libcurl_args+=("--with-secure-transport")
libcurl_args+=("--with-default-ssl-backend=openssl")
fi
else
libcurl_args+=("--without-ssl")
fi
Expand Down
Loading