Skip to content

Commit bf78a20

Browse files
committed
Use system curl for osx
1 parent e496aeb commit bf78a20

4 files changed

Lines changed: 27 additions & 17 deletions

File tree

build-alpine

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ install_deps() {
2121
export CROSS_COMPILE="/usr/bin/${arch}-alpine-linux-musl-"
2222

2323
apk add curl git autoconf bison re2c pkgconf zlib-dev zstd-dev openssl-libs-static openssl-dev zlib-static zlib-dev
24+
25+
# Build curl
26+
curl -sSL https://github.com/curl/curl/releases/download/curl-8_0_0/curl-8.0.0.tar.gz | tar -xzf -
27+
cd curl-8.0.0
28+
./configure --disable-shared --with-ssl --without-libidn2
29+
make -j8
30+
make install
31+
cd ..
2432
}
2533

2634
install_dev_deps() {

build-bash-base.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ curl -sSL "https://github.com/php/php-src/archive/refs/tags/php-$PHP_VERSION.tar
3232
test -d build && rm -fr "$_"
3333
mv "php-src-php-$PHP_VERSION" build && cd "$_"
3434

35-
# Build curl
36-
curl -sSL https://github.com/curl/curl/releases/download/curl-8_0_0/curl-8.0.0.tar.gz | tar -xzf -
37-
cd curl-8.0.0
38-
./configure --disable-shared --with-ssl --without-libidn2
39-
make -j8
40-
make install
41-
cd ..
42-
4335
# Build extra extensions
4436
cd ext
4537

build-linux

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ set -e
1212
install_deps() {
1313
sudo apt-get update -y
1414
sudo apt-get install -y curl build-essential autoconf automake bison re2c libzstd-dev pkg-config git libssl-dev zlib1g-dev libonig-dev cmake
15+
16+
# Build curl
17+
curl -sSL https://github.com/curl/curl/releases/download/curl-8_0_0/curl-8.0.0.tar.gz | tar -xzf -
18+
cd curl-8.0.0
19+
./configure --disable-shared --with-ssl --without-libidn2
20+
make -j8
21+
sudo make install
22+
cd ..
1523
}
1624

1725
install_dev_deps() {
@@ -42,6 +50,7 @@ fi
4250
--enable-zts --enable-parallel \
4351
--with-openssl --with-zlib \
4452
--enable-filter \
53+
--with-curl \
4554
--enable-mbstring \
4655
"${BUILD_EXTRA[@]}"
4756

build-osx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@
99
set -e
1010
install_deps() {
1111
brew upgrade
12-
brew install curl autoconf automake bison re2c zstd git openssl zlib cmake libcurl
12+
brew install curl autoconf automake bison re2c zstd git openssl zlib cmake
13+
14+
OPENSSL_PREFIX="$(brew --prefix openssl)"
15+
OPENSSL_CFLAGS="-I${OPENSSL_PREFIX}/include"
16+
OPENSSL_LIBS="-L${OPENSSL_PREFIX}/lib -lcrypto -lssl"
17+
export OPENSSL_PREFIX OPENSSL_CFLAGS OPENSSL_LIBS
18+
export PATH="${OPENSSL_PREFIX}/bin:${PATH}"
19+
export LDFLAGS="-L${OPENSSL_PREFIX}@1.1/lib"
20+
export CPPFLAGS="-I${OPENSSL_PREFIX}/include"
21+
export PKG_CONFIG_PATH="${OPENSSL_PREFIX}/lib/pkgconfig"
1322
}
1423

1524
install_dev_deps() {
@@ -19,14 +28,6 @@ install_dev_deps() {
1928
export -f install_deps install_dev_deps
2029
. ./build-bash-base.sh "$@"
2130

22-
if which brew; then
23-
brew link openssl@1.1
24-
OPENSSL_PREFIX="$(brew --prefix openssl@1.1)"
25-
OPENSSL_CFLAGS="-I${OPENSSL_PREFIX}/include"
26-
OPENSSL_LIBS="-L${OPENSSL_PREFIX}/lib -lcrypto -lssl"
27-
export OPENSSL_PREFIX OPENSSL_CFLAGS OPENSSL_LIBS
28-
fi
29-
3031
hide_dynamic_libs() {
3132
! which brew && return
3233
for lib in "$@"; do

0 commit comments

Comments
 (0)