diff options
author | clsung <clsung@FreeBSD.org> | 2007-04-24 15:32:23 +0800 |
---|---|---|
committer | clsung <clsung@FreeBSD.org> | 2007-04-24 15:32:23 +0800 |
commit | 9bbc80e11a71fe9dce255b30dcb03f60be508062 (patch) | |
tree | a6c9016bb0156e6f2cab6fa99cc8af78bb0034ce /japanese | |
parent | 7137f3fa152085fd84917966ae26793b53b9249c (diff) | |
download | freebsd-ports-gnome-9bbc80e11a71fe9dce255b30dcb03f60be508062.tar.gz freebsd-ports-gnome-9bbc80e11a71fe9dce255b30dcb03f60be508062.tar.zst freebsd-ports-gnome-9bbc80e11a71fe9dce255b30dcb03f60be508062.zip |
- 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)
Diffstat (limited to 'japanese')
-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- |