/[gentoo-x86]/dev-libs/tntnet/tntnet-2.1.ebuild
Gentoo

Contents of /dev-libs/tntnet/tntnet-2.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Jun 4 16:38:22 2012 UTC (2 years, 3 months ago) by idl0r
Branch: MAIN
Version bump. Fix dependencies.

(Portage version: 2.2.0_alpha109/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-libs/tntnet/tntnet-2.0-r1.ebuild,v 1.3 2012/05/04 18:35:48 jdhore Exp $
4
5 EAPI="4"
6
7 inherit autotools eutils
8
9 DESCRIPTION="Modular, multithreaded webapplicationserver extensible with C++"
10 HOMEPAGE="http://www.tntnet.org/index.hms"
11 SRC_URI="http://www.tntnet.org/download/${P}.tar.gz"
12
13 LICENSE="LGPL-2.1"
14 SLOT="0"
15 KEYWORDS="~amd64 ~sparc ~x86"
16 IUSE="cgi doc examples gnutls server sdk ssl"
17
18 RDEPEND="=dev-libs/cxxtools-2.1*
19 sys-libs/zlib[minizip]
20 ssl? (
21 gnutls? (
22 >=net-libs/gnutls-1.2.0
23 dev-libs/libgcrypt
24 )
25 !gnutls? ( dev-libs/openssl )
26 )"
27 DEPEND="${RDEPEND}
28 virtual/pkgconfig
29 examples? ( app-arch/zip )"
30
31 src_prepare() {
32 # Both fixed in the next release
33 epatch "${FILESDIR}"/${PN}-2.0-zlib-minizip.patch
34 rm framework/common/{ioapi,unzip}.[ch] || die
35
36 eautoreconf
37
38 sed -i -e 's:@localstatedir@:/var:' etc/tntnet/tntnet.conf.in || die
39 }
40
41 src_configure() {
42 local myconf=""
43
44 # Prefer gnutls above SSL
45 if use gnutls; then
46 einfo "Using gnutls for ssl support."
47 myconf="${myconf} --with-ssl=gnutls"
48 elif use ssl; then
49 einfo "Using openssl for ssl support."
50 myconf="${myconf} --with-ssl=openssl"
51 else
52 myconf="${myconf} --with-ssl=no"
53 fi
54
55 # demos/examples depend upon sdk
56 if use examples && ! use sdk; then
57 myconf="${myconf} --with-sdk"
58 fi
59
60 econf \
61 $(use_with examples demos) \
62 $(use_with sdk) \
63 $(use_with cgi) \
64 $(use_with server) \
65 ${myconf}
66 }
67
68 src_install() {
69 emake DESTDIR="${D}" install || die
70
71 dodoc AUTHORS ChangeLog README TODO
72 if use doc; then
73 dodoc doc/*.pdf || die
74 fi
75
76 if use examples; then
77 cd "${S}/sdk/demos"
78 emake clean
79 rm -rf .deps */.deps .libs */.libs
80 cd "${S}"
81
82 insinto /usr/share/doc/${PF}/examples
83 doins -r sdk/demos/* || die
84 fi
85
86 if use server; then
87 rm -f "${D}/etc/init.d/tntnet"
88 newinitd "${FILESDIR}/tntnet.initd" tntnet
89 fi
90 }

  ViewVC Help
Powered by ViewVC 1.1.20