source: trunk/dports/textproc/mecab-jumandic/Portfile

Last change on this file was 113834, checked in by hum@…, 4 years ago

mecab-jumandic: clean up conflicts.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 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 113834 2013-11-24 16:24:02Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6set dicname         jumandic
7name                mecab-${dicname}
8version             7.0-20130310
9categories          textproc japanese
10maintainers         hum openmaintainer
11
12set encoding        eucjp
13set nkf_encoding    e
14
15subport mecab-${dicname}-sjis {
16    set encoding     sjis
17    set nkf_encoding s   
18    livecheck.type   none
19}
20
21subport mecab-${dicname}-utf8 {
22    set encoding    utf8
23    livecheck.type  none
24}
25
26description         ${dicname} of ${encoding} encoding for MeCab
27long_description    ${description}
28
29homepage            https://code.google.com/p/mecab/
30platforms           darwin
31license             BSD
32
33dist_subdir         mecab
34
35master_sites        googlecode:mecab
36checksums           rmd160  3f5009263fcfa609c3f19f0e64b8c5f8a1b3afbe \
37                    sha256  eaf216758edee9a159bc3d02507007318686b9537943268c4565cc1f9ef07f15
38
39depends_lib         port:mecab-base
40
41if {${encoding} != "utf8"} {
42    depends_build   port:nkf
43}
44
45supported_archs     noarch
46
47post-extract {
48    # ignore invalid entries in AuxV.csv.
49    file rename ${worksrcpath}/AuxV.csv ${worksrcpath}/AuxV.csv.orig
50    system -W ${worksrcpath} "head -n 587 AuxV.csv.orig > AuxV.csv"
51    # convert character encoding of dic and def files if the target is other than utf8.
52    if {${encoding} != "utf8"} {
53        foreach f [glob ${worksrcpath}/*.csv ${worksrcpath}/*.def] {
54            system "nkf --in-place -${nkf_encoding} ${f}"
55        }
56        reinplace -locale C -W ${worksrcpath} "s|utf-8|${encoding}|" Makefile.in
57        reinplace -locale C -W ${worksrcpath} "s|charset: utf8|charset: ${encoding}|" model.def
58    }
59}
60
61configure.args      --with-mecab-config=${prefix}/bin/mecab-config \
62                    --with-charset=${encoding} \
63                    --with-dicdir=${prefix}/lib/mecab/dic/${dicname}-${encoding}
Note: See TracBrowser for help on using the repository browser.