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

Last change on this file since 97503 was 97503, checked in by hum@…, 7 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 97503 2012-09-07 16:07:17Z 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}
20
21distname            ${name}-${branch}
22extract.suffix      .tgz
23
24checksums           rmd160  8933b6e82238254e8c08ac8ce7d66aeca80e4d0e \
25                    sha256  4af86068bdb42e0ae5de91bf32e890ab57aa2e4bf3763ae710dd314c91e0aa90
26
27depends_lib         port:lp_solve \
28                    port:cabocha
29depends_build       port:nkf
30
31use_configure       no
32supported_archs     noarch
33
34build {}
35
36destroot {
37    set syncha_dir ${prefix}/share/${name}
38    set dest_dir   ${destroot}${syncha_dir}
39
40    # convert the character encodings from EUC-JP to UTF-8.
41    set nkf        "${prefix}/bin/nkf -w"
42    foreach d {cooc sample} {
43        xinstall -d -m 755 ${dest_dir}/dat/${d}
44        foreach f [glob -tails -directory ${worksrcpath}/dat/${d} *] {
45            system "${nkf} ${worksrcpath}/dat/${d}/${f} > ${dest_dir}/dat/${d}/${f}"
46        }
47    }
48    foreach d [glob -tails -directory ${worksrcpath}/dat/model *] {
49        xinstall -d -m 755 ${dest_dir}/dat/model/${d}
50        foreach f [glob -tails -directory ${worksrcpath}/dat/model/${d} *] {
51            system "${nkf} ${worksrcpath}/dat/model/${d}/${f} > ${dest_dir}/dat/model/${d}/${f}"
52        }
53    }
54    xinstall -d -m 755 ${dest_dir}/src
55    foreach f [glob -tails -directory ${worksrcpath}/src *] {
56        system "${nkf} ${worksrcpath}/src/${f} > ${dest_dir}/src/${f}"
57    }
58    system "${nkf} ${worksrcpath}/README > ${dest_dir}/README"
59
60    # install the executable script.
61    xinstall -m 755 ${worksrcpath}/syncha ${destroot}${prefix}/bin
62    reinplace "s|use FindBin qw\(\$Bin\);|my \$Bin = \"${syncha_dir}\";|" \
63        ${destroot}${prefix}/bin/syncha
64}
65
66livecheck.type      regex
67livecheck.version   ${branch}
68livecheck.regex     ${name}-(\[0-9.\]+)\\.tgz
Note: See TracBrowser for help on using the repository browser.