# -*- 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 116516 2014-01-27 15:30:01Z hum@macports.org $

PortSystem          1.0

name                knp
version             4.11
categories          textproc japanese
maintainers         hum openmaintainer

description         KN parser (Kurohashi-Nagao parser) which detects dependency of Japanese sentences.
long_description    ${description}

homepage            http://nlp.ist.i.kyoto-u.ac.jp/index.php?KNP
platforms           darwin
license             BSD

master_sites        http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/knp/
use_bzip2           yes
checksums           rmd160  52c5ae33ecf00758c81354850485d88925c53bfd \
                    sha256  aa4837891f7a89420ebd65c840e8397889138ef71117926e9f86d327772619bc

depends_lib         port:juman \
                    port:zlib \
                    port:crfpp

configure.args      --with-crf \
                    --with-juman-prefix=${prefix}

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        AUTHORS COPYING ChangeLog README \
        ${destroot}${docdir}
}

livecheck.type      regex
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
