summaryrefslogtreecommitdiff
path: root/japanese
diff options
context:
space:
mode:
authorCheng-Lung Sung <clsung@FreeBSD.org>2007-04-24 07:32:23 +0000
committerCheng-Lung Sung <clsung@FreeBSD.org>2007-04-24 07:32:23 +0000
commit9a458f0186cbdbf5dc51a80152a5c7fef462d05e (patch)
tree6cf5d9da143208c592f99cc02d4de49a768cb424 /japanese
parent- unbreak via updating distinfo*. (diff)
- Add ENCODING knob.
- Text::MeCab needs to know dictionary encoding at compiling. Available encodings are euc-jp (default), shift_jis or utf8. PR: ports/112039 Submitted by: maintainer (TAOKA Fumiyoshi)
Notes
Notes: svn path=/head/; revision=190790
Diffstat (limited to 'japanese')
-rw-r--r--japanese/p5-Text-MeCab/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/japanese/p5-Text-MeCab/Makefile b/japanese/p5-Text-MeCab/Makefile
index 7a20fd7749fb..2df375ebdebd 100644
--- a/japanese/p5-Text-MeCab/Makefile
+++ b/japanese/p5-Text-MeCab/Makefile
@@ -7,6 +7,7 @@
PORTNAME= Text-MeCab
PORTVERSION= 0.15
+PORTREVISION= 1
CATEGORIES= japanese textproc perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Text
@@ -22,10 +23,21 @@ MAN3= Text::MeCab.3 \
PERL_CONFIGURE= yes
CONFIGURE_ARGS= </dev/null
+# dictionary encoding (euc-jp, shift_jis, utf8)
+ENCODING?= euc-jp
+
post-patch:
- # To prevent CCFLAGS value from being overwritten by the ports system
+# To prevent CCFLAGS value from being overwritten by the ports system
@${REINPLACE_CMD} -e 's|CCFLAGS|DEFINE|g' ${WRKSRC}/Makefile.PL
+.if ${ENCODING} == "shift_jis"
+ @${REINPLACE_CMD} -e '/my \$$encoding = /s/euc-jp/shift_jis/' \
+ ${WRKSRC}/tools/probe_mecab.pl
+.elif ${ENCODING} == "utf8"
+ @${REINPLACE_CMD} -e '/my \$$encoding = /s/euc-jp/utf8/' \
+ ${WRKSRC}/tools/probe_mecab.pl
+.endif
+
.include <bsd.port.pre.mk>
PKGNAMEPREFIX:= ${PKGNAMEPREFIX}p5-