mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
- 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)
This commit is contained in:
parent
8065bfbcc3
commit
9a458f0186
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=190790
@ -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-
|
||||
|
Loading…
Reference in New Issue
Block a user