summaryrefslogtreecommitdiff
path: root/inputmethod/canna-dict/Makefile
blob: 313452e7490a8f4d4163ba3384332b952f51a199 (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.9 2005/12/05 20:50:23 rillig Exp $
#
.include "../../inputmethod/canna/Makefile.common"

CANNA_MODULE=	dict

BUILD_DEPENDS+=	Canna-server>=${CANNA_VERSION}:../../inputmethod/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 "../../inputmethod/canna/Makefile.include"

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