1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/neon/neon-0.29.0.ebuild,v 1.7 2009/11/30 10:08:11 maekke Exp $ |
4 |
|
5 |
EAPI="2" |
6 |
|
7 |
inherit autotools libtool versionator |
8 |
|
9 |
DESCRIPTION="HTTP and WebDAV client library" |
10 |
HOMEPAGE="http://www.webdav.org/neon/" |
11 |
SRC_URI="http://www.webdav.org/neon/${P}.tar.gz" |
12 |
|
13 |
LICENSE="GPL-2" |
14 |
SLOT="0" |
15 |
KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd" |
16 |
IUSE="doc expat gnutls kerberos libproxy nls pkcs11 ssl zlib" |
17 |
IUSE_LINGUAS="cs de fr ja nn pl ru tr zh_CN" |
18 |
for lingua in ${IUSE_LINGUAS}; do |
19 |
IUSE+=" linguas_${lingua}" |
20 |
done |
21 |
unset lingua |
22 |
RESTRICT="test" |
23 |
|
24 |
RDEPEND="expat? ( dev-libs/expat ) |
25 |
!expat? ( dev-libs/libxml2 ) |
26 |
gnutls? ( |
27 |
>=net-libs/gnutls-2.0 |
28 |
pkcs11? ( dev-libs/pakchois ) |
29 |
) |
30 |
!gnutls? ( ssl? ( |
31 |
>=dev-libs/openssl-0.9.6f |
32 |
pkcs11? ( dev-libs/pakchois ) |
33 |
) ) |
34 |
kerberos? ( virtual/krb5 ) |
35 |
libproxy? ( net-libs/libproxy ) |
36 |
nls? ( virtual/libintl ) |
37 |
zlib? ( sys-libs/zlib )" |
38 |
DEPEND="${RDEPEND}" |
39 |
|
40 |
src_prepare() { |
41 |
local lingua linguas |
42 |
for lingua in ${IUSE_LINGUAS}; do |
43 |
use linguas_${lingua} && linguas+=" ${lingua}" |
44 |
done |
45 |
sed -i -e "s/ALL_LINGUAS=.*/ALL_LINGUAS=\"${linguas}\"/g" configure.in |
46 |
|
47 |
AT_M4DIR="macros" eautoreconf |
48 |
|
49 |
elibtoolize |
50 |
} |
51 |
|
52 |
src_configure() { |
53 |
local myconf |
54 |
|
55 |
if has_version sys-libs/glibc; then |
56 |
einfo "Enabling SSL library thread-safety using POSIX threads..." |
57 |
myconf+=" --enable-threadsafe-ssl=posix" |
58 |
fi |
59 |
|
60 |
if use expat; then |
61 |
myconf+=" --with-expat" |
62 |
else |
63 |
myconf+=" --with-libxml2" |
64 |
fi |
65 |
|
66 |
if use gnutls; then |
67 |
myconf+=" --with-ssl=gnutls --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt" |
68 |
elif use ssl; then |
69 |
myconf+=" --with-ssl=openssl" |
70 |
fi |
71 |
|
72 |
econf \ |
73 |
--enable-static \ |
74 |
--enable-shared \ |
75 |
$(use_with kerberos gssapi) \ |
76 |
$(use_with libproxy) \ |
77 |
$(use_enable nls) \ |
78 |
$(use_with pkcs11 pakchois) \ |
79 |
$(use_with zlib) \ |
80 |
${myconf} |
81 |
} |
82 |
|
83 |
src_install() { |
84 |
emake DESTDIR="${D}" install-lib install-headers install-config install-nls || die "emake install failed" |
85 |
|
86 |
if use doc; then |
87 |
emake DESTDIR="${D}" install-docs || die "emake install-docs failed" |
88 |
fi |
89 |
|
90 |
dodoc AUTHORS BUGS NEWS README THANKS TODO |
91 |
doman doc/man/*.[1-8] |
92 |
} |
93 |
|
94 |
pkg_postinst() { |
95 |
ewarn "Neon has a policy of breaking API across minor versions, this means" |
96 |
ewarn "that any package that links against Neon may be broken after" |
97 |
ewarn "updating. They will remain broken until they are ported to the" |
98 |
ewarn "new API. You can downgrade Neon to the previous version by doing:" |
99 |
ewarn |
100 |
ewarn " emerge --oneshot '<net-misc/neon-$(get_version_component_range 1-2 ${PV})'" |
101 |
ewarn |
102 |
ewarn "You may also have to downgrade any package that has not been" |
103 |
ewarn "ported to the new API yet." |
104 |
} |