New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 81621


Ignore:
Timestamp:
08/02/11 19:38:15 (4 years ago)
Author:
hum@…
Message:

java/mecab-java: 0.98pre3_1

  • abort an installation if mecab +utf8 is not installed.

See http://lists.macosforge.org/pipermail/macports-dev/2011-August/015476.html
Thanks to Ryan.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/java/mecab-java/Portfile

    r81539 r81621  
    66name                mecab-java 
    77version             0.98pre3 
     8revision            1 
    89categories          java textproc japanese 
    910platforms           darwin 
     
    2021                    rmd160  9214b1e3b2f24334709bdd3adc69da076c892c67 
    2122 
    22 depends_lib         port:mecab 
     23# This port requires mecab+utf8 althought the default character encoding of 
     24# mecab is not utf-8 but euc-jp. 
     25# It will just check the encoding of mecab in the pre-fetch phase instead of 
     26# depends_lib, because depends_lib could not specify a variant. 
     27#depends_lib         port:mecab 
     28 
     29pre-fetch { 
     30    catch {exec $prefix/bin/mecab -D} dict_info 
     31    if {![regexp {charset:\s+utf\-8} $dict_info]} { 
     32        ui_error "mecab-java requires MeCab for UTF-8.\ 
     33                  Please install mecab +utf8 first.\ 
     34                  If another encoding version of MeCab is already installed,\ 
     35                  you should uninstall mecab beforehand." 
     36        return -code error "MeCab for UTF-8 is missing" 
     37    } 
     38} 
    2339 
    2440patchfiles          patch-Makefile.diff \ 
     
    5470    xinstall -m 644 ${worksrcpath}/lib${name}.dylib \ 
    5571        ${destroot}${prefix}/lib 
    56  
    57     ui_msg "*****************************************************" 
    58     ui_msg "* This port requires MeCab for UTF-8." 
    59     ui_msg "* If another encoding version of MeCab is installed, " 
    60     ui_msg "* you should re-install mecab +utf8 and this port." 
    61     ui_msg "*****************************************************" 
    6272} 
    6373 
Note: See TracChangeset for help on using the changeset viewer.