summaryrefslogtreecommitdiff
path: root/inputmethod/canna-dict/Makefile
blob: 567e7af954e4d6ab30c89fef561576d76b2b5ecb (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
# $NetBSD: Makefile,v 1.7 2004/01/27 00:53:11 heinz Exp $
#
.include "../canna/Makefile.common"

CANNA_MODULE=	dict

BUILD_DEPENDS+=	Canna-server>=${CANNA_VERSION}:../canna-server

NO_MTREE=	yes
OWN_DIRS=	${PREFIX}/canna

EVAL_PREFIX+=	CANNASERVERBINDIR=Canna-server
.for cmd in MERGE FORCPP FORSORT SPLITWORD MERGEWORD CRXGRAM CRXDIC CRFREQ KPDIC
CANNA_CMD_SED_SCRIPT+=-e 's|\(${cmd} = \).*/\(.*\)|\1${CANNASERVERBINDIR}/bin/\2|'
.endfor

post-patch:
	@${MV} ${WRKSRC}/Canna.conf ${WRKSRC}/Canna.conf.orig
	@${SED} -e 's|\(DicDir.*=\).*|\1${IMDICTDIR}/canna|' \
		${WRKSRC}/Canna.conf.orig > ${WRKSRC}/Canna.conf
	@for file in `${FIND} ${WRKSRC}/dic/ideo -name Imakefile -print`; do \
		${MV} $$file $$file.orig;	\
		${SED} ${CANNA_CMD_SED_SCRIPT} $$file.orig > $$file;	\
	 done

do-configure:
	@cd ${WRKSRC}/dic/ideo; ${XMKMF}

do-build:
	@cd ${WRKSRC}/dic/ideo; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM}

do-install:
	@cd ${WRKSRC}/dic/ideo; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} install

.include "../canna/Makefile.include"

# Need to set this here _after_ bsd.pkg.mk
PREFIX=		${IMDICTDIR}