curl: update to 8.10.0
[void-pkg.git] / srcpkgs / curl / template
blob2cf9e9b1f30fae363e43b97db7f4a7824950fb9f
1 # Template file for 'curl'
2 pkgname=curl
3 version=8.10.0
4 revision=1
5 build_style=gnu-configure
6 configure_args="ac_cv_sizeof_off_t=8 --enable-threaded-resolver --enable-ipv6
7  --enable-websockets --with-random=/dev/urandom
8  $(vopt_with rtmp librtmp) $(vopt_with gssapi) $(vopt_enable ldap) $(vopt_with gnutls)
9  $(vopt_enable ldap ldaps) $(vopt_with ssh libssh2) $(vopt_with ssl) $(vopt_with zstd)
10  $(vopt_with psl libpsl) $(vopt_with idn libidn2)
11  --with-fish-functions-dir --with-zsh-functions-dir
12  --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
13  ac_cv_path_NROFF=/usr/bin/mandoc"
14 # 1477 verifies if headers and manpages are in sync which belongs in upstream processes
15 make_check_args="TFLAGS=!1477"
16 # Use mdocml instead of groff to generate builtin manual to avoid cyclic
17 # dependencies.
18 hostmakedepends="perl pkg-config mdocml"
19 makedepends="nghttp2-devel zlib-devel $(vopt_if gnutls 'gnutls-devel')
20  $(vopt_if gssapi 'mit-krb5-devel') $(vopt_if ldap 'libldap-devel')
21  $(vopt_if rtmp 'librtmp-devel') $(vopt_if ssh 'libssh2-devel')
22  $(vopt_if psl 'libpsl-devel') $(vopt_if idn 'libidn2-devel')
23  $(vopt_if ssl 'openssl-devel') $(vopt_if zstd 'libzstd-devel')"
24 depends="ca-certificates"
25 # openssh isn't in checkdepends, because test 581 locks up
26 checkdepends="python3 stunnel nghttp2 impacket"
27 short_desc="Client that groks URLs"
28 maintainer="Érico Nogueira <ericonr@disroot.org>"
29 license="MIT"
30 homepage="https://curl.se"
31 changelog="https://curl.se/changes.html"
32 distfiles="https://curl.se/download/curl-${version}.tar.gz"
33 checksum=58c9dcf73493ae9d181fd334b3b3987ff73124621565187ade237bff1064a716
34 build_options="gnutls gssapi idn ldap psl rtmp ssh ssl zstd"
35 build_options_default="idn psl ssh ssl zstd"
36 vopt_conflict ssl gnutls
38 if [ "$CROSS_BUILD" ]; then
39         hostmakedepends+=" curl"
42 pre_configure() {
43         export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
44         export CFLAGS="${CFLAGS/-I${XBPS_CROSS_BASE}\/usr\/include/}"
45         export CPPFLAGS="-D_FORTIFY_SOURCE=2"
48 pre_check() {
49         export USER=nobody
52 post_install() {
53         if [ "$CROSS_BUILD" ]; then
54                 # Copy hostmakedepends' version
55                 vcompletion /usr/share/zsh/site-functions/_curl zsh
56                 vcompletion /usr/share/fish/vendor_completions.d/curl.fish fish
57         else
58                 make -C scripts
59                 vcompletion scripts/_curl zsh
60                 vcompletion scripts/curl.fish fish
61         fi
63         # Fix linker search paths when necessary
64         if [ -n "$XBPS_CROSS_BASE" ]; then
65                 # Leave $XBPS_CROSS_BASE in --configure to reflect how it was built
66                 vsed -i $DESTDIR/usr/bin/curl-config \
67                         -e "/[   ]*--static-libs)/,/[    ]*;;/ s,-L${XBPS_CROSS_BASE},-L,"
68         fi
71 libcurl_package() {
72         short_desc="Multiprotocol file transfer library"
73         pkg_install() {
74                 vmove "usr/lib/*.so.*"
75                 vlicense COPYING
76         }
79 libcurl-devel_package() {
80         depends="${makedepends} libcurl>=${version}_${revision}"
81         short_desc="Multiprotocol file transfer library - development files"
82         pkg_install() {
83                 vmove usr/bin/curl-config
84                 vmove "usr/share/man/man1/curl-config*"
85                 vmove usr/share/man/man3
86                 vmove usr/share/aclocal
87                 vmove usr/include
88                 vmove "usr/lib/*.a"
89                 vmove "usr/lib/*.so"
90                 vmove usr/lib/pkgconfig
91         }