diff options
Diffstat (limited to 'japanese/p5-Text-MeCab')
-rw-r--r-- | japanese/p5-Text-MeCab/Makefile | 14 |
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- |