Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/curl/
Date: Thu, 01 Sep 2022 14:22:43
Message-Id: 1662042079.6146b4933b7a0ad5f39fdef73bf8c7c040f24c2f.blueness@gentoo
1 commit: 6146b4933b7a0ad5f39fdef73bf8c7c040f24c2f
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 1 14:21:00 2022 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 1 14:21:19 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6146b493
7
8 Revert "net-misc/curl: cleanup older stable versions"
9
10 This reverts commit 2a1bfcbd5d722a1f7aee9d91f7c3a173c6773849.
11
12 dev-lang/julia depends on <net-misc/curl-7.81.0
13
14 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
15
16 net-misc/curl/Manifest | 4 +
17 net-misc/curl/curl-7.79.1-r1.ebuild | 293 ++++++++++++++++++++++++++++++++++++
18 net-misc/curl/curl-7.83.1.ebuild | 288 +++++++++++++++++++++++++++++++++++
19 net-misc/curl/metadata.xml | 1 +
20 4 files changed, 586 insertions(+)
21
22 diff --git a/net-misc/curl/Manifest b/net-misc/curl/Manifest
23 index a31545ac99db..ade38f0e36d0 100644
24 --- a/net-misc/curl/Manifest
25 +++ b/net-misc/curl/Manifest
26 @@ -1,3 +1,7 @@
27 +DIST curl-7.79.1.tar.xz 2465212 BLAKE2B 2b694f96661c0aa0a136fdae4159e0ca8e811557c5a1f0b47cccaaad122f3ddbdaa6450c3835290955baf9357e872ee105a8cb0912064af3d3e38d16beb124ad SHA512 1edb71647a7f4dbb070baf1a019b4751aefeda793ff523c504410bb5cc74e5bffc52f20dd889697d1585f9ca3c4e81b1a9caadd182c30c8358ffd25f33e4db4d
28 +DIST curl-7.79.1.tar.xz.asc 488 BLAKE2B cf1864b15ee4b47a61a03968c4fd9526d4c8d0c5a8a0a1357de61758640e6dfda57334df1e63afd94c0064b7e61527623dd20446b27fa0130e0bf92c647d9820 SHA512 4f7930fde0a21358cf0bd8d5cbde5a05efc34202265b4744e59f49d9dc269987f47b4ead77c33e2ae03acabd7b6d6a731c69b91999eea70542f49d9ea0c2ba94
29 +DIST curl-7.83.1.tar.xz 2474940 BLAKE2B 491427b12f082c2246ef6cb2a129340079db28bd93b4381889e7328bef1d61a79bb57cba4b8372759baa4f6e77644966ed95cfa8f839ee9db634786757fb1ce0 SHA512 2f63327d6d3687ba36fb7b8d5d3d15599eca33ebfb08681613612ea9c4b629d3b6ce4d2742fa1ebd7a997ed332001d3a4c798985f9277c83b9e7a9aecdb1b1ee
30 +DIST curl-7.83.1.tar.xz.asc 488 BLAKE2B 78f7a6d9a32cab97e9ce26430eb2be2bc4e20552cf8c59238f30f127e9d7af5b4f9808c3fe0846c18c8f7a67b49f2f75d865d17b7760bb664872934799949441 SHA512 f0d29de315488c844eb81ed5a89ed6334910970224c8cac43e7e6f2d58c35ad0064c0b6122e69b3a34ce91f4b56873c63e2e8aea1c602ef40711bfd62a01b191
31 DIST curl-7.84.0.tar.xz 2477944 BLAKE2B 811a63285f39a598bc4fd73ae4b8e23e5146b93dcf3eea805345792b7dddd85bbd54240d9871a0dc9f058d58fd7ea7f4efbcb82727218e8afaaae3600bad55e1 SHA512 86231866a35593a1637fbc0c6af3b6761bdfd99fb35580cc52970c36f19604f93dce59fea67a1d5bb4b455f719307599c7916c77d14f2b661f6bf7fb1ca716ce
32 DIST curl-7.84.0.tar.xz.asc 488 BLAKE2B d74dea89fa89b6ed0a928e01987669f7dde0bcbb30423ea0f3af9f31eea1e059d458629d80455d772264d744fab236d4f506545afa1bfbd6ded7e2b27192a7c8 SHA512 80ff5274277ad97448fa53511bab6e8a1c302bcb25fc0916d78b8dc6c6af43d944c37c4ed46668b651cc639ec4964780725117ca0e85168ea66ad7cc98d29702
33 DIST curl-7.85.0.tar.xz 2480648 BLAKE2B 7d0e0212541c05352040391b400e0314e0d38a96b199dfd70ccaaca3fd7f809b7ed96b877c4663c06fc05c483468521458255dcf025226f1bdf4d6c9dd9b8873 SHA512 b57cc31649a4f47cc4b482f56a85c86c8e8aaeaf01bc1b51b065fdb9145a9092bc52535e52a85a66432eb163605b2edbf5bc5c33ea6e40e50f26a69ad1365cbd
34
35 diff --git a/net-misc/curl/curl-7.79.1-r1.ebuild b/net-misc/curl/curl-7.79.1-r1.ebuild
36 new file mode 100644
37 index 000000000000..ac8292e30cfe
38 --- /dev/null
39 +++ b/net-misc/curl/curl-7.79.1-r1.ebuild
40 @@ -0,0 +1,293 @@
41 +# Copyright 1999-2022 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI="7"
45 +
46 +inherit autotools prefix multilib-minimal verify-sig
47 +
48 +DESCRIPTION="A Client that groks URLs"
49 +HOMEPAGE="https://curl.haxx.se/"
50 +SRC_URI="https://curl.haxx.se/download/${P}.tar.xz
51 + verify-sig? ( https://curl.haxx.se/download/${P}.tar.xz.asc )"
52 +
53 +LICENSE="curl"
54 +SLOT="0"
55 +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
56 +IUSE="adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap ipv6 kerberos ldap mbedtls nss +openssl +pop3 +progress-meter rtmp samba +smtp ssh ssl sslv3 static-libs test telnet +tftp threads winssl zstd"
57 +IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl curl_ssl_winssl"
58 +IUSE+=" nghttp3 quiche"
59 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc
60 +
61 +# c-ares must be disabled for threads
62 +# only one default ssl provider can be enabled
63 +REQUIRED_USE="
64 + winssl? ( elibc_Winnt )
65 + threads? ( !adns )
66 + ssl? (
67 + ^^ (
68 + curl_ssl_gnutls
69 + curl_ssl_mbedtls
70 + curl_ssl_nss
71 + curl_ssl_openssl
72 + curl_ssl_winssl
73 + )
74 + )"
75 +
76 +# lead to lots of false negatives, bug #285669
77 +RESTRICT="!test? ( test )"
78 +
79 +RDEPEND="ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
80 + brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
81 + ssl? (
82 + gnutls? (
83 + net-libs/gnutls:0=[static-libs?,${MULTILIB_USEDEP}]
84 + dev-libs/nettle:0=[${MULTILIB_USEDEP}]
85 + app-misc/ca-certificates
86 + )
87 + mbedtls? (
88 + net-libs/mbedtls:0=[${MULTILIB_USEDEP}]
89 + app-misc/ca-certificates
90 + )
91 + openssl? (
92 + dev-libs/openssl:0=[sslv3(-)=,static-libs?,${MULTILIB_USEDEP}]
93 + )
94 + nss? (
95 + dev-libs/nss:0[${MULTILIB_USEDEP}]
96 + app-misc/ca-certificates
97 + )
98 + )
99 + http2? ( net-libs/nghttp2:=[${MULTILIB_USEDEP}] )
100 + nghttp3? (
101 + net-libs/nghttp3[${MULTILIB_USEDEP}]
102 + net-libs/ngtcp2[ssl,${MULTILIB_USEDEP}]
103 + )
104 + quiche? ( >=net-libs/quiche-0.3.0[${MULTILIB_USEDEP}] )
105 + idn? ( net-dns/libidn2:0=[static-libs?,${MULTILIB_USEDEP}] )
106 + adns? ( net-dns/c-ares:0=[${MULTILIB_USEDEP}] )
107 + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
108 + rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
109 + ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] )
110 + sys-libs/zlib[${MULTILIB_USEDEP}]
111 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )"
112 +
113 +# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
114 +# rtmp? (
115 +# media-video/rtmpdump
116 +# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
117 +# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
118 +# )
119 +
120 +# ssl providers to be added:
121 +# fbopenssl $(use_with spnego)
122 +
123 +DEPEND="${RDEPEND}"
124 +BDEPEND="dev-lang/perl
125 + virtual/pkgconfig
126 + test? (
127 + sys-apps/diffutils
128 + dev-lang/perl
129 + )
130 + verify-sig? ( sec-keys/openpgp-keys-danielstenberg )"
131 +
132 +DOCS=( CHANGES README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} )
133 +
134 +MULTILIB_WRAPPED_HEADERS=(
135 + /usr/include/curl/curlbuild.h
136 +)
137 +
138 +MULTILIB_CHOST_TOOLS=(
139 + /usr/bin/curl-config
140 +)
141 +
142 +PATCHES=(
143 + "${FILESDIR}"/${PN}-7.30.0-prefix.patch
144 + "${FILESDIR}"/${PN}-respect-cflags-3.patch
145 +)
146 +
147 +src_prepare() {
148 + default
149 +
150 + eprefixify curl-config.in
151 + eautoreconf
152 +}
153 +
154 +multilib_src_configure() {
155 + # We make use of the fact that later flags override earlier ones
156 + # So start with all ssl providers off until proven otherwise
157 + # TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
158 + local myconf=()
159 +
160 + myconf+=( --without-gnutls --without-mbedtls --without-nss --without-polarssl --without-ssl --without-winssl )
161 + myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
162 + #myconf+=( --without-default-ssl-backend )
163 + if use ssl ; then
164 + if use gnutls || use curl_ssl_gnutls; then
165 + einfo "SSL provided by gnutls"
166 + myconf+=( --with-gnutls --with-nettle )
167 + fi
168 + if use mbedtls || use curl_ssl_mbedtls; then
169 + einfo "SSL provided by mbedtls"
170 + myconf+=( --with-mbedtls )
171 + fi
172 + if use nss || use curl_ssl_nss; then
173 + einfo "SSL provided by nss"
174 + myconf+=( --with-nss )
175 + fi
176 + if use openssl || use curl_ssl_openssl; then
177 + einfo "SSL provided by openssl"
178 + myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
179 + fi
180 + if use winssl || use curl_ssl_winssl; then
181 + einfo "SSL provided by Windows"
182 + myconf+=( --with-winssl )
183 + fi
184 +
185 + if use curl_ssl_gnutls; then
186 + einfo "Default SSL provided by gnutls"
187 + myconf+=( --with-default-ssl-backend=gnutls )
188 + elif use curl_ssl_mbedtls; then
189 + einfo "Default SSL provided by mbedtls"
190 + myconf+=( --with-default-ssl-backend=mbedtls )
191 + elif use curl_ssl_nss; then
192 + einfo "Default SSL provided by nss"
193 + myconf+=( --with-default-ssl-backend=nss )
194 + elif use curl_ssl_openssl; then
195 + einfo "Default SSL provided by openssl"
196 + myconf+=( --with-default-ssl-backend=openssl )
197 + elif use curl_ssl_winssl; then
198 + einfo "Default SSL provided by Windows"
199 + myconf+=( --with-default-ssl-backend=winssl )
200 + else
201 + eerror "We can't be here because of REQUIRED_USE."
202 + fi
203 +
204 + else
205 + einfo "SSL disabled"
206 + fi
207 +
208 + # These configuration options are organized alphabetically
209 + # within each category. This should make it easier if we
210 + # ever decide to make any of them contingent on USE flags:
211 + # 1) protocols first. To see them all do
212 + # 'grep SUPPORT_PROTOCOLS configure.ac'
213 + # 2) --enable/disable options second.
214 + # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
215 + # 3) --with/without options third.
216 + # grep -- --with configure | grep Check | awk '{ print $4 }' | sort
217 +
218 + myconf+=(
219 + $(use_enable alt-svc)
220 + --enable-crypto-auth
221 + --enable-dict
222 + --disable-ech
223 + --enable-file
224 + $(use_enable ftp)
225 + $(use_enable gopher)
226 + $(use_enable hsts)
227 + --enable-http
228 + $(use_enable imap)
229 + $(use_enable ldap)
230 + $(use_enable ldap ldaps)
231 + --enable-ntlm
232 + --disable-ntlm-wb
233 + $(use_enable pop3)
234 + --enable-rt
235 + --enable-rtsp
236 + $(use_enable samba smb)
237 + $(use_with ssh libssh2)
238 + $(use_enable smtp)
239 + $(use_enable telnet)
240 + $(use_enable tftp)
241 + --enable-tls-srp
242 + $(use_enable adns ares)
243 + --enable-cookies
244 + --enable-dateparse
245 + --enable-dnsshuffle
246 + --enable-doh
247 + --enable-hidden-symbols
248 + --enable-http-auth
249 + $(use_enable ipv6)
250 + --enable-largefile
251 + --enable-manual
252 + --enable-mime
253 + --enable-netrc
254 + $(use_enable progress-meter)
255 + --enable-proxy
256 + --disable-sspi
257 + $(use_enable static-libs static)
258 + $(use_enable threads threaded-resolver)
259 + $(use_enable threads pthreads)
260 + --disable-versioned-symbols
261 + --without-amissl
262 + --without-bearssl
263 + $(use_with brotli)
264 + --without-cyassl
265 + --without-fish-functions-dir
266 + $(use_with http2 nghttp2)
267 + --without-hyper
268 + $(use_with idn libidn2)
269 + $(use_with kerberos gssapi "${EPREFIX}"/usr)
270 + --without-libgsasl
271 + --without-libpsl
272 + $(use_with nghttp3)
273 + $(use_with nghttp3 ngtcp2)
274 + $(use_with quiche)
275 + $(use_with rtmp librtmp)
276 + --without-rustls
277 + --without-schannel
278 + --without-secure-transport
279 + --without-spnego
280 + --without-winidn
281 + --without-wolfssl
282 + --with-zlib
283 + $(use_with zstd)
284 + )
285 +
286 + ECONF_SOURCE="${S}" \
287 + econf "${myconf[@]}"
288 +
289 + if ! multilib_is_native_abi; then
290 + # avoid building the client
291 + sed -i -e '/SUBDIRS/s:src::' Makefile || die
292 + sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
293 + fi
294 +
295 + # Fix up the pkg-config file to be more robust.
296 + # https://github.com/curl/curl/issues/864
297 + local priv=() libs=()
298 + # We always enable zlib.
299 + libs+=( "-lz" )
300 + priv+=( "zlib" )
301 + if use http2; then
302 + libs+=( "-lnghttp2" )
303 + priv+=( "libnghttp2" )
304 + fi
305 + if use quiche; then
306 + libs+=( "-lquiche" )
307 + priv+=( "quiche" )
308 + fi
309 + if use nghttp3; then
310 + libs+=( "-lnghttp3" "-lngtcp2" )
311 + priv+=( "libnghttp3" "-libtcp2" )
312 + fi
313 + if use ssl && use curl_ssl_openssl; then
314 + libs+=( "-lssl" "-lcrypto" )
315 + priv+=( "openssl" )
316 + fi
317 + grep -q Requires.private libcurl.pc && die "need to update ebuild"
318 + libs=$(printf '|%s' "${libs[@]}")
319 + sed -i -r \
320 + -e "/^Libs.private/s:(${libs#|})( |$)::g" \
321 + libcurl.pc || die
322 + echo "Requires.private: ${priv[*]}" >> libcurl.pc
323 +}
324 +
325 +multilib_src_test() {
326 + multilib_is_native_abi && default_src_test
327 +}
328 +
329 +multilib_src_install_all() {
330 + einstalldocs
331 + find "${ED}" -type f -name '*.la' -delete || die
332 + rm -rf "${ED}"/etc/ || die
333 +}
334
335 diff --git a/net-misc/curl/curl-7.83.1.ebuild b/net-misc/curl/curl-7.83.1.ebuild
336 new file mode 100644
337 index 000000000000..a3fd859195dc
338 --- /dev/null
339 +++ b/net-misc/curl/curl-7.83.1.ebuild
340 @@ -0,0 +1,288 @@
341 +# Copyright 1999-2022 Gentoo Authors
342 +# Distributed under the terms of the GNU General Public License v2
343 +
344 +EAPI="8"
345 +
346 +inherit autotools prefix multilib-minimal verify-sig
347 +
348 +DESCRIPTION="A Client that groks URLs"
349 +HOMEPAGE="https://curl.haxx.se/"
350 +SRC_URI="https://curl.haxx.se/download/${P}.tar.xz
351 + verify-sig? ( https://curl.haxx.se/download/${P}.tar.xz.asc )"
352 +
353 +LICENSE="curl"
354 +SLOT="0"
355 +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
356 +IUSE="adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap ipv6 kerberos ldap mbedtls nss +openssl +pop3 +progress-meter rtmp samba +smtp ssh ssl sslv3 static-libs test telnet +tftp threads zstd"
357 +IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl"
358 +IUSE+=" nghttp3 quiche"
359 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc
360 +
361 +# c-ares must be disabled for threads
362 +# only one default ssl provider can be enabled
363 +REQUIRED_USE="
364 + threads? ( !adns )
365 + ssl? (
366 + ^^ (
367 + curl_ssl_gnutls
368 + curl_ssl_mbedtls
369 + curl_ssl_nss
370 + curl_ssl_openssl
371 + )
372 + )"
373 +
374 +# lead to lots of false negatives, bug #285669
375 +RESTRICT="!test? ( test )"
376 +
377 +RDEPEND="ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
378 + brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
379 + ssl? (
380 + gnutls? (
381 + net-libs/gnutls:0=[static-libs?,${MULTILIB_USEDEP}]
382 + dev-libs/nettle:0=[${MULTILIB_USEDEP}]
383 + app-misc/ca-certificates
384 + )
385 + mbedtls? (
386 + net-libs/mbedtls:0=[${MULTILIB_USEDEP}]
387 + app-misc/ca-certificates
388 + )
389 + openssl? (
390 + dev-libs/openssl:0=[sslv3(-)=,static-libs?,${MULTILIB_USEDEP}]
391 + )
392 + nss? (
393 + dev-libs/nss:0[${MULTILIB_USEDEP}]
394 + app-misc/ca-certificates
395 + )
396 + )
397 + http2? ( net-libs/nghttp2:=[${MULTILIB_USEDEP}] )
398 + nghttp3? (
399 + net-libs/nghttp3[${MULTILIB_USEDEP}]
400 + net-libs/ngtcp2[ssl,${MULTILIB_USEDEP}]
401 + )
402 + quiche? ( >=net-libs/quiche-0.3.0[${MULTILIB_USEDEP}] )
403 + idn? ( net-dns/libidn2:0=[static-libs?,${MULTILIB_USEDEP}] )
404 + adns? ( net-dns/c-ares:0=[${MULTILIB_USEDEP}] )
405 + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
406 + rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
407 + ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] )
408 + sys-libs/zlib[${MULTILIB_USEDEP}]
409 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )"
410 +
411 +# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
412 +# rtmp? (
413 +# media-video/rtmpdump
414 +# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
415 +# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
416 +# )
417 +
418 +DEPEND="${RDEPEND}"
419 +BDEPEND="dev-lang/perl
420 + virtual/pkgconfig
421 + test? (
422 + sys-apps/diffutils
423 + )
424 + verify-sig? ( sec-keys/openpgp-keys-danielstenberg )"
425 +
426 +DOCS=( CHANGES README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} )
427 +
428 +MULTILIB_WRAPPED_HEADERS=(
429 + /usr/include/curl/curlbuild.h
430 +)
431 +
432 +MULTILIB_CHOST_TOOLS=(
433 + /usr/bin/curl-config
434 +)
435 +
436 +PATCHES=(
437 + "${FILESDIR}"/${PN}-7.30.0-prefix.patch
438 + "${FILESDIR}"/${PN}-respect-cflags-3.patch
439 +)
440 +
441 +src_prepare() {
442 + default
443 +
444 + eprefixify curl-config.in
445 + eautoreconf
446 +}
447 +
448 +multilib_src_configure() {
449 + # We make use of the fact that later flags override earlier ones
450 + # So start with all ssl providers off until proven otherwise
451 + # TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
452 + local myconf=()
453 +
454 + myconf+=( --without-gnutls --without-mbedtls --without-nss --without-ssl )
455 + myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
456 + #myconf+=( --without-default-ssl-backend )
457 + if use ssl ; then
458 + if use gnutls || use curl_ssl_gnutls; then
459 + einfo "SSL provided by gnutls"
460 + myconf+=( --with-gnutls --with-nettle )
461 + fi
462 + if use mbedtls || use curl_ssl_mbedtls; then
463 + einfo "SSL provided by mbedtls"
464 + myconf+=( --with-mbedtls )
465 + fi
466 + if use nss || use curl_ssl_nss; then
467 + einfo "SSL provided by nss"
468 + myconf+=( --with-nss --with-nss-deprecated )
469 + fi
470 + if use openssl || use curl_ssl_openssl; then
471 + einfo "SSL provided by openssl"
472 + myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
473 + fi
474 +
475 + if use curl_ssl_gnutls; then
476 + einfo "Default SSL provided by gnutls"
477 + myconf+=( --with-default-ssl-backend=gnutls )
478 + elif use curl_ssl_mbedtls; then
479 + einfo "Default SSL provided by mbedtls"
480 + myconf+=( --with-default-ssl-backend=mbedtls )
481 + elif use curl_ssl_nss; then
482 + einfo "Default SSL provided by nss"
483 + myconf+=( --with-default-ssl-backend=nss )
484 + elif use curl_ssl_openssl; then
485 + einfo "Default SSL provided by openssl"
486 + myconf+=( --with-default-ssl-backend=openssl )
487 + else
488 + eerror "We can't be here because of REQUIRED_USE."
489 + fi
490 +
491 + else
492 + einfo "SSL disabled"
493 + fi
494 +
495 + # These configuration options are organized alphabetically
496 + # within each category. This should make it easier if we
497 + # ever decide to make any of them contingent on USE flags:
498 + # 1) protocols first. To see them all do
499 + # 'grep SUPPORT_PROTOCOLS configure.ac'
500 + # 2) --enable/disable options second.
501 + # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
502 + # 3) --with/without options third.
503 + # grep -- --with configure | grep Check | awk '{ print $4 }' | sort
504 +
505 + myconf+=(
506 + $(use_enable alt-svc)
507 + --enable-crypto-auth
508 + --enable-dict
509 + --disable-ech
510 + --enable-file
511 + $(use_enable ftp)
512 + $(use_enable gopher)
513 + $(use_enable hsts)
514 + --enable-http
515 + $(use_enable imap)
516 + $(use_enable ldap)
517 + $(use_enable ldap ldaps)
518 + --enable-ntlm
519 + --disable-ntlm-wb
520 + $(use_enable pop3)
521 + --enable-rt
522 + --enable-rtsp
523 + $(use_enable samba smb)
524 + $(use_with ssh libssh2)
525 + $(use_enable smtp)
526 + $(use_enable telnet)
527 + $(use_enable tftp)
528 + --enable-tls-srp
529 + $(use_enable adns ares)
530 + --enable-cookies
531 + --enable-dateparse
532 + --enable-dnsshuffle
533 + --enable-doh
534 + --enable-symbol-hiding
535 + --enable-http-auth
536 + $(use_enable ipv6)
537 + --enable-largefile
538 + --enable-manual
539 + --enable-mime
540 + --enable-netrc
541 + $(use_enable progress-meter)
542 + --enable-proxy
543 + --disable-sspi
544 + $(use_enable static-libs static)
545 + $(use_enable threads threaded-resolver)
546 + $(use_enable threads pthreads)
547 + --disable-versioned-symbols
548 + --without-amissl
549 + --without-bearssl
550 + $(use_with brotli)
551 + --without-fish-functions-dir
552 + $(use_with http2 nghttp2)
553 + --without-hyper
554 + $(use_with idn libidn2)
555 + $(use_with kerberos gssapi "${EPREFIX}"/usr)
556 + --without-libgsasl
557 + --without-libpsl
558 + --without-msh3
559 + $(use_with nghttp3)
560 + $(use_with nghttp3 ngtcp2)
561 + $(use_with quiche)
562 + $(use_with rtmp librtmp)
563 + --without-rustls
564 + --without-schannel
565 + --without-secure-transport
566 + --without-winidn
567 + --without-wolfssl
568 + --with-zlib
569 + $(use_with zstd)
570 + )
571 +
572 + ECONF_SOURCE="${S}" \
573 + econf "${myconf[@]}"
574 +
575 + if ! multilib_is_native_abi; then
576 + # avoid building the client
577 + sed -i -e '/SUBDIRS/s:src::' Makefile || die
578 + sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
579 + fi
580 +
581 + # Fix up the pkg-config file to be more robust.
582 + # https://github.com/curl/curl/issues/864
583 + local priv=() libs=()
584 + # We always enable zlib.
585 + libs+=( "-lz" )
586 + priv+=( "zlib" )
587 + if use http2; then
588 + libs+=( "-lnghttp2" )
589 + priv+=( "libnghttp2" )
590 + fi
591 + if use quiche; then
592 + libs+=( "-lquiche" )
593 + priv+=( "quiche" )
594 + fi
595 + if use nghttp3; then
596 + libs+=( "-lnghttp3" "-lngtcp2" )
597 + priv+=( "libnghttp3" "-libtcp2" )
598 + fi
599 + if use ssl && use curl_ssl_openssl; then
600 + libs+=( "-lssl" "-lcrypto" )
601 + priv+=( "openssl" )
602 + fi
603 + grep -q Requires.private libcurl.pc && die "need to update ebuild"
604 + libs=$(printf '|%s' "${libs[@]}")
605 + sed -i -r \
606 + -e "/^Libs.private/s:(${libs#|})( |$)::g" \
607 + libcurl.pc || die
608 + echo "Requires.private: ${priv[*]}" >> libcurl.pc
609 +}
610 +
611 +multilib_src_test() {
612 + # See https://github.com/curl/curl/blob/master/tests/runtests.pl#L5721
613 + # -n: no valgrind (unreliable in sandbox and doesn't work correctly on all arches)
614 + # -v: verbose
615 + # -a: keep going on failure (so we see everything which breaks, not just 1st test)
616 + # -k: keep test files after completion
617 + # -am: automake style TAP output
618 + # -p: print logs if test fails
619 + # Note: if needed, we can disable tests. See e.g. Fedora's packaging
620 + # or just read https://github.com/curl/curl/tree/master/tests#run.
621 + multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p"
622 +}
623 +
624 +multilib_src_install_all() {
625 + einstalldocs
626 + find "${ED}" -type f -name '*.la' -delete || die
627 + rm -rf "${ED}"/etc/ || die
628 +}
629
630 diff --git a/net-misc/curl/metadata.xml b/net-misc/curl/metadata.xml
631 index 22b15ab2126b..a6e835644b81 100644
632 --- a/net-misc/curl/metadata.xml
633 +++ b/net-misc/curl/metadata.xml
634 @@ -28,6 +28,7 @@
635 <flag name="sslv3">Support for the old/insecure SSLv3 protocol</flag>
636 <flag name="telnet">Enable Telnet protocol support</flag>
637 <flag name="tftp">Enable TFTP support</flag>
638 + <flag name="winssl">Enable winssl ssl backend</flag>
639 <flag name="zstd">Enable zstd compression</flag>
640 </use>
641 <upstream>