source: trunk/dports/textproc/syncha/Portfile @ 97506

Last change on this file since 97506 was 97506, checked in by hum@…, 8 years ago

syncha: reformat only.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 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 97506 2012-09-07 16:31:07Z hum@macports.org $
3
4PortSystem          1.0
5
6name                syncha
7version             0.2.1
8set branch          [join [lrange [split ${version} .] 0 1] .]
9categories          textproc
10maintainers         hum openmaintainer
11
12description         a Japanese predicate-argument structure analyzer
13long_description    ${name} is ${description}. This port is for UTF-8 encoding.
14
15homepage            http://www.cl.cs.titech.ac.jp/~ryu-i/syncha/
16platforms           darwin
17license             LGPL
18
19master_sites        ${homepage}
20distname            ${name}-${branch}
21extract.suffix      .tgz
22
23checksums           rmd160  8933b6e82238254e8c08ac8ce7d66aeca80e4d0e \
24                    sha256  4af86068bdb42e0ae5de91bf32e890ab57aa2e4bf3763ae710dd314c91e0aa90
25
26depends_lib         port:lp_solve \
27                    port:cabocha
28depends_build       port:nkf
29
30use_configure       no
31supported_archs     noarch
32
33build {}
34
35destroot {
36    set syncha_dir ${prefix}/share/${name}
37    set dest_dir   ${destroot}${syncha_dir}
38
39    # convert the character encodings from EUC-JP to UTF-8.
40    set nkf        "${prefix}/bin/nkf -w"
41    foreach d {cooc sample} {
42        xinstall -d -m 755 ${dest_dir}/dat/${d}
43        foreach f [glob -tails -directory ${worksrcpath}/dat/${d} *] {
44            system "${nkf} ${worksrcpath}/dat/${d}/${f} > ${dest_dir}/dat/${d}/${f}"
45        }
46    }
47    foreach d [glob -tails -directory ${worksrcpath}/dat/model *] {
48        xinstall -d -m 755 ${dest_dir}/dat/model/${d}
49        foreach f [glob -tails -directory ${worksrcpath}/dat/model/${d} *] {
50            system "${nkf} ${worksrcpath}/dat/model/${d}/${f} > ${dest_dir}/dat/model/${d}/${f}"
51        }
52    }
53    xinstall -d -m 755 ${dest_dir}/src
54    foreach f [glob -tails -directory ${worksrcpath}/src *] {
55        system "${nkf} ${worksrcpath}/src/${f} > ${dest_dir}/src/${f}"
56    }
57    system "${nkf} ${worksrcpath}/README > ${dest_dir}/README"
58
59    # install the executable script.
60    xinstall -m 755 ${worksrcpath}/syncha ${destroot}${prefix}/bin
61    reinplace "s|use FindBin qw\(\$Bin\);|my \$Bin = \"${syncha_dir}\";|" \
62        ${destroot}${prefix}/bin/syncha
63}
64
65livecheck.type      regex
66livecheck.version   ${branch}
67livecheck.regex     ${name}-(\[0-9.\]+)\\.tgz
Note: See TracBrowser for help on using the repository browser.