source: trunk/dports/textproc/chasen/Portfile

Last change on this file was 137621, checked in by mf2k@…, 2 years ago

a2ps-j canna chasen chasen-base chasen-ipadic chasen-ipadic-sjis chasen-ipadic-utf8 chasen-naist-jdic chasen-naist-jdic-sjis chasen-naist-jdic-utf8 cocot darts dejavu-fonts disvf FDclone ghostscript ghostscript-fonts-hiragino gnushogi jnethack kakasi kinput2 lv makejvf nkf p5-nkf p5-text-chasen p5-text-kakasi pTeX smartmontools urw-fonts: Ports abandoned by takanori. (#47537)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 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 137621 2015-06-15 14:56:57Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                chasen
7version             2.3.3
8epoch               1
9categories          textproc japanese
10platforms           darwin
11maintainers         hum openmaintainer
12license             BSD
13
14homepage            http://chasen-legacy.sourceforge.jp/
15description         Japanese morphological analysis system
16long_description    ChaSen is a tool to analyze a text according to a set of dictionaries that \
17                    specifies grammar, part of speech of words, and so on. \
18                    This port depends on ChaSen base analyzer and a Japanese dictionary.
19
20distfiles
21
22depends_lib         port:chasen-base
23
24use_configure       no
25supported_archs     noarch
26
27build {}
28
29variant eucjp description {Enable EUC-JP encoding} {}
30
31variant utf8 description {Add chasen-utf8 for UTF-8 texts} {
32    post-destroot {
33        set encoding     utf8
34        set nkf_encoding w
35        set script  ${destroot}${prefix}/bin/chasen-${encoding}
36        xinstall -m 755 ${filespath}/chasen.in         ${script}
37        reinplace "s|@NKF_ENCODING@|${nkf_encoding}|"  ${script}
38        reinplace "s|@RC_FILE@|${prefix}/etc/chasen/chasenrc-${encoding}|" \
39            ${script}
40    }
41    notes-append  "You can run 'chasen-utf8' for UTF-8 texts."
42}
43
44variant sjis description {Add chasen-sjis for Shift-JIS texts} {
45    post-destroot {
46        set encoding     sjis
47        set nkf_encoding s
48        set script  ${destroot}${prefix}/bin/chasen-${encoding}
49        xinstall -m 755 ${filespath}/chasen.in         ${script}
50        reinplace "s|@NKF_ENCODING@|${nkf_encoding}|"  ${script}
51        reinplace "s|@RC_FILE@|${prefix}/etc/chasen/chasenrc-${encoding}|" \
52            ${script}
53    }
54    notes-append  "You can run 'chasen-sjis' for Shift-JIS texts."
55}
56
57default_variants    +eucjp +utf8
58
59set dicname         ipadic
60
61variant ipadic conflicts naistjdic description {Use ipadic} {
62    set dicname         ipadic
63    if {[variant_isset eucjp]} {
64        depends_lib-append  port:chasen-${dicname}
65    }
66    foreach encoding {utf8 sjis} {
67        if {[variant_isset ${encoding}]} {
68            depends_lib-append  port:chasen-${dicname}-${encoding}
69        }
70    }
71}
72
73variant naistjdic conflicts ipadic description {Use naist-jdic} {
74    set dicname         naist-jdic
75    if {[variant_isset eucjp]} {
76        depends_lib-append  port:chasen-${dicname}
77    }
78    foreach encoding {utf8 sjis} {
79        if {[variant_isset ${encoding}]} {
80            depends_lib-append  port:chasen-${dicname}-${encoding}
81        }
82    }
83}
84
85if {![variant_isset naistjdic]} {
86    default_variants    +ipadic
87}
88
89destroot {
90    set dest_chasen ${destroot}${prefix}/etc/chasen
91    file mkdir ${dest_chasen}
92    ln -s chasenrc-${dicname} ${dest_chasen}/chasenrc
93    foreach encoding {utf8 sjis} {
94        if {[variant_isset ${encoding}]} {
95            ln -s chasenrc-${dicname}-${encoding} ${dest_chasen}/chasenrc-${encoding}
96        }
97    }
98}
99
100livecheck.type  none
Note: See TracBrowser for help on using the repository browser.