mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 12:17:36 +00:00
Ports: Convert curl port to use CMake, remove two autoconf patches
This removes the shlib hack from the install step, which repackaged the static library as the shared one. It also has the benefit of making the port work with the Clang toolchain :^).
This commit is contained in:
parent
64c546b909
commit
12c352dfc9
3 changed files with 19 additions and 78 deletions
|
@ -5,10 +5,25 @@ useconfigure=true
|
|||
files="https://curl.se/download/curl-${version}.tar.bz2 curl-${version}.tar.bz2 1e7a38d7018ec060f1f16df839854f0889e94e122c4cfa5d3a37c2dc56f1e258"
|
||||
auth_type=sha256
|
||||
depends=("openssl" "zlib" "zstd")
|
||||
configopts=("--disable-ntlm-wb" "--with-openssl=${SERENITY_INSTALL_ROOT}/usr/local" "--disable-symbol-hiding")
|
||||
configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt")
|
||||
|
||||
configure() {
|
||||
mkdir -p curl-build
|
||||
cmake -G Ninja \
|
||||
-S curl-${version} \
|
||||
-B curl-build \
|
||||
"${configopts[@]}" \
|
||||
-DCURL_USE_OPENSSL=ON \
|
||||
-DCURL_ZSTD=ON \
|
||||
-DCURL_DISABLE_NTLM=ON \
|
||||
-DCURL_DISABLE_TESTS=ON \
|
||||
-DCURL_HIDDEN_SYMBOLS=OFF
|
||||
}
|
||||
|
||||
build() {
|
||||
ninja -C curl-build
|
||||
}
|
||||
|
||||
install() {
|
||||
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install
|
||||
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libcurl.so -Wl,-soname,libcurl.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libcurl.a -Wl,--no-whole-archive -lzstd
|
||||
rm -f ${SERENITY_INSTALL_ROOT}/usr/local/lib/libcurl.la
|
||||
ninja -C curl-build install
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue