# -*- 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 # $Id$ PortSystem 1.0 name mecab version 0.996 categories textproc japanese maintainers hum openmaintainer set encoding eucjp subport mecab-sjis { set encoding sjis conflicts mecab mecab-utf8 livecheck.type none } subport mecab-utf8 { set encoding utf8 conflicts mecab mecab-sjis livecheck.type none } description yet another part-of-speech and morphological analyzer long_description MeCab is ${description}. \ This port depends on MeCab base analyzer and a Japanese \ dictionary of ${encoding} encoding. homepage http://mecab.sourceforge.net/ platforms darwin license {GPL LGPL BSD} distfiles depends_lib port:mecab-base conflicts mecab-sjis mecab-utf8 use_configure no supported_archs noarch build {} set dicname ipadic if {![variant_isset jumandic] && ![variant_isset naistjdic]} { default_variants +ipadic } variant ipadic conflicts jumandic naistjdic description {Use ipadic} { set dicname ipadic if {${encoding} == "eucjp"} { depends_lib-append port:mecab-${dicname} } else { depends_lib-append port:mecab-${dicname}-${encoding} } } variant jumandic conflicts ipadic naistjdic description {Use jumandic} { set dicname jumandic if {${encoding} == "eucjp"} { depends_lib-append port:mecab-${dicname} } else { depends_lib-append port:mecab-${dicname}-${encoding} } } variant naistjdic conflicts ipadic jumandic description {Use naist-jdic} { set dicname naist-jdic if {${encoding} == "eucjp"} { depends_lib-append port:mecab-${dicname} } else { depends_lib-append port:mecab-${dicname}-${encoding} } } if {${encoding} == "utf8"} { variant unidic conflicts ipadic jumandic naistjdic description {Use unidic} { set dicname unidic depends_lib-append port:unidic-mecab } } variant sjis description {Deprecated, install mecab-sjis instead} { ui_msg "Deprecated: please install 'mecab-sjis' instead of 'mecab +sjis'." ui_msg "Note: upgrading mecab will be completed if mecab-sjis is successfully installed, although the process fails due to a conflict." depends_lib port:mecab-sjis } variant utf8 description {Deprecated, install mecab-utf8 instead} { ui_msg "Deprecated: please install 'mecab-utf8' instead of 'mecab +utf8'." ui_msg "Note: upgrading mecab will be completed if mecab-utf8 is successfully installed, although the process fails due to a conflict." depends_lib port:mecab-utf8 } destroot { set dest_dic ${destroot}${prefix}/lib/mecab/dic file mkdir ${dest_dic} ln -s ${dicname}-${encoding} ${dest_dic}/sysdic } livecheck.type none