1 |
commit: 63e8df087bb3463c01494e4c4cf3292691e44395 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 15 20:05:45 2015 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 15 20:06:00 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63e8df08 |
7 |
|
8 |
net-misc/curl: add mbedtls support |
9 |
|
10 |
Package-Manager: portage-2.2.24 |
11 |
|
12 |
net-misc/curl/curl-7.46.0-r1.ebuild | 236 ++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 236 insertions(+) |
14 |
|
15 |
diff --git a/net-misc/curl/curl-7.46.0-r1.ebuild b/net-misc/curl/curl-7.46.0-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..af08d5d |
18 |
--- /dev/null |
19 |
+++ b/net-misc/curl/curl-7.46.0-r1.ebuild |
20 |
@@ -0,0 +1,236 @@ |
21 |
+# Copyright 1999-2015 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI="5" |
26 |
+ |
27 |
+inherit autotools eutils prefix multilib-minimal |
28 |
+ |
29 |
+DESCRIPTION="A Client that groks URLs" |
30 |
+HOMEPAGE="http://curl.haxx.se/" |
31 |
+SRC_URI="http://curl.haxx.se/download/${P}.tar.bz2" |
32 |
+ |
33 |
+LICENSE="MIT" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
36 |
+IUSE="adns http2 idn ipv6 kerberos ldap metalink rtmp samba ssh ssl static-libs test threads" |
37 |
+IUSE+=" curl_ssl_axtls curl_ssl_gnutls curl_ssl_libressl curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl curl_ssl_polarssl curl_ssl_winssl" |
38 |
+IUSE+=" elibc_Winnt" |
39 |
+ |
40 |
+#lead to lots of false negatives, bug #285669 |
41 |
+RESTRICT="test" |
42 |
+ |
43 |
+RDEPEND="ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
44 |
+ ssl? ( |
45 |
+ curl_ssl_axtls? ( |
46 |
+ net-libs/axtls[${MULTILIB_USEDEP}] |
47 |
+ app-misc/ca-certificates |
48 |
+ ) |
49 |
+ curl_ssl_gnutls? ( |
50 |
+ net-libs/gnutls:0=[static-libs?,${MULTILIB_USEDEP}] |
51 |
+ dev-libs/nettle:0=[${MULTILIB_USEDEP}] |
52 |
+ app-misc/ca-certificates |
53 |
+ ) |
54 |
+ curl_ssl_libressl? ( |
55 |
+ dev-libs/libressl[static-libs?,${MULTILIB_USEDEP}] |
56 |
+ ) |
57 |
+ curl_ssl_mbedtls? ( |
58 |
+ net-libs/mbedtls:0=[${MULTILIB_USEDEP}] |
59 |
+ app-misc/ca-certificates |
60 |
+ ) |
61 |
+ curl_ssl_openssl? ( |
62 |
+ dev-libs/openssl:0[static-libs?,${MULTILIB_USEDEP}] |
63 |
+ ) |
64 |
+ curl_ssl_nss? ( |
65 |
+ dev-libs/nss:0[${MULTILIB_USEDEP}] |
66 |
+ app-misc/ca-certificates |
67 |
+ ) |
68 |
+ curl_ssl_polarssl? ( |
69 |
+ net-libs/polarssl:0=[${MULTILIB_USEDEP}] |
70 |
+ app-misc/ca-certificates |
71 |
+ ) |
72 |
+ ) |
73 |
+ http2? ( net-libs/nghttp2[${MULTILIB_USEDEP}] ) |
74 |
+ idn? ( net-dns/libidn: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[static-libs?,${MULTILIB_USEDEP}] ) |
80 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
81 |
+ abi_x86_32? ( |
82 |
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r13 |
83 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
84 |
+ )" |
85 |
+ |
86 |
+# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303 |
87 |
+# rtmp? ( |
88 |
+# media-video/rtmpdump |
89 |
+# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] ) |
90 |
+# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] ) |
91 |
+# ) |
92 |
+ |
93 |
+# ssl providers to be added: |
94 |
+# fbopenssl $(use_with spnego) |
95 |
+ |
96 |
+DEPEND="${RDEPEND} |
97 |
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] |
98 |
+ test? ( |
99 |
+ sys-apps/diffutils |
100 |
+ dev-lang/perl |
101 |
+ )" |
102 |
+ |
103 |
+# c-ares must be disabled for threads |
104 |
+# only one ssl provider can be enabled |
105 |
+REQUIRED_USE=" |
106 |
+ curl_ssl_winssl? ( elibc_Winnt ) |
107 |
+ threads? ( !adns ) |
108 |
+ ssl? ( |
109 |
+ ^^ ( |
110 |
+ curl_ssl_axtls |
111 |
+ curl_ssl_gnutls |
112 |
+ curl_ssl_libressl |
113 |
+ curl_ssl_mbedtls |
114 |
+ curl_ssl_nss |
115 |
+ curl_ssl_openssl |
116 |
+ curl_ssl_polarssl |
117 |
+ curl_ssl_winssl |
118 |
+ ) |
119 |
+ )" |
120 |
+ |
121 |
+DOCS=( CHANGES README docs/FEATURES docs/INTERNALS \ |
122 |
+ docs/MANUAL docs/FAQ docs/BUGS docs/CONTRIBUTE ) |
123 |
+ |
124 |
+MULTILIB_WRAPPED_HEADERS=( |
125 |
+ /usr/include/curl/curlbuild.h |
126 |
+) |
127 |
+ |
128 |
+MULTILIB_CHOST_TOOLS=( |
129 |
+ /usr/bin/curl-config |
130 |
+) |
131 |
+ |
132 |
+src_prepare() { |
133 |
+ epatch \ |
134 |
+ "${FILESDIR}"/${PN}-7.30.0-prefix.patch \ |
135 |
+ "${FILESDIR}"/${PN}-respect-cflags-3.patch \ |
136 |
+ "${FILESDIR}"/${PN}-fix-gnutls-nettle.patch |
137 |
+ |
138 |
+ sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241 |
139 |
+ |
140 |
+ epatch_user |
141 |
+ eprefixify curl-config.in |
142 |
+ eautoreconf |
143 |
+} |
144 |
+ |
145 |
+multilib_src_configure() { |
146 |
+ einfo "\033[1;32m**************************************************\033[00m" |
147 |
+ |
148 |
+ # We make use of the fact that later flags override earlier ones |
149 |
+ # So start with all ssl providers off until proven otherwise |
150 |
+ local myconf=() |
151 |
+ myconf+=( --without-axtls --without-gnutls --without-mbedtls --without-nss --without-polarssl --without-ssl --without-winssl ) |
152 |
+ myconf+=( --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt ) |
153 |
+ if use ssl ; then |
154 |
+ if use curl_ssl_axtls; then |
155 |
+ einfo "SSL provided by axtls" |
156 |
+ myconf+=( --with-axtls ) |
157 |
+ elif use curl_ssl_gnutls; then |
158 |
+ einfo "SSL provided by gnutls" |
159 |
+ myconf+=( --with-gnutls --with-nettle ) |
160 |
+ elif use curl_ssl_libressl; then |
161 |
+ einfo "SSL provided by LibreSSL" |
162 |
+ myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs ) |
163 |
+ elif use curl_ssl_mbedtls; then |
164 |
+ einfo "SSL provided by mbedtls" |
165 |
+ myconf+=( --with-mbedtls ) |
166 |
+ elif use curl_ssl_nss; then |
167 |
+ einfo "SSL provided by nss" |
168 |
+ myconf+=( --with-nss ) |
169 |
+ elif use curl_ssl_polarssl; then |
170 |
+ einfo "SSL provided by polarssl" |
171 |
+ myconf+=( --with-polarssl ) |
172 |
+ elif use curl_ssl_openssl; then |
173 |
+ einfo "SSL provided by openssl" |
174 |
+ myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs ) |
175 |
+ elif use curl_ssl_winssl; then |
176 |
+ einfo "SSL provided by Windows" |
177 |
+ myconf+=( --with-winssl ) |
178 |
+ else |
179 |
+ eerror "We can't be here because of REQUIRED_USE." |
180 |
+ fi |
181 |
+ else |
182 |
+ einfo "SSL disabled" |
183 |
+ fi |
184 |
+ einfo "\033[1;32m**************************************************\033[00m" |
185 |
+ |
186 |
+ # These configuration options are organized alphabetically |
187 |
+ # within each category. This should make it easier if we |
188 |
+ # ever decide to make any of them contingent on USE flags: |
189 |
+ # 1) protocols first. To see them all do |
190 |
+ # 'grep SUPPORT_PROTOCOLS configure.ac' |
191 |
+ # 2) --enable/disable options second. |
192 |
+ # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort |
193 |
+ # 3) --with/without options third. |
194 |
+ # grep -- --with configure | grep Check | awk '{ print $4 }' | sort |
195 |
+ ECONF_SOURCE="${S}" \ |
196 |
+ econf \ |
197 |
+ --enable-crypto-auth \ |
198 |
+ --enable-dict \ |
199 |
+ --enable-file \ |
200 |
+ --enable-ftp \ |
201 |
+ --enable-gopher \ |
202 |
+ --enable-http \ |
203 |
+ --enable-imap \ |
204 |
+ $(use_enable ldap) \ |
205 |
+ $(use_enable ldap ldaps) \ |
206 |
+ --disable-ntlm-wb \ |
207 |
+ --enable-pop3 \ |
208 |
+ --enable-rt \ |
209 |
+ --enable-rtsp \ |
210 |
+ $(use_enable samba smb) \ |
211 |
+ $(use_with ssh libssh2) \ |
212 |
+ --enable-smtp \ |
213 |
+ --enable-telnet \ |
214 |
+ --enable-tftp \ |
215 |
+ --enable-tls-srp \ |
216 |
+ $(use_enable adns ares) \ |
217 |
+ --enable-cookies \ |
218 |
+ --enable-hidden-symbols \ |
219 |
+ $(use_enable ipv6) \ |
220 |
+ --enable-largefile \ |
221 |
+ --without-libpsl \ |
222 |
+ --enable-manual \ |
223 |
+ --enable-proxy \ |
224 |
+ --disable-soname-bump \ |
225 |
+ --disable-sspi \ |
226 |
+ $(use_enable static-libs static) \ |
227 |
+ $(use_enable threads threaded-resolver) \ |
228 |
+ --disable-versioned-symbols \ |
229 |
+ --without-cyassl \ |
230 |
+ --without-darwinssl \ |
231 |
+ $(use_with idn libidn) \ |
232 |
+ $(use_with kerberos gssapi "${EPREFIX}"/usr) \ |
233 |
+ $(use_with metalink libmetalink) \ |
234 |
+ $(use_with http2 nghttp2) \ |
235 |
+ $(use_with rtmp librtmp) \ |
236 |
+ --without-spnego \ |
237 |
+ --without-winidn \ |
238 |
+ --with-zlib \ |
239 |
+ "${myconf[@]}" |
240 |
+ |
241 |
+ if ! multilib_is_native_abi; then |
242 |
+ # avoid building the client |
243 |
+ sed -i -e '/SUBDIRS/s:src::' Makefile || die |
244 |
+ fi |
245 |
+} |
246 |
+ |
247 |
+multilib_src_install_all() { |
248 |
+ einstalldocs |
249 |
+ prune_libtool_files --all |
250 |
+ |
251 |
+ rm -rf "${ED}"/etc/ |
252 |
+ |
253 |
+ # https://sourceforge.net/tracker/index.php?func=detail&aid=1705197&group_id=976&atid=350976 |
254 |
+ insinto /usr/share/aclocal |
255 |
+ doins docs/libcurl/libcurl.m4 |
256 |
+} |