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