Changeset 133891


Ignore:
Timestamp:
Mar 15, 2015, 12:42:35 AM (4 years ago)
Author:
hum@…
Message:

mecab: add neologd variant; fix to set default_variants

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/textproc/mecab/Portfile

    r113836 r133891  
    4545set dicname         ipadic
    4646
    47 if {![variant_isset jumandic] && ![variant_isset naistjdic]} {
    48     default_variants    +ipadic
    49 }
    50 
    51 variant ipadic conflicts jumandic naistjdic description {Use ipadic} {
     47variant ipadic conflicts jumandic naistjdic unidic neologd description {Use ipadic} {
    5248    set dicname         ipadic
    5349    if {${encoding} == "eucjp"} {
     
    5854}
    5955
    60 variant jumandic conflicts ipadic naistjdic description {Use jumandic} {
     56variant jumandic conflicts ipadic naistjdic unidic neologd description {Use jumandic} {
    6157    set dicname         jumandic
    6258    if {${encoding} == "eucjp"} {
     
    6763}
    6864
    69 variant naistjdic conflicts ipadic jumandic description {Use naist-jdic} {
     65variant naistjdic conflicts ipadic jumandic unidic neologd description {Use naist-jdic} {
    7066    set dicname         naist-jdic
    7167    if {${encoding} == "eucjp"} {
     
    7773
    7874if {${encoding} == "utf8"} {
    79     variant unidic conflicts ipadic jumandic naistjdic description {Use unidic} {
     75    variant unidic conflicts ipadic jumandic naistjdic neologd description {Use unidic} {
    8076        set dicname         unidic
    8177        depends_lib-append  port:unidic-mecab
    8278    }
     79
     80    variant neologd conflicts ipadic jumandic naistjdic unidic description {Use neologd} {
     81        set dicname         neologd
     82        depends_lib-append  port:mecab-ipadic-neologd
     83    }
     84}
     85
     86if {([variant_isset unidic] || [variant_isset neologd]) && ${encoding} != "utf8"} {
     87    ui_error "Please install 'mecab-utf8' to use 'unidic' or 'neologd'."
     88    error "invalid variant"
    8389}
    8490
     
    95101}
    96102
     103if {![variant_isset jumandic] && ![variant_isset naistjdic] &&
     104    ![variant_isset unidic] && ![variant_isset neologd]} {
     105    default_variants    +ipadic
     106}
     107
    97108destroot {
    98109    set dest_dic ${destroot}${prefix}/lib/mecab/dic
Note: See TracChangeset for help on using the changeset viewer.