source: trunk/dports/textproc/mecab-base/Portfile @ 103265

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

mecab,mecab-{base,sjis,utf8,java},{p5,py,rb,rb19}-mecab: update to 0.996.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 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 103265 2013-02-19 15:25:57Z hum@macports.org $
3
4PortSystem          1.0
5
6name                mecab-base
7version             0.996
8categories          textproc japanese
9maintainers         hum gmail.com:rsky0711 openmaintainer
10
11description         yet another part-of-speech and morphological analyzer
12long_description    The base analyzer of MeCab, ${description}.
13
14homepage            http://mecab.sourceforge.net/
15platforms           darwin
16license             {GPL LGPL BSD}
17
18dist_subdir         mecab
19distname            mecab-${version}
20
21master_sites        googlecode:mecab
22checksums           rmd160  a06fa0c0eb44eef8c45171b769b43c655971ac4a \
23                    sha256  e073325783135b72e666145c781bb48fada583d5224fb2490fb6c1403ba69c59
24
25depends_lib         port:libiconv
26
27patchfiles          patch-configure.diff
28
29configure.args      --mandir=${prefix}/share/man \
30                    --with-libiconv-prefix=${prefix}
31
32test.run            yes
33test.target         check
34
35set dest_mecab      ${destroot}${prefix}/share/mecab
36set dest_doc        ${dest_mecab}/doc
37set dest_example    ${dest_mecab}/example
38
39post-destroot {
40    # set the default dictionary path to sysdic.
41    reinplace s|ipadic|sysdic| ${destroot}${prefix}/etc/mecabrc
42
43    # install doc and example.
44    file mkdir ${dest_doc}
45    eval xinstall -m 644 [glob ${worksrcpath}/doc/*.html] ${dest_doc}
46    eval xinstall -m 644 [glob ${worksrcpath}/doc/*.png]  ${dest_doc}
47    eval xinstall -m 644 [glob ${worksrcpath}/doc/*.css]  ${dest_doc}
48    copy ${worksrcpath}/doc/doxygen ${dest_doc}
49    copy ${worksrcpath}/doc/en      ${dest_doc}
50    copy ${worksrcpath}/example     ${dest_example}
51}
52
53# deactivate any old mecab port.
54pre-activate {
55    if {[file exists ${prefix}/bin/mecab]
56        && ![catch {set vers [lindex [registry_active mecab] 0]}]
57        && ([vercmp [lindex $vers 1] 0.98] < 0 ||
58            [vercmp [lindex $vers 1] 0.98] == 0
59            && [vercmp [lindex $vers 2] 1] < 1)} {
60        registry_deactivate_composite mecab "" [list ports_nodepcheck 1]
61    }
62}
63
64platform darwin 8 {
65    configure.env-append    MACOSX_DEPLOYMENT_TARGET=10.4
66}
67
68variant utf8only description {Build with UTF-8 only} {
69    configure.args-append   --enable-utf8-only
70}
71
72variant dartsclone description {Use darts-clone instead of darts} {
73    post-patch {
74        # darts.h is taken from http://darts-clone.googlecode.com/files/darts-clone-0.32g.tar.gz.
75        copy -force ${filespath}/darts.h ${worksrcpath}/src
76    }
77}
78
79livecheck.type      regex
80livecheck.url       http://code.google.com/p/mecab/downloads/list
81livecheck.regex     {mecab-([\d\.]+)\.tar}
Note: See TracBrowser for help on using the repository browser.