summaryrefslogtreecommitdiff
path: root/japanese/p5-Text-MeCab/Makefile
blob: 0cc5c5aa1246e5a3acb0fdd4554b99422955c6c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Created by: TAOKA Fumiyoshi <fmysh@iijmio-mail.jp>
# $FreeBSD$

PORTNAME=		Text-MeCab
PORTVERSION=		0.20009
CATEGORIES=		japanese textproc perl5
MASTER_SITES=		CPAN

MAINTAINER=		fmysh@iijmio-mail.jp
COMMENT=		Alternate Interface To libmecab

BUILD_DEPENDS=		p5-Devel-PPPort>=3.19:${PORTSDIR}/devel/p5-Devel-PPPort \
			p5-ExtUtils-ParseXS>=2.21:${PORTSDIR}/devel/p5-ExtUtils-ParseXS \
			p5-Test-Simple>=0.84:${PORTSDIR}/devel/p5-Test-Simple \
			p5-Test-Requires>0:${PORTSDIR}/devel/p5-Test-Requires
RUN_DEPENDS=		p5-Class-Accessor>0:${PORTSDIR}/devel/p5-Class-Accessor \
			p5-Encode>0:${PORTSDIR}/converters/p5-Encode\
			p5-XSLoader>0.1:${PORTSDIR}/devel/p5-XSLoader
LIB_DEPENDS=		mecab:${PORTSDIR}/japanese/mecab

MAKE_JOBS_UNSAFE=	yes

MAN3=			Text::MeCab.3 \
			Text::MeCab::Dict.3 \
			Text::MeCab::Node.3

USES=		perl5
USE_PERL5=	configure
CONFIGURE_ARGS=	</dev/null

# dictionary encoding (euc-jp, shift_jis, utf-8)
ENCODING?=	euc-jp

NO_STAGE=	yes
post-patch:
	@${REINPLACE_CMD} -e "/default_encoding = /s/euc-jp/${ENCODING}/" \
		${WRKSRC}/tools/probe_mecab.pl

post-configure:
	@${REINPLACE_CMD} -e "/^LD = /s/cc/cc -pthread/" \
		${WRKSRC}/Makefile

.include <bsd.port.pre.mk>

PKGNAMEPREFIX:=	${PKGNAMEPREFIX}p5-

.include <bsd.port.post.mk>