# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 114571 2013-12-10 15:19:56Z hum@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-nltk3
version             3.0a3
categories-append   textproc
maintainers         hum openmaintainer
supported_archs     noarch

description         Natural Language Toolkit supporting Python 3
long_description    NLTK 3 (${description}) is Python modules for research and development \
                    in natural language processing

homepage            http://www.nltk.org/nltk3-alpha/
platforms           darwin
license             Apache-2.0

master_sites        ${homepage}
checksums           rmd160  2b3ab93afe948371d07257b52421a983599a8b65 \
                    sha256  52621b3bf944dcae8cbd352ef2664edc95edfeaee321f3f021cfa55ce23eb117

distname            nltk-${version}
dist_subdir         py-nltk

python.versions     26 27 31 32 33 34

if {![info exists python.version]} {
    set python.version ""
}
conflicts           py${python.version}-nltk

if {$subport != $name} {
    depends_lib         port:py${python.version}-yaml \
                        port:py${python.version}-numpy \
                        port:py${python.version}-matplotlib

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 644 -W ${worksrcpath} \
            LICENSE.txt \
            README.txt \
            ${destroot}${docdir}
    }

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.regex     "nltk-(\\d+(?:\\.\\d+)*(\[ab\]\\d+)?(-p\\d+)?)${extract.suffix}"
}
