summaryrefslogtreecommitdiff
blob: 29372e12a65c11190f550aa97b40a3ca1917af73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-nntp/slrn/slrn-0.9.8.1.ebuild,v 1.6 2005/07/14 20:38:04 swegener Exp $

inherit eutils

# Upstream patches from http://slrn.sourceforge.net/patches/
# ${FILESDIR}/${PV}/${P}-<name>.diff
SLRN_PATCHES="fetch lastchar2"

DESCRIPTION="s-lang Newsreader"
HOMEPAGE="http://slrn.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 ia64 ppc sparc x86"
IUSE="ssl nls unicode uudeview"

RDEPEND="virtual/mta
	>=app-arch/sharutils-4.2.1
	>=sys-libs/slang-1.4.9-r1
	ssl? ( >=dev-libs/openssl-0.9.6 )"
DEPEND="${RDEPEND}
	uudeview? ( dev-libs/uulib )
	nls? ( sys-devel/gettext )"

pkg_setup() (
	if use unicode && ! built_with_use sys-libs/slang unicode
	then
		eerror "For USE=\"unicode\" support you need to have your sys-libs/slang also compiled"
		eerror "with USE=\"unicode\" support."
		die "sys-libs/slang with USE=\"unicode\" support needed"
	fi
)

src_unpack() {
	unpack ${A}
	cd "${S}"

	for i in ${SLRN_PATCHES}
	do
		epatch "${FILESDIR}"/${PV}/${P}-${i}.diff
	done

	use unicode && epatch "${FILESDIR}"/${PV}-utf8.patch
}

src_compile() {
	econf \
		--with-docdir=/usr/share/doc/${PF} \
		--with-slrnpull \
		$(use_enable nls) \
		$(use_with ssl) \
		$(use_with uudeview) \
		|| die "econf failed"
	emake || die "emake failed"
}

src_install () {
	make DESTDIR="${D}" install || die "make install failed"
}