|
1 | | -# Note that this script can accept some limited command-line arguments, run |
2 | | -# `julia build_tarballs.jl --help` to see a usage message. |
3 | | -using BinaryBuilder |
| 1 | +include("../common.jl") |
4 | 2 |
|
5 | | -name = "LibCURL" |
6 | | -version = v"7.73.0" |
7 | | - |
8 | | -# Collection of sources required to build LibCURL |
9 | | -sources = [ |
10 | | - ArchiveSource("https://curl.haxx.se/download/curl-$(version).tar.gz", |
11 | | - "ba98332752257b47b9dea6d8c0ad25ec1745c20424f1dd3ff2c99ab59e97cf91"), |
12 | | -] |
13 | | - |
14 | | -# Bash recipe for building across all platforms |
15 | | -script = raw""" |
16 | | -cd $WORKSPACE/srcdir/curl-* |
17 | | -
|
18 | | -# Holy crow we really configure the bitlets out of this thing |
19 | | -FLAGS=( |
20 | | - # Disable....almost everything |
21 | | - --without-ssl --without-gnutls --without-gssapi |
22 | | - --without-libidn --without-libidn2 --without-libmetalink --without-librtmp |
23 | | - --without-nss --without-polarssl |
24 | | - --without-spnego --without-libpsl --disable-ares --disable-manual |
25 | | - --disable-ldap --disable-ldaps --without-zsh-functions-dir |
26 | | - --disable-static |
27 | | -
|
28 | | - # A few things we actually enable |
29 | | - --with-libssh2=${prefix} --with-zlib=${prefix} --with-nghttp2=${prefix} |
30 | | - --disable-versioned-symbols |
31 | | -) |
32 | | -
|
33 | | -
|
34 | | -if [[ ${target} == *mingw* ]]; then |
35 | | - # We need to tell it where to find libssh2 on windows |
36 | | - FLAGS+=(LDFLAGS="${LDFLAGS} -L${prefix}/bin") |
37 | | -
|
38 | | - # We also need to tell it to link against schannel (native TLS library) |
39 | | - FLAGS+=(--with-schannel) |
40 | | -elif [[ ${target} == *darwin* ]]; then |
41 | | - # On Darwin, we need to use SecureTransport (native TLS library) |
42 | | - FLAGS+=(--with-secure-transport) |
43 | | -
|
44 | | - # We need to explicitly request a higher `-mmacosx-version-min` here, so that it doesn't |
45 | | - # complain about: `Symbol not found: ___isOSVersionAtLeast` |
46 | | - if [[ "${target}" == aarch64* ]]; then |
47 | | - export CFLAGS=-mmacosx-version-min=11.0 |
48 | | - else |
49 | | - export CFLAGS=-mmacosx-version-min=10.11 |
50 | | - fi |
51 | | -else |
52 | | - # On all other systems, we use MbedTLS |
53 | | - FLAGS+=(--with-mbedtls=${prefix}) |
54 | | -fi |
55 | | -
|
56 | | -atomic_patch -p1 $WORKSPACE/srcdir/patches/0001-socks-return-error-if-hostname-too-long-for-remote-r.patch || true |
57 | | -
|
58 | | -./configure --prefix=$prefix --host=$target --build=${MACHTYPE} "${FLAGS[@]}" |
59 | | -make -j${nproc} |
60 | | -make install |
61 | | -install_license COPYING |
62 | | -""" |
63 | | - |
64 | | -# These are the platforms we will build for by default, unless further |
65 | | -# platforms are passed in on the command line |
66 | | -platforms = supported_platforms() |
67 | | - |
68 | | -# The products that we will ensure are always built |
69 | | -products = [ |
70 | | - LibraryProduct("libcurl", :libcurl), |
71 | | -] |
72 | | - |
73 | | -# Dependencies that must be installed before this package can be built |
74 | | -dependencies = [ |
75 | | - Dependency("LibSSH2_jll"; compat="1.9.1"), |
76 | | - Dependency("Zlib_jll"; compat="1.2.12"), |
77 | | - Dependency("nghttp2_jll"; compat="1.41.0"), |
78 | | - # Note that while we unconditionally list MbedTLS as a dependency, |
79 | | - # we default to schannel/SecureTransport on Windows/MacOS. |
80 | | - Dependency("MbedTLS_jll"; compat="2.24.0"), |
81 | | -] |
82 | | - |
83 | | -# Build the tarballs, and possibly a `build.jl` as well. |
84 | | -build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6") |
| 3 | +build_libcurl(ARGS, "LibCURL", v"7.81.0"; with_zstd=false) |
85 | 4 |
|
86 | 5 | # Build trigger: 2 |
0 commit comments