Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/tntnet/
Date: Sun, 26 Jun 2016 00:09:47
Message-Id: 1466899886.3122f370c4c1257536eca09844fcaa952092ed23.blueness@gentoo
1 commit: 3122f370c4c1257536eca09844fcaa952092ed23
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 26 00:11:26 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 26 00:11:26 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3122f370
7
8 dev-libs/tntnet: add libressl support
9
10 Package-Manager: portage-2.2.28
11
12 dev-libs/tntnet/tntnet-2.2.1-r1.ebuild | 91 ++++++++++++++++++++++++++++++++++
13 1 file changed, 91 insertions(+)
14
15 diff --git a/dev-libs/tntnet/tntnet-2.2.1-r1.ebuild b/dev-libs/tntnet/tntnet-2.2.1-r1.ebuild
16 new file mode 100644
17 index 0000000..43aae68
18 --- /dev/null
19 +++ b/dev-libs/tntnet/tntnet-2.2.1-r1.ebuild
20 @@ -0,0 +1,91 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +inherit autotools eutils
28 +
29 +DESCRIPTION="Modular, multithreaded webapplicationserver extensible with C++"
30 +HOMEPAGE="http://www.tntnet.org/"
31 +SRC_URI="http://www.tntnet.org/download/${P}.tar.gz"
32 +
33 +LICENSE="LGPL-2.1"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~sparc ~x86"
36 +IUSE="doc gnutls libressl server ssl examples"
37 +
38 +RDEPEND=">=dev-libs/cxxtools-2.2.1
39 + sys-libs/zlib[minizip]
40 + ssl? (
41 + gnutls? (
42 + >=net-libs/gnutls-1.2.0
43 + dev-libs/libgcrypt:0
44 + )
45 + !gnutls? (
46 + !libressl? ( dev-libs/openssl:0= )
47 + libressl? ( dev-libs/libressl:0= )
48 + )
49 + )"
50 +DEPEND="${RDEPEND}
51 + virtual/pkgconfig
52 + app-arch/zip"
53 +
54 +src_prepare() {
55 + # Both fixed in the next release
56 + epatch "${FILESDIR}"/${PN}-2.0-zlib-minizip.patch
57 + rm framework/common/{ioapi,unzip}.[ch] || die
58 +
59 + # bug 423697
60 + sed -e "s:unzip.h:minizip/unzip.h:" -i framework/defcomp/unzipcomp.cpp
61 +
62 + eautoreconf
63 +
64 + sed -i -e 's:@localstatedir@:/var:' etc/tntnet/tntnet.xml.in || die
65 +}
66 +
67 +src_configure() {
68 + local myconf=""
69 +
70 + # Prefer gnutls above SSL
71 + if use gnutls; then
72 + einfo "Using gnutls for ssl support."
73 + myconf="${myconf} --with-ssl=gnutls"
74 + elif use ssl; then
75 + einfo "Using openssl for ssl support."
76 + myconf="${myconf} --with-ssl=openssl"
77 + else
78 + myconf="${myconf} --with-ssl=no"
79 + fi
80 +
81 + # default enabled, will not compile without sdk
82 + myconf="${myconf} --with-sdk"
83 +
84 + econf \
85 + $(use_with server) \
86 + ${myconf}
87 +}
88 +
89 +src_install() {
90 + emake DESTDIR="${D}" install || die
91 +
92 + dodoc AUTHORS ChangeLog README TODO
93 + if use doc; then
94 + dodoc doc/*.pdf || die
95 + fi
96 +
97 + if use examples; then
98 + cd "${S}/sdk/demos"
99 + emake clean
100 + rm -rf .deps */.deps .libs */.libs
101 + cd "${S}"
102 +
103 + insinto /usr/share/doc/${PF}/examples
104 + doins -r sdk/demos/* || die
105 + fi
106 +
107 + if use server; then
108 + rm -f "${D}/etc/init.d/tntnet"
109 + newinitd "${FILESDIR}/tntnet.initd" tntnet
110 + fi
111 +}