Gentoo Archives: gentoo-commits

From: Craig Andrews <candrews@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/curl/
Date: Thu, 25 Oct 2018 13:44:12
Message-Id: 1540475013.3261f5fdb0b28279641716cabf589ff7fb9d77d2.candrews@gentoo
1 commit: 3261f5fdb0b28279641716cabf589ff7fb9d77d2
2 Author: Craig Andrews <candrews <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 25 13:43:33 2018 +0000
4 Commit: Craig Andrews <candrews <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 25 13:43:33 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3261f5fd
7
8 net-misc/curl: make brotli dependency multilib
9
10 Closes: https://bugs.gentoo.org/650104
11 Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13
14 net-misc/curl/curl-7.61.1-r1.ebuild | 247 ++++++++++++++++++++++++++++++++++++
15 1 file changed, 247 insertions(+)
16
17 diff --git a/net-misc/curl/curl-7.61.1-r1.ebuild b/net-misc/curl/curl-7.61.1-r1.ebuild
18 new file mode 100644
19 index 00000000000..d13d87e7796
20 --- /dev/null
21 +++ b/net-misc/curl/curl-7.61.1-r1.ebuild
22 @@ -0,0 +1,247 @@
23 +# Copyright 1999-2018 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI="6"
27 +
28 +inherit autotools eutils prefix multilib-minimal
29 +
30 +DESCRIPTION="A Client that groks URLs"
31 +HOMEPAGE="https://curl.haxx.se/"
32 +SRC_URI="https://curl.haxx.se/download/${P}.tar.bz2"
33 +
34 +LICENSE="MIT"
35 +SLOT="0"
36 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
37 +IUSE="adns brotli http2 idn ipv6 kerberos ldap metalink rtmp samba ssh ssl static-libs test threads"
38 +IUSE+=" curl_ssl_axtls curl_ssl_gnutls curl_ssl_libressl curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl curl_ssl_winssl"
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_axtls? (
48 + net-libs/axtls:0=[${MULTILIB_USEDEP}]
49 + app-misc/ca-certificates
50 + )
51 + curl_ssl_gnutls? (
52 + net-libs/gnutls:0=[static-libs?,${MULTILIB_USEDEP}]
53 + dev-libs/nettle:0=[${MULTILIB_USEDEP}]
54 + app-misc/ca-certificates
55 + )
56 + curl_ssl_libressl? (
57 + dev-libs/libressl:0=[static-libs?,${MULTILIB_USEDEP}]
58 + )
59 + curl_ssl_mbedtls? (
60 + net-libs/mbedtls:0=[${MULTILIB_USEDEP}]
61 + app-misc/ca-certificates
62 + )
63 + curl_ssl_openssl? (
64 + dev-libs/openssl:0=[static-libs?,${MULTILIB_USEDEP}]
65 + )
66 + curl_ssl_nss? (
67 + dev-libs/nss:0[${MULTILIB_USEDEP}]
68 + app-misc/ca-certificates
69 + )
70 + )
71 + http2? ( net-libs/nghttp2[${MULTILIB_USEDEP}] )
72 + idn? ( net-dns/libidn2:0[static-libs?,${MULTILIB_USEDEP}] )
73 + adns? ( net-dns/c-ares:0[${MULTILIB_USEDEP}] )
74 + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
75 + metalink? ( >=media-libs/libmetalink-0.1.1[${MULTILIB_USEDEP}] )
76 + rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
77 + ssh? ( net-libs/libssh2[static-libs?,${MULTILIB_USEDEP}] )
78 + sys-libs/zlib[${MULTILIB_USEDEP}]"
79 +
80 +# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
81 +# rtmp? (
82 +# media-video/rtmpdump
83 +# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
84 +# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
85 +# )
86 +
87 +# ssl providers to be added:
88 +# fbopenssl $(use_with spnego)
89 +
90 +DEPEND="${RDEPEND}
91 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
92 + test? (
93 + sys-apps/diffutils
94 + dev-lang/perl
95 + )"
96 +
97 +# c-ares must be disabled for threads
98 +# only one ssl provider can be enabled
99 +REQUIRED_USE="
100 + curl_ssl_winssl? ( elibc_Winnt )
101 + threads? ( !adns )
102 + ssl? (
103 + ^^ (
104 + curl_ssl_axtls
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/MANUAL 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 +
132 + eapply_user
133 + eprefixify curl-config.in
134 + eautoreconf
135 +
136 + if [[ ${CHOST} == *-darwin17 ]] ; then
137 + # https://bugs.gentoo.org/show_bug.cgi?id=637252
138 + sed -i -e '/-Werror=partial-availability/s/Werror/Wno-error/g' \
139 + configure || die
140 + fi
141 +}
142 +
143 +multilib_src_configure() {
144 + # We make use of the fact that later flags override earlier ones
145 + # So start with all ssl providers off until proven otherwise
146 + # TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
147 + local myconf=()
148 + myconf+=( --without-axtls --without-gnutls --without-mbedtls --without-nss --without-polarssl --without-ssl --without-winssl )
149 + myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
150 + if use ssl ; then
151 + if use curl_ssl_axtls; then
152 + einfo "SSL provided by axtls"
153 + myconf+=( --with-axtls )
154 + elif use curl_ssl_gnutls; then
155 + einfo "SSL provided by gnutls"
156 + myconf+=( --with-gnutls --with-nettle )
157 + elif use curl_ssl_libressl; then
158 + einfo "SSL provided by LibreSSL"
159 + myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
160 + elif use curl_ssl_mbedtls; then
161 + einfo "SSL provided by mbedtls"
162 + myconf+=( --with-mbedtls )
163 + elif use curl_ssl_nss; then
164 + einfo "SSL provided by nss"
165 + myconf+=( --with-nss )
166 + elif use curl_ssl_openssl; then
167 + einfo "SSL provided by openssl"
168 + myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
169 + elif use curl_ssl_winssl; then
170 + einfo "SSL provided by Windows"
171 + myconf+=( --with-winssl )
172 + else
173 + eerror "We can't be here because of REQUIRED_USE."
174 + fi
175 + else
176 + einfo "SSL disabled"
177 + fi
178 +
179 + # These configuration options are organized alphabetically
180 + # within each category. This should make it easier if we
181 + # ever decide to make any of them contingent on USE flags:
182 + # 1) protocols first. To see them all do
183 + # 'grep SUPPORT_PROTOCOLS configure.ac'
184 + # 2) --enable/disable options second.
185 + # 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
186 + # 3) --with/without options third.
187 + # grep -- --with configure | grep Check | awk '{ print $4 }' | sort
188 + ECONF_SOURCE="${S}" \
189 + econf \
190 + --enable-crypto-auth \
191 + --enable-dict \
192 + --enable-file \
193 + --enable-ftp \
194 + --enable-gopher \
195 + --enable-http \
196 + --enable-imap \
197 + $(use_enable ldap) \
198 + $(use_enable ldap ldaps) \
199 + --disable-ntlm-wb \
200 + --enable-pop3 \
201 + --enable-rt \
202 + --enable-rtsp \
203 + $(use_enable samba smb) \
204 + $(use_with ssh libssh2) \
205 + --enable-smtp \
206 + --enable-telnet \
207 + --enable-tftp \
208 + --enable-tls-srp \
209 + $(use_enable adns ares) \
210 + --enable-cookies \
211 + --enable-hidden-symbols \
212 + $(use_enable ipv6) \
213 + --enable-largefile \
214 + --without-libpsl \
215 + --enable-manual \
216 + --enable-proxy \
217 + --disable-sspi \
218 + $(use_enable static-libs static) \
219 + $(use_enable threads threaded-resolver) \
220 + $(use_enable threads pthreads) \
221 + --disable-versioned-symbols \
222 + --without-cyassl \
223 + --without-darwinssl \
224 + $(use_with idn libidn2) \
225 + $(use_with kerberos gssapi "${EPREFIX}"/usr) \
226 + $(use_with metalink libmetalink) \
227 + $(use_with http2 nghttp2) \
228 + $(use_with rtmp librtmp) \
229 + $(use_with brotli) \
230 + --without-spnego \
231 + --without-winidn \
232 + --without-wolfssl \
233 + --with-zlib \
234 + "${myconf[@]}"
235 +
236 + if ! multilib_is_native_abi; then
237 + # avoid building the client
238 + sed -i -e '/SUBDIRS/s:src::' Makefile || die
239 + sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
240 + fi
241 +
242 + # Fix up the pkg-config file to be more robust.
243 + # https://github.com/curl/curl/issues/864
244 + local priv=() libs=()
245 + # We always enable zlib.
246 + libs+=( "-lz" )
247 + priv+=( "zlib" )
248 + if use http2; then
249 + libs+=( "-lnghttp2" )
250 + priv+=( "libnghttp2" )
251 + fi
252 + if use ssl && use curl_ssl_openssl; then
253 + libs+=( "-lssl" "-lcrypto" )
254 + priv+=( "openssl" )
255 + fi
256 + grep -q Requires.private libcurl.pc && die "need to update ebuild"
257 + libs=$(printf '|%s' "${libs[@]}")
258 + sed -i -r \
259 + -e "/^Libs.private/s:(${libs#|})( |$)::g" \
260 + libcurl.pc || die
261 + echo "Requires.private: ${priv[*]}" >> libcurl.pc
262 +}
263 +
264 +multilib_src_install_all() {
265 + einstalldocs
266 + prune_libtool_files --all
267 +
268 + rm -rf "${ED}"/etc/
269 +}