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