| 1 |
blueness |
1.1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
jer |
1.10 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/curl/curl-7.25.0-r1.ebuild,v 1.9 2012/06/18 10:22:51 ago Exp $ |
| 4 |
blueness |
1.1 |
|
| 5 |
|
|
EAPI="4" |
| 6 |
|
|
|
| 7 |
|
|
inherit autotools eutils prefix |
| 8 |
|
|
|
| 9 |
|
|
DESCRIPTION="A Client that groks URLs" |
| 10 |
|
|
HOMEPAGE="http://curl.haxx.se/" |
| 11 |
|
|
SRC_URI="http://curl.haxx.se/download/${P}.tar.bz2" |
| 12 |
|
|
|
| 13 |
|
|
LICENSE="MIT" |
| 14 |
|
|
SLOT="0" |
| 15 |
jer |
1.10 |
KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~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 ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
| 16 |
blueness |
1.1 |
IUSE="ares idn ipv6 kerberos ldap ssh ssl static-libs test threads" |
| 17 |
|
|
IUSE="${IUSE} curl_ssl_axtls curl_ssl_cyassl curl_ssl_gnutls curl_ssl_nss +curl_ssl_openssl curl_ssl_polarssl" |
| 18 |
|
|
|
| 19 |
blueness |
1.8 |
#lead to lots of false negatives, bug #285669 |
| 20 |
|
|
RESTRICT="test" |
| 21 |
|
|
|
| 22 |
blueness |
1.1 |
RDEPEND="ldap? ( net-nds/openldap ) |
| 23 |
|
|
ssl? ( |
| 24 |
blueness |
1.5 |
curl_ssl_axtls? ( net-libs/axtls app-misc/ca-certificates ) |
| 25 |
blueness |
1.1 |
curl_ssl_gnutls? ( |
| 26 |
|
|
|| ( |
| 27 |
blueness |
1.3 |
( >=net-libs/gnutls-3[static-libs?] dev-libs/nettle ) |
| 28 |
|
|
( =net-libs/gnutls-2.12*[nettle,static-libs?] dev-libs/nettle ) |
| 29 |
|
|
( =net-libs/gnutls-2.12*[-nettle,static-libs?] dev-libs/libgcrypt[static-libs?] ) |
| 30 |
|
|
( <net-libs/gnutls-2.12 dev-libs/libgcrypt[static-libs?] ) |
| 31 |
blueness |
1.1 |
) |
| 32 |
blueness |
1.3 |
app-misc/ca-certificates |
| 33 |
blueness |
1.1 |
) |
| 34 |
|
|
curl_ssl_openssl? ( dev-libs/openssl[static-libs?] ) |
| 35 |
|
|
curl_ssl_nss? ( dev-libs/nss app-misc/ca-certificates ) |
| 36 |
|
|
curl_ssl_polarssl? ( net-libs/polarssl app-misc/ca-certificates ) |
| 37 |
|
|
) |
| 38 |
|
|
idn? ( net-dns/libidn[static-libs?] ) |
| 39 |
|
|
ares? ( net-dns/c-ares ) |
| 40 |
|
|
kerberos? ( virtual/krb5 ) |
| 41 |
|
|
ssh? ( net-libs/libssh2[static-libs?] ) |
| 42 |
|
|
sys-libs/zlib" |
| 43 |
|
|
|
| 44 |
|
|
# ssl providers to be added: |
| 45 |
|
|
# fbopenssl $(use_with spnego) |
| 46 |
|
|
|
| 47 |
|
|
# rtmpdump ( media-video/rtmpdump ) / --with-librtmp |
| 48 |
|
|
# krb4 http://web.mit.edu/kerberos/www/krb4-end-of-life.html |
| 49 |
|
|
|
| 50 |
|
|
DEPEND="${RDEPEND} |
| 51 |
|
|
sys-apps/ed |
| 52 |
jdhore |
1.4 |
virtual/pkgconfig |
| 53 |
blueness |
1.1 |
test? ( |
| 54 |
|
|
sys-apps/diffutils |
| 55 |
|
|
dev-lang/perl |
| 56 |
|
|
)" |
| 57 |
|
|
# used - but can do without in self test: net-misc/stunnel |
| 58 |
|
|
|
| 59 |
|
|
# ares must be disabled for threads |
| 60 |
|
|
# only one ssl provider can be enabled |
| 61 |
|
|
REQUIRED_USE="threads? ( !ares ) |
| 62 |
|
|
ssl? ( |
| 63 |
|
|
^^ ( |
| 64 |
|
|
curl_ssl_axtls |
| 65 |
|
|
curl_ssl_cyassl |
| 66 |
|
|
curl_ssl_gnutls |
| 67 |
|
|
curl_ssl_openssl |
| 68 |
|
|
curl_ssl_nss |
| 69 |
|
|
curl_ssl_polarssl |
| 70 |
|
|
) |
| 71 |
|
|
)" |
| 72 |
|
|
|
| 73 |
|
|
DOCS=( CHANGES README docs/FEATURES docs/INTERNALS \ |
| 74 |
|
|
docs/MANUAL docs/FAQ docs/BUGS docs/CONTRIBUTE) |
| 75 |
|
|
|
| 76 |
|
|
src_prepare() { |
| 77 |
|
|
epatch \ |
| 78 |
|
|
"${FILESDIR}"/${PN}-7.19.7-test241.patch \ |
| 79 |
|
|
"${FILESDIR}"/${PN}-7.18.2-prefix.patch \ |
| 80 |
|
|
"${FILESDIR}"/${PN}-respect-cflags-3.patch \ |
| 81 |
|
|
"${FILESDIR}"/${PN}-fix-gnutls-nettle.patch |
| 82 |
|
|
sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241 |
| 83 |
|
|
|
| 84 |
|
|
eprefixify curl-config.in |
| 85 |
|
|
eautoreconf |
| 86 |
|
|
} |
| 87 |
|
|
|
| 88 |
|
|
src_configure() { |
| 89 |
|
|
einfo "\033[1;32m**************************************************\033[00m" |
| 90 |
|
|
|
| 91 |
|
|
# We make use of the fact that later flags override earlier ones |
| 92 |
|
|
# So start with all ssl providers off until proven otherwise |
| 93 |
|
|
local myconf=() |
| 94 |
|
|
myconf+=( --without-axtls --without-cyassl --without-gnutls --without-nss --without-polarssl --without-ssl ) |
| 95 |
|
|
myconf+=( --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt ) |
| 96 |
|
|
if use ssl ; then |
| 97 |
|
|
if use curl_ssl_axtls; then |
| 98 |
blueness |
1.5 |
einfo "SSL provided by axtls" |
| 99 |
|
|
einfo "NOTE: axtls is meant for embedded systems and" |
| 100 |
blueness |
1.1 |
einfo "may not be the best choice as an ssl provider" |
| 101 |
|
|
myconf+=( --with-axtls ) |
| 102 |
|
|
fi |
| 103 |
|
|
if use curl_ssl_cyassl; then |
| 104 |
|
|
einfo "SSL provided by cyassl" |
| 105 |
|
|
einfo "NOTE: cyassl is meant for embedded systems and" |
| 106 |
|
|
einfo "may not be the best choice as an ssl provider" |
| 107 |
|
|
myconf+=( --with-cyassl ) |
| 108 |
|
|
fi |
| 109 |
|
|
if use curl_ssl_gnutls; then |
| 110 |
|
|
einfo "SSL provided by gnutls" |
| 111 |
blueness |
1.3 |
if has_version ">=net-libs/gnutls-3" || has_version "=net-libs/gnutls-2.12*[nettle]"; then |
| 112 |
blueness |
1.1 |
einfo "gnutls compiled with dev-libs/nettle" |
| 113 |
|
|
myconf+=( --with-gnutls --with-nettle ) |
| 114 |
|
|
else |
| 115 |
|
|
einfo "gnutls compiled with dev-libs/libgcrypt" |
| 116 |
|
|
myconf+=( --with-gnutls --without-nettle ) |
| 117 |
|
|
fi |
| 118 |
|
|
fi |
| 119 |
|
|
if use curl_ssl_nss; then |
| 120 |
|
|
einfo "SSL provided by nss" |
| 121 |
|
|
myconf+=( --with-nss ) |
| 122 |
|
|
fi |
| 123 |
|
|
if use curl_ssl_polarssl; then |
| 124 |
|
|
einfo "SSL provided by polarssl" |
| 125 |
|
|
einfo "NOTE: polarssl is meant for embedded systems and" |
| 126 |
|
|
einfo "may not be the best choice as an ssl provider" |
| 127 |
|
|
myconf+=( --with-polarssl ) |
| 128 |
|
|
fi |
| 129 |
|
|
if use curl_ssl_openssl; then |
| 130 |
|
|
einfo "SSL provided by openssl" |
| 131 |
|
|
myconf+=( --with-ssl --without-ca-bundle --with-ca-path="${EPREFIX}"/etc/ssl/certs ) |
| 132 |
|
|
fi |
| 133 |
|
|
else |
| 134 |
|
|
einfo "SSL disabled" |
| 135 |
|
|
fi |
| 136 |
|
|
einfo "\033[1;32m**************************************************\033[00m" |
| 137 |
|
|
|
| 138 |
|
|
# These configuration options are organized alphabetically |
| 139 |
|
|
# within each category. This should make it easier if we |
| 140 |
|
|
# ever decide to make any of them contingent on USE flags: |
| 141 |
|
|
# 1) protocols first. To see them all do |
| 142 |
|
|
# 'grep SUPPORT_PROTOCOLS configure.ac' |
| 143 |
|
|
# 2) --enable/disable options second. |
| 144 |
|
|
# 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort |
| 145 |
|
|
# 3) --with/without options third. |
| 146 |
|
|
# grep -- --with configure | grep Check | awk '{ print $4 }' | sort |
| 147 |
|
|
econf \ |
| 148 |
|
|
--enable-dict \ |
| 149 |
|
|
--enable-file \ |
| 150 |
|
|
--enable-ftp \ |
| 151 |
|
|
--enable-gopher \ |
| 152 |
|
|
--enable-http \ |
| 153 |
|
|
--enable-imap \ |
| 154 |
|
|
$(use_enable ldap) \ |
| 155 |
|
|
$(use_enable ldap ldaps) \ |
| 156 |
|
|
--enable-pop3 \ |
| 157 |
|
|
--without-librtmp \ |
| 158 |
|
|
--enable-rtsp \ |
| 159 |
|
|
$(use_with ssh libssh2) \ |
| 160 |
|
|
--enable-smtp \ |
| 161 |
|
|
--enable-telnet \ |
| 162 |
|
|
--enable-tftp \ |
| 163 |
|
|
$(use_enable ares) \ |
| 164 |
|
|
--enable-cookies \ |
| 165 |
|
|
--enable-hidden-symbols \ |
| 166 |
|
|
$(use_enable ipv6) \ |
| 167 |
|
|
--enable-largefile \ |
| 168 |
|
|
--enable-manual \ |
| 169 |
|
|
--enable-nonblocking \ |
| 170 |
|
|
--enable-proxy \ |
| 171 |
|
|
--disable-soname-bump \ |
| 172 |
|
|
--disable-sspi \ |
| 173 |
|
|
$(use_enable static-libs static) \ |
| 174 |
|
|
$(use_enable threads threaded-resolver) \ |
| 175 |
|
|
--disable-versioned-symbols \ |
| 176 |
|
|
$(use_with idn libidn) \ |
| 177 |
|
|
$(use_with kerberos gssapi "${EPREFIX}"/usr) \ |
| 178 |
|
|
--without-krb4 \ |
| 179 |
|
|
--without-spnego \ |
| 180 |
|
|
--with-zlib \ |
| 181 |
|
|
"${myconf[@]}" |
| 182 |
|
|
} |
| 183 |
|
|
|
| 184 |
|
|
src_install() { |
| 185 |
|
|
default |
| 186 |
|
|
find "${ED}" -name '*.la' -delete |
| 187 |
|
|
rm -rf "${ED}"/etc/ |
| 188 |
|
|
|
| 189 |
|
|
# https://sourceforge.net/tracker/index.php?func=detail&aid=1705197&group_id=976&atid=350976 |
| 190 |
|
|
insinto /usr/share/aclocal |
| 191 |
|
|
doins docs/libcurl/libcurl.m4 |
| 192 |
|
|
} |