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: Wed, 10 Feb 2021 22:42:51
Message-Id: 1612996963.1a705d5bd7b9cd6a4a14327384b3b40ffa3383e5.blueness@gentoo
1 commit: 1a705d5bd7b9cd6a4a14327384b3b40ffa3383e5
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 10 22:42:25 2021 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 10 22:42:43 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a705d5b
7
8 net-misc/curl: version bump to 7.75.0
9
10 Package-Manager: Portage-3.0.13, Repoman-3.0.2
11 Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
12
13 net-misc/curl/Manifest | 1 +
14 net-misc/curl/curl-7.75.0.ebuild | 290 +++++++++++++++++++++++++++++++++++++++
15 2 files changed, 291 insertions(+)
16
17 diff --git a/net-misc/curl/Manifest b/net-misc/curl/Manifest
18 index 199a2e051d7..dc8ebff8352 100644
19 --- a/net-misc/curl/Manifest
20 +++ b/net-misc/curl/Manifest
21 @@ -1 +1,2 @@
22 DIST curl-7.74.0.tar.xz 2400972 BLAKE2B bef9e01493994afc933549a78b41065708aeaa9f6f5cdd1dbf2f43bbb03bbc97b17308b8bda5f11599c3cc0c6c77903e6fa6f1310ff874fad902a59566b51e8a SHA512 5d987f0b4d051c9e254f14d4e2a05f7cda9fb0f0ac7b3ca3664a25a51ee5ffe092ee072c0d9a613fcd3f34727d75bba14b70f5500cb110ca818591e071c3e6f4
23 +DIST curl-7.75.0.tar.xz 2418816 BLAKE2B 74889ede1b57a6685eef0f504d4c261c0b271b36ab3290bfc895efe9a6fffe4bfd433eaae438cd2b54a920671a2ebc2ca5e73bd88f6be40b4f46ef281028f1d8 SHA512 4c2fc6658379b8b93dd50665b70f3000b63d3bcafd2df60b7e651a8edf4735b3decb06c338b84cb22058191aa9f8f4dc85760a42f9987210b59300758304b746
24
25 diff --git a/net-misc/curl/curl-7.75.0.ebuild b/net-misc/curl/curl-7.75.0.ebuild
26 new file mode 100644
27 index 00000000000..89cefa1028f
28 --- /dev/null
29 +++ b/net-misc/curl/curl-7.75.0.ebuild
30 @@ -0,0 +1,290 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI="7"
35 +
36 +inherit autotools prefix multilib-minimal
37 +
38 +DESCRIPTION="A Client that groks URLs"
39 +HOMEPAGE="https://curl.haxx.se/"
40 +SRC_URI="https://curl.haxx.se/download/${P}.tar.xz"
41 +
42 +LICENSE="curl"
43 +SLOT="0"
44 +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"
45 +IUSE="adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap ipv6 kerberos ldap mbedtls metalink nss +openssl +pop3 +progress-meter rtmp samba +smtp ssh ssl sslv3 static-libs test telnet +tftp threads winssl zstd"
46 +IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl curl_ssl_winssl"
47 +IUSE+=" nghttp3 quiche"
48 +IUSE+=" elibc_Winnt"
49 +
50 +# c-ares must be disabled for threads
51 +# only one default ssl provider can be enabled
52 +REQUIRED_USE="
53 + winssl? ( elibc_Winnt )
54 + threads? ( !adns )
55 + ssl? (
56 + ^^ (
57 + curl_ssl_gnutls
58 + curl_ssl_mbedtls
59 + curl_ssl_nss
60 + curl_ssl_openssl
61 + curl_ssl_winssl
62 + )
63 + )"
64 +
65 +# lead to lots of false negatives, bug #285669
66 +RESTRICT="!test? ( test )"
67 +
68 +RDEPEND="ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
69 + brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
70 + ssl? (
71 + gnutls? (
72 + net-libs/gnutls:0=[static-libs?,${MULTILIB_USEDEP}]
73 + dev-libs/nettle:0=[${MULTILIB_USEDEP}]
74 + app-misc/ca-certificates
75 + )
76 + mbedtls? (
77 + net-libs/mbedtls:0=[${MULTILIB_USEDEP}]
78 + app-misc/ca-certificates
79 + )
80 + openssl? (
81 + dev-libs/openssl:0=[sslv3=,static-libs?,${MULTILIB_USEDEP}]
82 + )
83 + nss? (
84 + dev-libs/nss:0[${MULTILIB_USEDEP}]
85 + app-misc/ca-certificates
86 + )
87 + )
88 + http2? ( net-libs/nghttp2[${MULTILIB_USEDEP}] )
89 + nghttp3? (
90 + net-libs/nghttp3[${MULTILIB_USEDEP}]
91 + net-libs/ngtcp2[ssl,${MULTILIB_USEDEP}]
92 + )
93 + quiche? ( >=net-libs/quiche-0.3.0[${MULTILIB_USEDEP}] )
94 + idn? ( net-dns/libidn2:0=[static-libs?,${MULTILIB_USEDEP}] )
95 + adns? ( net-dns/c-ares:0[${MULTILIB_USEDEP}] )
96 + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
97 + metalink? ( >=media-libs/libmetalink-0.1.1[${MULTILIB_USEDEP}] )
98 + rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
99 + ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] )
100 + sys-libs/zlib[${MULTILIB_USEDEP}]
101 + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )"
102 +
103 +# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
104 +# rtmp? (
105 +# media-video/rtmpdump
106 +# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
107 +# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
108 +# )
109 +
110 +# ssl providers to be added:
111 +# fbopenssl $(use_with spnego)
112 +
113 +DEPEND="${RDEPEND}"
114 +BDEPEND="virtual/pkgconfig
115 + test? (
116 + sys-apps/diffutils
117 + dev-lang/perl
118 + )"
119 +
120 +DOCS=( CHANGES README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} )
121 +
122 +MULTILIB_WRAPPED_HEADERS=(
123 + /usr/include/curl/curlbuild.h
124 +)
125 +
126 +MULTILIB_CHOST_TOOLS=(
127 + /usr/bin/curl-config
128 +)
129 +
130 +PATCHES=(
131 + "${FILESDIR}"/${PN}-7.30.0-prefix.patch
132 + "${FILESDIR}"/${PN}-respect-cflags-3.patch
133 + "${FILESDIR}"/${PN}-fix-gnutls-nettle.patch
134 +)
135 +
136 +src_prepare() {
137 + default
138 +
139 + sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241
140 + sed -i '/CURL_MAC_CFLAGS/d' configure.ac || die #637252
141 +
142 + eprefixify curl-config.in
143 + eautoreconf
144 +}
145 +
146 +multilib_src_configure() {
147 + # We make use of the fact that later flags override earlier ones
148 + # So start with all ssl providers off until proven otherwise
149 + # TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
150 + local myconf=()
151 +
152 + myconf+=( --without-gnutls --without-mbedtls --without-nss --without-polarssl --without-ssl --without-winssl )
153 + myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
154 + #myconf+=( --without-default-ssl-backend )
155 + if use ssl ; then
156 + if use gnutls || use curl_ssl_gnutls; then
157 + einfo "SSL provided by gnutls"
158 + myconf+=( --with-gnutls --with-nettle )
159 + fi
160 + if use mbedtls || use curl_ssl_mbedtls; then
161 + einfo "SSL provided by mbedtls"
162 + myconf+=( --with-mbedtls )
163 + fi
164 + if use nss || use curl_ssl_nss; then
165 + einfo "SSL provided by nss"
166 + myconf+=( --with-nss )
167 + fi
168 + if use openssl || use curl_ssl_openssl; then
169 + einfo "SSL provided by openssl"
170 + myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
171 + fi
172 + if use winssl || use curl_ssl_winssl; then
173 + einfo "SSL provided by Windows"
174 + myconf+=( --with-winssl )
175 + fi
176 +
177 + if use curl_ssl_gnutls; then
178 + einfo "Default SSL provided by gnutls"
179 + myconf+=( --with-default-ssl-backend=gnutls )
180 + elif use curl_ssl_mbedtls; then
181 + einfo "Default SSL provided by mbedtls"
182 + myconf+=( --with-default-ssl-backend=mbedtls )
183 + elif use curl_ssl_nss; then
184 + einfo "Default SSL provided by nss"
185 + myconf+=( --with-default-ssl-backend=nss )
186 + elif use curl_ssl_openssl; then
187 + einfo "Default SSL provided by openssl"
188 + myconf+=( --with-default-ssl-backend=openssl )
189 + elif use curl_ssl_winssl; then
190 + einfo "Default SSL provided by Windows"
191 + myconf+=( --with-default-ssl-backend=winssl )
192 + else
193 + eerror "We can't be here because of REQUIRED_USE."
194 + fi
195 +
196 + else
197 + einfo "SSL disabled"
198 + fi
199 +
200 + # These configuration options are organized alphabetically
201 + # within each category. This should make it easier if we
202 + # ever decide to make any of them contingent on USE flags:
203 + # 1) protocols first. To see them all do
204 + # 'grep SUPPORT_PROTOCOLS configure.ac'
205 + # 2) --enable/disable options second.
206 + # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
207 + # 3) --with/without options third.
208 + # grep -- --with configure | grep Check | awk '{ print $4 }' | sort
209 +
210 + myconf+=(
211 + $(use_enable alt-svc)
212 + --enable-crypto-auth
213 + --enable-dict
214 + --disable-ech
215 + --enable-file
216 + $(use_enable ftp)
217 + $(use_enable gopher)
218 + $(use_enable hsts)
219 + --enable-http
220 + $(use_enable imap)
221 + $(use_enable ldap)
222 + $(use_enable ldap ldaps)
223 + --disable-ntlm-wb
224 + $(use_enable pop3)
225 + --enable-rt
226 + --enable-rtsp
227 + $(use_enable samba smb)
228 + $(use_with ssh libssh2)
229 + $(use_enable smtp)
230 + $(use_enable telnet)
231 + $(use_enable tftp)
232 + --enable-tls-srp
233 + $(use_enable adns ares)
234 + --enable-cookies
235 + --enable-dateparse
236 + --enable-dnsshuffle
237 + --enable-doh
238 + --enable-hidden-symbols
239 + --enable-http-auth
240 + $(use_enable ipv6)
241 + --enable-largefile
242 + --enable-manual
243 + --enable-mime
244 + --enable-netrc
245 + $(use_enable progress-meter)
246 + --enable-proxy
247 + --disable-sspi
248 + $(use_enable static-libs static)
249 + $(use_enable threads threaded-resolver)
250 + $(use_enable threads pthreads)
251 + --disable-versioned-symbols
252 + --without-amissl
253 + --without-bearssl
254 + --without-cyassl
255 + --without-darwinssl
256 + --without-fish-functions-dir
257 + --without-hyper
258 + $(use_with idn libidn2)
259 + $(use_with kerberos gssapi "${EPREFIX}"/usr)
260 + $(use_with metalink libmetalink)
261 + $(use_with http2 nghttp2)
262 + --without-libpsl
263 + $(use_with nghttp3)
264 + $(use_with nghttp3 ngtcp2)
265 + $(use_with quiche)
266 + $(use_with rtmp librtmp)
267 + $(use_with brotli)
268 + --without-schannel
269 + --without-secure-transport
270 + --without-spnego
271 + --without-winidn
272 + --without-wolfssl
273 + --with-zlib
274 + $(use_with zstd)
275 + )
276 +
277 + ECONF_SOURCE="${S}" \
278 + econf "${myconf[@]}"
279 +
280 + if ! multilib_is_native_abi; then
281 + # avoid building the client
282 + sed -i -e '/SUBDIRS/s:src::' Makefile || die
283 + sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
284 + fi
285 +
286 + # Fix up the pkg-config file to be more robust.
287 + # https://github.com/curl/curl/issues/864
288 + local priv=() libs=()
289 + # We always enable zlib.
290 + libs+=( "-lz" )
291 + priv+=( "zlib" )
292 + if use http2; then
293 + libs+=( "-lnghttp2" )
294 + priv+=( "libnghttp2" )
295 + fi
296 + if use quiche; then
297 + libs+=( "-lquiche" )
298 + priv+=( "quiche" )
299 + fi
300 + if use nghttp3; then
301 + libs+=( "-lnghttp3" "-lngtcp2" )
302 + priv+=( "libnghttp3" "-libtcp2" )
303 + fi
304 + if use ssl && use curl_ssl_openssl; then
305 + libs+=( "-lssl" "-lcrypto" )
306 + priv+=( "openssl" )
307 + fi
308 + grep -q Requires.private libcurl.pc && die "need to update ebuild"
309 + libs=$(printf '|%s' "${libs[@]}")
310 + sed -i -r \
311 + -e "/^Libs.private/s:(${libs#|})( |$)::g" \
312 + libcurl.pc || die
313 + echo "Requires.private: ${priv[*]}" >> libcurl.pc
314 +}
315 +
316 +multilib_src_install_all() {
317 + einstalldocs
318 + find "${ED}" -type f -name '*.la' -delete || die
319 + rm -rf "${ED}"/etc/ || die
320 +}