ladybird/Ports/curl/package.sh
Kenneth Myhra a3073824a9 Ports/curl: Set CMake cache variable HAVE_GETADDRINFO_THREADSAFE to 1
According to the issue https://github.com/curl/curl/issues/12093 the
curl build doesn't properly detect that Serenity has getaddrinfo() and
outputs the following:
---
Performing Test HAVE_H_ERRNO_ASSIGNABLE
CMake Error: try_run() invoked in cross-compiling mode, please set the
following cache variables appropriately:
HAVE_H_ERRNO_ASSIGNABLE_EXITCODE (advanced)
---

Setting the CMake cache variable HAVE_GETADDRINFO_THREADSAFE=1 solves
the mentioned error.

Also see: https://github.com/curl/curl/pull/12094
2023-10-16 09:41:00 +02:00

39 lines
925 B
Bash
Executable file

#!/usr/bin/env -S bash ../.port_include.sh
port='curl'
version='8.4.0'
useconfigure='true'
files=(
"https://curl.se/download/curl-${version}.tar.bz2#e5250581a9c032b1b6ed3cf2f9c114c811fc41881069e9892d115cc73f9e88c6"
)
depends=(
'ca-certificates'
'openssl'
'zlib'
'zstd'
)
configure() {
mkdir -p curl-build
cmake \
-G Ninja \
-S "curl-${version}" \
-B curl-build \
-DCMAKE_TOOLCHAIN_FILE="${SERENITY_BUILD_DIR}/CMakeToolchain.txt" \
-DCURL_USE_OPENSSL='ON' \
-DCURL_ZSTD='ON' \
-DCURL_CA_BUNDLE='/etc/ssl/certs/ca-certificates.crt' \
-DCURL_CA_PATH='none' \
-DCURL_DISABLE_NTLM='ON' \
-DCURL_DISABLE_SOCKETPAIR='ON' \
-DCURL_DISABLE_TESTS='ON' \
-DCURL_HIDDEN_SYMBOLS='OFF' \
-DHAVE_GETADDRINFO_THREADSAFE=1
}
build() {
ninja -C curl-build
}
install() {
ninja -C curl-build install
}