summaryrefslogtreecommitdiffstats
path: root/japanese/onew/Makefile
blob: 4be843e65af363137b583c9e58cc93732772f9c5 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Created by: Satoshi TAOKA <taoka@FreeBSD.org>
# $FreeBSD$

PORTNAME=	onew
PORTVERSION=	2.2.10
PORTREVISION=	2
CATEGORIES=	japanese
MASTER_SITES=	ftp://ftp.lab.kdd.co.jp/Japan/onew/ \
		ftp://ftp.leo.chubu.ac.jp/pub/editor/jvim/
DISTNAME=	jvim2.0r+${PORTNAME}${PORTVERSION}

MAINTAINER=	hrs@FreeBSD.org
COMMENT=	Library for Japanese Input Methods

WRKSRC=		${WRKDIR}/${PORTNAME}
ALL_TARGET=
CFLAGS+=	-I${WRKSRC}
PORTDOCS=	README.ONEW

OPTIONS_DEFINE=	CANNA CANNA_FREEWNN CANNA_WNN6 CANNA_WNN7 FREEWNN WNN6 WNN7
OPTIONS_DEFAULT=CANNA CANNA_FREEWNN CANNA_WNN6 CANNA_WNN7 FREEWNN WNN6 WNN7
CANNA_DESC=		Build Canna-backend library
CANNA_FREEWNN_DESC=	Build Canna+FreeWnn-backend library
CANNA_WNN6_DESC=	Build Canna+Wnn6-backend library
CANNA_WNN7_DESC=	Build Canna+Wnn7-backend library
FREEWNN_DESC=		Build FreeWnn-backend library
WNN6_DESC=		Build Wnn6-backend library
WNN7_DESC=		Build Wnn7-backend library
CANNA_LIB_DEPENDS=	libcanna.so:japanese/canna-lib
CANNA_FREEWNN_BUILD_DEPENDS=	${FREEWNN_BUILD_DEPENDS}
CANNA_WNN6_BUILD_DEPENDS=	${WNN6_BUILD_DEPENDS}
CANNA_WNN7_BUILD_DEPENDS=	${WNN7_BUILD_DEPENDS}
RK_DIR.CANNA_WNN6=	${RKDIR.WNN6}
RK_DIR.CANNA_WNN7=	${RKDIR.WNN7}
FREEWNN_BUILD_DEPENDS=	${LOCALBASE}/lib/libjd.a:japanese/FreeWnn-lib
WNN6_BUILD_DEPENDS=	${FREEWNN_BUILD_DEPENDS}
RK_DIR.WNN6=		${LOCALBASE}/lib/wnn/ja_JP/rk.wnn6
WNN7_BUILD_DEPENDS=	${FREEWNN_BUILD_DEPENDS}
RK_DIR.WNN7=		${LOCALBASE}/lib/wnn/ja_JP/rk.wnn7

.include <bsd.port.options.mk>

.for I in ${OPTIONS_DEFINE:NDOCS}
.if ${PORT_OPTIONS:M${I}}
INPUT_METHOD+=	${I:S/_/+/g:tl}
SUB_FILES+=	ONEW_CONF-for-${I:S/_/+/g:tl}
PLIST_FILES+=	lib/libonew-${I:S/_/+/g:tl}.a
RK_DIR+=	${RK_DIR.${I}}
.endif
.endfor

pre-build: apply-slist

do-build:
.for I in ${INPUT_METHOD}
	${INSTALL_DATA} ${WRKDIR}/ONEW_CONF-for-${I} ${WRKSRC}/ONEW_CONF
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${ALL_TARGET}
	${INSTALL_DATA} ${WRKSRC}/libonew.a ${WRKDIR}/libonew-${I}.a
.endfor

do-install:
.for I in ${INPUT_METHOD}
	${INSTALL_DATA} ${WRKDIR}/libonew-${I}.a \
	    ${STAGEDIR}${PREFIX}/lib/libonew-${I}.a
.endfor
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README.ONEW ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>
OpenPOWER on IntegriCloud