ports/112039: japanese/p5-Text-MeCab: add ENCODING knob
TAOKA Fumiyoshi
fmysh at iijmio-mail.jp
Mon Apr 23 16:30:05 UTC 2007
>Number: 112039
>Category: ports
>Synopsis: japanese/p5-Text-MeCab: add ENCODING knob
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Apr 23 16:30:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: TAOKA Fumiyoshi
>Release:
>Organization:
>Environment:
>Description:
Add ENCODING knob.
Text::MeCab needs to know dictionary encoding at compiling.
Available encodings are euc-jp (default), shift_jis or utf8.
>How-To-Repeat:
>Fix:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/japanese/p5-Text-MeCab/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile 10 Feb 2007 08:49:33 -0000 1.4
+++ Makefile 19 Apr 2007 06:50:23 -0000
@@ -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 @@
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-
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list