# -*- 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 115703 2014-01-09 13:08:02Z hum@macports.org $

PortSystem          1.0

name                stanford-parser
version             3.3.1
categories          textproc java
maintainers         hum openmaintainer

description         a Java implementation of probabilistic natural language parsers
long_description    ${description}, both highly optimized PCFG and lexicalized \
                    dependency parsers, and a lexicalized PCFG parser.

homepage            http://nlp.stanford.edu/software/lex-parser.shtml
platforms           darwin
license             GPL-2+

master_sites        http://nlp.stanford.edu/software
checksums           rmd160  b976572b4137efa46ea26c508e53bc45f64fead2 \
                    sha256  730b59b26bdd026366bd8277f745501e5ab520e2be5e9b6c79ba160454d6e79a

use_zip             yes
distname            ${name}-full-2014-01-04

use_configure       no
supported_archs     noarch

build {}

destroot {
    # install jar files and scripts.
    set dest_java ${destroot}${prefix}/share/java/${name}
    xinstall -d ${dest_java}
    xinstall -m 644 -W ${worksrcpath} \
        stanford-parser.jar \
        stanford-parser-${version}-models.jar \
        ${dest_java}
    xinstall -m 755 -W ${worksrcpath} \
        lexparser.sh \
        lexparser-gui.sh \
        ${dest_java}
    # install additional documents.
    set dest_doc ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${dest_doc}
    xinstall -m 644 -W ${worksrcpath} \
        LICENSE.txt README.txt README_dependencies.txt \
        StanfordDependenciesManual.pdf \
        ${dest_doc}
}

livecheck.type      regex
livecheck.regex     {Version *([0-9.]+) *}
