source: trunk/dports/textproc/stanford-postagger/Portfile

Last change on this file was 135333, checked in by hum@…, 2 years ago

stanford-{ner,parser,postagger}: update to 3.5.2

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# -*- 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
2# $Id: Portfile 135333 2015-04-23 10:38:50Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                stanford-postagger
7version             3.5.2
8categories          textproc java
9maintainers         hum openmaintainer
10
11description         a Java implementation of the log-linear part-of-speech taggers
12long_description    ${description}
13
14homepage            http://nlp.stanford.edu/downloads/tagger.shtml
15platforms           darwin
16license             GPL-2+
17
18master_sites        http://nlp.stanford.edu/software
19
20use_zip             yes
21distname            ${name}-2015-04-20
22checksums           rmd160  4c614c16b25b199fa5cbc676123496ec7845d472 \
23                    sha256  57acc1d9cce879a8234ee5b4dcfac95f0bc7568ad46b54579dac6d780db5a2a7
24
25use_configure       no
26supported_archs     noarch
27
28build {}
29
30destroot {
31    # install jar files and scripts.
32    set java_dir ${prefix}/share/java/${name}
33    set dest_java ${destroot}${java_dir}
34    xinstall -d ${dest_java}
35    xinstall -m 644 -W ${worksrcpath} \
36        stanford-postagger.jar \
37        stanford-postagger-${version}.jar \
38        ${dest_java}
39    xinstall -m 755 -W ${worksrcpath} \
40        stanford-postagger.sh stanford-postagger-gui.sh \
41        ${dest_java}
42    reinplace -W ${dest_java} \
43        "s|stanford-postagger.jar|${java_dir}/stanford-postagger.jar|g" \
44        stanford-postagger.sh stanford-postagger-gui.sh
45    # install models.
46    set dest_models ${dest_java}/models
47    xinstall -d ${dest_models}
48    foreach f [glob ${worksrcpath}/models/*.tagger] {
49        xinstall -m 644 ${f} ${dest_models}
50    }
51    # install examples.
52    set dest_ex ${destroot}${prefix}/share/examples/${name}
53    xinstall -d ${dest_ex}
54    xinstall -m 644 -W ${worksrcpath} \
55        sample-input.txt sample-output.txt \
56        ${dest_ex}
57    # install additional documents.
58    set dest_doc ${destroot}${prefix}/share/doc/${name}
59    xinstall -d ${dest_doc}
60    xinstall -m 644 -W ${worksrcpath} \
61        LICENSE.txt README.txt \
62        ${dest_doc}
63    xinstall -m 644 ${worksrcpath}/models/README-Models.txt \
64        ${dest_doc}
65}
66
67notes "
68$name requires Java v1.8+
69"
70
71livecheck.type      regex
72livecheck.regex     {Tagger version *([0-9.]+) *}
Note: See TracBrowser for help on using the repository browser.