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