# -*- 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

PortSystem          1.0

name                knp
version             4.19
categories          textproc japanese
maintainers         nomaintainer

description         Japanese Dependency and Case Structure Analyzer KNP
long_description    ${description}. KN parser (Kurohashi-Nagao parser) which \
                    detects dependency of Japanese sentences.

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  23b401b7c50c6e3e49c9a22ae6642300612f3cf0 \
                    sha256  fe5d1249e7c7716e4ac76a57052096bb8b321829af39f3fa2ad5acd9e060427b \
                    size    799622946

patchfiles          patch-Makefile.in.diff

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

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

build.args-append   CC="${configure.cc} [get_canonical_archflags cc]"

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}"
