metadata.xml: Add maintainer-needed comment to packages without maintainer.
[gentoo.git] / net-nntp / tin / tin-2.3.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit eutils toolchain-funcs versionator
7
8 TIN_PV=$(get_version_component_range 1-2)
9 DESCRIPTION="A threaded NNTP and spool based UseNet newsreader"
10 HOMEPAGE="http://www.tin.org/"
11 SRC_URI="ftp://ftp.tin.org/pub/news/clients/tin/v${TIN_PV}/${P}.tar.xz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
16 IUSE="cancel-locks debug doc +etiquette evil forgery gpg idn ipv6 mime nls sasl socks5 spell unicode"
17
18 RDEPEND="
19         dev-libs/libpcre
20         dev-libs/uulib
21         gpg? ( app-crypt/gnupg )
22         idn? ( net-dns/libidn )
23         mime? ( net-mail/metamail )
24         net-misc/urlview
25         nls? ( sys-devel/gettext )
26         sasl? ( virtual/gsasl )
27         socks5? ( net-proxy/dante )
28         sys-libs/ncurses[unicode?]
29         unicode? ( dev-libs/icu:= )
30 "
31
32 DEPEND="
33         ${RDEPEND}
34         app-arch/xz-utils
35         virtual/pkgconfig
36 "
37
38 src_prepare() {
39         sed -i src/Makefile.in -e 's| -s | |g' || die
40         sed -i configure -e '/CFLAGS/s|-g||g' || die
41 }
42
43 src_configure() {
44         if use evil || use cancel-locks; then
45                 sed -i -e"s/# -DEVIL_INSIDE/-DEVIL_INSIDE/" src/Makefile.in
46         fi
47
48         if use forgery
49         then
50                 sed -i -e"s/^CPPFLAGS.*/& -DFORGERY/" src/Makefile.in
51         fi
52
53         local screen="ncurses"
54         use unicode && screen="ncursesw"
55
56         tc-export AR CC RANLIB
57
58         econf \
59                 $(use_enable cancel-locks) \
60                 $(use_enable debug) \
61                 $(use_enable etiquette) \
62                 $(use_enable gpg pgp-gpg) \
63                 $(use_enable ipv6) \
64                 $(use_enable nls) \
65                 $(use_with mime metamail /usr) \
66                 $(use_with socks5 socks) $(use_with socks5) \
67                 $(use_with spell ispell /usr) \
68                 --disable-mime-strict-charset \
69                 --enable-echo \
70                 --enable-nntp-only \
71                 --enable-prototypes \
72                 --with-coffee  \
73                 --with-nntp-default-server="${TIN_DEFAULT_SERVER:-${NNTPSERVER:-news.gmane.org}}" \
74                 --with-pcre=/usr \
75                 --with-screen=${screen}
76 }
77
78 src_compile() {
79         emake build
80 }
81
82 src_install() {
83         default
84
85         # File collision?
86         rm -f "${ED}"/usr/share/man/man5/{mbox,mmdf}.5
87
88         dodoc doc/{CHANGES{,.old},CREDITS,TODO,WHATSNEW}
89         use doc && dodoc doc/{*.sample,*.txt}
90
91         insinto /etc/tin
92         doins doc/tin.defaults
93 }