]> Pileus Git - ~andy/sunrise/blob - dev-python/nltk-lite/nltk-lite-0.7.5.ebuild
sunrise/ net-nntp/nzbperl/Manifest: Update copyright line to satisfy repoman
[~andy/sunrise] / dev-python / nltk-lite / nltk-lite-0.7.5.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6
7 inherit distutils
8
9 MY_PV="${PV/_beta/b}"
10 MY_PN="${PN/-/_}"
11 MY_P="${MY_PN}-${MY_PV}"
12
13 DESCRIPTION="A suite of Python packages and data for natural language processing"
14 HOMEPAGE="http://nltk.sourceforge.net/"
15 SRC_URI="mirror://sourceforge/nltk/${MY_P}.tar.gz
16         !minimal? ( mirror://sourceforge/nltk/${MY_PN}-corpora-${MY_PV}.zip )
17         doc? ( mirror://sourceforge/nltk/${MY_PN}-doc-${MY_PV}.zip )
18         examples? ( mirror://sourceforge/nltk/${MY_PN}-examples-${MY_PV}.zip )"
19
20 LICENSE="GPL-2"
21 SLOT="0"
22 KEYWORDS="~x86"
23 IUSE="doc examples linguas_pt_BR minimal"
24
25 DEPEND="app-arch/unzip"
26 RDEPEND="dev-python/numpy
27         dev-python/matplotlib"
28
29 S="${WORKDIR}/${MY_P}"
30
31 src_install() {
32         if ! use minimal ; then
33                 insinto /usr/share/${MY_PN}
34                 doins -r "${WORKDIR}/corpora" || die
35                 doenvd "${FILESDIR}/99nltk-lite" || die
36         fi
37         if use doc ; then
38                 if ! use linguas_pt_BR ; then
39                         rm -rf "${WORKDIR}/doc/pt-br" || die
40                 fi
41                 insinto /usr/share/${MY_PN}
42                 doins -r "${WORKDIR}/doc" || die
43         fi
44         if use examples ; then
45                 insinto /usr/share/${MY_PN}
46                 doins -r "${WORKDIR}/examples" || die
47         fi
48
49         dodoc README.txt || die
50
51         distutils_src_install
52 }
53
54 pkg_postinst() {
55         if use minimal ; then
56                 elog "${PN} has been installed with the 'minimal' USE flag enabled"
57                 elog "This means corpora hasn't been installed, which may be needed"
58                 elog "for the examples and apps developed using ${PN}."
59         fi
60 }