Gentoo Archives: gentoo-commits

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