aboutsummaryrefslogtreecommitdiff
blob: 9e136837376690e60059bde55ba141ebb897a510 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils distutils

DESCRIPTION="Natural language processing tool collection"
HOMEPAGE="http://nltk.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
	mirror://sourceforge/${PN}/${PN}-data-${PV}.zip"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND="${DEPEND}
	dev-python/numarray
	dev-python/numpy
	dev-python/matplotlib
	>=app-dicts/wordnet-2.0
	sci-misc/pywordnet"
RDEPEND="${DEPEND}"

pkg_setup() {
	if ! built_with_use dev-lang/python tk ; then
		die "NLTK needs python built with USE=tk"
	fi
	export NLTK_DATA="${WORKDIR}/data/"
}

src_install() {
	distutils_src_install
	# N.B.: if you install corpora in usr/share/nltk you do not need env. vars
	cd "${WORKDIR}"
	dodir /usr/share/nltk
	fperms g+r data
	insinto /usr/share/nltk/
	doins -r data
}