[81621] trunk/dports/java/mecab-java/Portfile
hum at macports.org
hum at macports.org
Tue Aug 2 19:38:16 PDT 2011
Revision: 81621
http://trac.macports.org/changeset/81621
Author: hum at macports.org
Date: 2011-08-02 19:38:15 -0700 (Tue, 02 Aug 2011)
Log 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.
Modified Paths:
--------------
trunk/dports/java/mecab-java/Portfile
Modified: trunk/dports/java/mecab-java/Portfile
===================================================================
--- trunk/dports/java/mecab-java/Portfile 2011-08-03 02:30:47 UTC (rev 81620)
+++ trunk/dports/java/mecab-java/Portfile 2011-08-03 02:38:15 UTC (rev 81621)
@@ -5,6 +5,7 @@
name mecab-java
version 0.98pre3
+revision 1
categories java textproc japanese
platforms darwin
maintainers nomaintainer
@@ -19,8 +20,23 @@
checksums sha1 dcd5c636f76cf7040f7c3ec0380d45b6851dce03 \
rmd160 9214b1e3b2f24334709bdd3adc69da076c892c67
-depends_lib port:mecab
+# This port requires mecab+utf8 althought the default character encoding of
+# mecab is not utf-8 but euc-jp.
+# It will just check the encoding of mecab in the pre-fetch phase instead of
+# depends_lib, because depends_lib could not specify a variant.
+#depends_lib port:mecab
+pre-fetch {
+ catch {exec $prefix/bin/mecab -D} dict_info
+ if {![regexp {charset:\s+utf\-8} $dict_info]} {
+ ui_error "mecab-java requires MeCab for UTF-8.\
+ Please install mecab +utf8 first.\
+ If another encoding version of MeCab is already installed,\
+ you should uninstall mecab beforehand."
+ return -code error "MeCab for UTF-8 is missing"
+ }
+}
+
patchfiles patch-Makefile.diff \
patch-test.java.diff
@@ -53,12 +69,6 @@
${destroot}${prefix}/share/java
xinstall -m 644 ${worksrcpath}/lib${name}.dylib \
${destroot}${prefix}/lib
-
- ui_msg "*****************************************************"
- ui_msg "* This port requires MeCab for UTF-8."
- ui_msg "* If another encoding version of MeCab is installed, "
- ui_msg "* you should re-install mecab +utf8 and this port."
- ui_msg "*****************************************************"
}
# a distfile folder for a newer version 0.98 exists, but is empty.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110802/af8e862a/attachment.html>
More information about the macports-changes
mailing list