1997-09-10 06:52:02 +00:00
|
|
|
# New ports collection makefile for: Wnn for Japanese
|
1994-11-22 23:37:45 +00:00
|
|
|
# Version required: 4.2
|
1997-09-10 06:52:02 +00:00
|
|
|
# Date created: 20 July 1997
|
|
|
|
# Whom: Satoshi Taoka <taoka@infonets.hiroshima-u.ac.jp>
|
1994-11-22 23:37:45 +00:00
|
|
|
#
|
1999-04-22 15:58:54 +00:00
|
|
|
# $Id: Makefile,v 1.22 1999/02/10 14:31:58 kuriyama Exp $
|
1994-11-22 23:37:45 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
DISTNAME= Wnn4.2
|
1997-09-19 09:34:33 +00:00
|
|
|
PKGNAME?= ja-Wnn-4.2
|
1997-09-10 06:52:02 +00:00
|
|
|
CATEGORIES?= japanese
|
|
|
|
MASTER_SITES= ftp://ftp.u-tokyo.ac.jp/pub/Japanese/Wnn/ \
|
1999-02-10 14:32:00 +00:00
|
|
|
ftp://ftp.wg.omron.co.jp/pub/Wnn/dic/pubdic+/ \
|
|
|
|
http://www.infonets.hiroshima-u.ac.jp/~taoka/FreeBSD/Wnn/
|
|
|
|
DISTFILES= Wnn4.2.tar.gz ${WNN_EXTRA_PATCH}
|
1995-04-07 05:48:11 +00:00
|
|
|
|
1997-09-10 06:52:02 +00:00
|
|
|
MAINTAINER= taoka@infonets.hiroshima-u.ac.jp
|
1995-04-07 05:48:11 +00:00
|
|
|
|
1998-10-04 12:54:11 +00:00
|
|
|
BUILD_DEPENDS= imake:${PORTSDIR}/x11/XFree86
|
|
|
|
|
1997-09-10 06:52:02 +00:00
|
|
|
EXTRACT_ONLY= Wnn4.2.tar.gz
|
|
|
|
PATCHDIR= ${.CURDIR}/../../japanese/Wnn/patches
|
|
|
|
FILESDIR= ${.CURDIR}/../../japanese/Wnn/files
|
|
|
|
PKGDIR= ${.CURDIR}/../../japanese/Wnn/pkg
|
1994-11-22 23:37:45 +00:00
|
|
|
WRKSRC= ${WRKDIR}/Xsi
|
|
|
|
|
1999-02-10 14:32:00 +00:00
|
|
|
WNN_EXTRA_PATCH= Wnn4.2.patch-981201.tar.gz
|
|
|
|
MAKE_ENV+= PATH=/usr/bin:$${PATH} PORT_IMAKE_DEFINES='${WNN_DEF}'
|
|
|
|
|
1999-04-22 15:58:54 +00:00
|
|
|
.if defined(BATCH)
|
|
|
|
BATCH= yes # make sure it's not empty
|
|
|
|
.endif
|
|
|
|
|
1997-09-19 09:34:33 +00:00
|
|
|
.if (${PKGNAME} == ja-Wnn-4.2)
|
1999-02-10 14:32:00 +00:00
|
|
|
DISTFILES+= pubdic+.tar.gz pubdic+-fix01.gz pubdic+.diff pubdic+.special.diff
|
1997-09-19 09:34:33 +00:00
|
|
|
PORT_DOCDIR= ${PREFIX}/share/doc/ja-Wnn
|
1997-09-10 06:52:02 +00:00
|
|
|
DOC_FROM= ${WRKSRC}/Wnn
|
1999-02-10 14:32:00 +00:00
|
|
|
BuildWnn= YES
|
|
|
|
BuildJlibV3= YES
|
|
|
|
LOCAL_MAN_LANG= ja
|
|
|
|
SHARED_LIB= libwnn4
|
|
|
|
.else
|
|
|
|
BuildWnn= NO
|
|
|
|
.endif
|
|
|
|
.if (${PKGNAME} == zh-Wnn-4.2)
|
1997-09-23 02:18:00 +00:00
|
|
|
PORT_DOCDIR= ${PREFIX}/share/doc/zh-Wnn
|
1997-09-10 06:52:02 +00:00
|
|
|
DOC_FROM= ${WRKSRC}/cWnn
|
1999-02-10 14:32:00 +00:00
|
|
|
BuildCWnn= YES
|
|
|
|
SHARED_LIB= libcwnn4
|
|
|
|
.else
|
|
|
|
BuildCWnn= NO
|
|
|
|
.endif
|
|
|
|
.if (${PKGNAME} == ko-Wnn-4.2)
|
|
|
|
# kWnn has no manual.
|
|
|
|
BuildKWnn= YES
|
|
|
|
SHARED_LIB= libkwnn4
|
|
|
|
.else
|
|
|
|
BuildKWnn= NO
|
|
|
|
.endif
|
|
|
|
BuildXwnmo= YES
|
|
|
|
# pubdic+
|
|
|
|
PUBDICPDIR= ${WRKSRC}/pubdic+
|
|
|
|
WDICS= bio.u computer.u kihon.u setsuji.u tankan.u \
|
|
|
|
chimei.u jinmei.u koyuu.u symbol.u special.u
|
|
|
|
ATOD= ${WRKSRC}/Wnn/jutil/atod -h ${WRKSRC}/Wnn/jd/hinsi.data
|
|
|
|
#WNN_DEF+= -DBuildPubdic=NO
|
|
|
|
# TOPDIR should be a full path provided we build a shared library.
|
|
|
|
WNN_DEF+= -DTOPDIR=${WRKSRC}
|
1997-09-10 06:52:02 +00:00
|
|
|
|
1997-06-19 11:26:08 +00:00
|
|
|
post-extract:
|
1999-02-03 11:12:01 +00:00
|
|
|
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
|
1999-02-10 14:32:00 +00:00
|
|
|
${_DISTDIR}${WNN_EXTRA_PATCH} ${EXTRACT_AFTER_ARGS} \
|
1999-02-03 11:12:01 +00:00
|
|
|
-C ${WRKSRC}
|
1998-10-04 12:54:11 +00:00
|
|
|
${LN} -sf Project.tmpl ${WRKSRC}/config/X11.tmpl
|
1999-02-10 14:32:00 +00:00
|
|
|
.if (${PKGNAME} == ja-Wnn-4.2)
|
|
|
|
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}pubdic+.tar.gz ${EXTRACT_AFTER_ARGS} -C ${WRKSRC}
|
|
|
|
.endif
|
1997-06-19 11:26:08 +00:00
|
|
|
|
1997-09-10 06:52:02 +00:00
|
|
|
pre-patch:
|
1999-02-10 14:32:00 +00:00
|
|
|
cd ${WRKSRC}; ${PATCH} ${PATCH_DIST_ARGS} < ${WRKSRC}/Wnn-patch-01Dec98
|
1997-09-10 06:52:02 +00:00
|
|
|
|
1999-02-10 14:32:00 +00:00
|
|
|
#### pubdic+
|
|
|
|
.if (${PKGNAME} == ja-Wnn-4.2)
|
1997-09-10 06:52:02 +00:00
|
|
|
post-patch:
|
1999-02-10 14:32:00 +00:00
|
|
|
cd ${PUBDICPDIR}; \
|
|
|
|
${GZCAT} ${_DISTDIR}pubdic+-fix01.gz | ${PATCH} --quiet; \
|
|
|
|
${PATCH} --quiet < ${_DISTDIR}pubdic+.diff; \
|
|
|
|
${PATCH} --quiet < ${_DISTDIR}pubdic+.special.diff
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-configure:
|
1997-09-10 06:52:02 +00:00
|
|
|
for file in ${WRKSRC}/config/Project.tmpl \
|
|
|
|
${WRKSRC}/Contrib/dic/gerodic/Makefile; do \
|
1997-09-19 09:34:33 +00:00
|
|
|
${MV} $$file $$file.orig2; \
|
1999-02-10 14:32:00 +00:00
|
|
|
${SED} -e 's!^\([ ]*PREFIX = \).*$$!\1${PREFIX}!' \
|
|
|
|
-e 's!%%LOCAL_MAN_LANG%%!${LOCAL_MAN_LANG}!' \
|
|
|
|
-e 's!%%BuildWnn%%!${BuildWnn}!' \
|
|
|
|
-e 's!%%BuildCWnn%%!${BuildCWnn}!' \
|
|
|
|
-e 's!%%BuildKWnn%%!${BuildKWnn}!' \
|
|
|
|
-e 's!%%BuildXwnmo%%!${BuildXwnmo}!' \
|
|
|
|
-e 's!%%BuildJlibV3%%!${BuildJlibV3}!' \
|
1997-09-10 06:52:02 +00:00
|
|
|
$$file.orig2 > $$file; \
|
|
|
|
done
|
|
|
|
|
1999-02-10 14:32:00 +00:00
|
|
|
do-configure:
|
|
|
|
(cd ${WRKSRC}; \
|
|
|
|
imake -DUseInstalled -I${WRKSRC}/config \
|
|
|
|
-I${X11BASE}/lib/X11/config -DTOPDIR=${WRKSRC}; \
|
|
|
|
${MAKE} Makefiles; \
|
|
|
|
${MAKE} clean; \
|
|
|
|
${MAKE} includes; \
|
|
|
|
${MAKE} depend )
|
|
|
|
|
|
|
|
pre-build:
|
|
|
|
#### pubdic+
|
|
|
|
.if (${PKGNAME} == ja-Wnn-4.2)
|
|
|
|
cd ${PUBDICPDIR}; ${XMKMF}; ${MAKE} wnn; \
|
|
|
|
cd ${WRKSRC}/Pubdic; \
|
|
|
|
for file in ${WDICS}; do \
|
|
|
|
${MV} -f $$file $$file.org; \
|
|
|
|
${MV} ../pubdic+/$$file . ; \
|
|
|
|
hdfile=`echo $$file | ${SED} 's/\\.u/.hd/'`; \
|
|
|
|
${MV} -f $$hdfile $$hdfile.org; \
|
|
|
|
${SED} 's,(pubdic),(pubdic+),' $$hdfile.org > $$hdfile; \
|
|
|
|
done
|
|
|
|
.endif
|
|
|
|
|
1994-11-22 23:37:45 +00:00
|
|
|
# These are necesary because this package uses a different Makefile for
|
|
|
|
# building and installing etc.
|
1999-02-10 14:32:00 +00:00
|
|
|
#do-build:
|
|
|
|
# @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} Makefile.inst World)
|
|
|
|
|
|
|
|
#### gerodic
|
|
|
|
.if (${PKGNAME} == ja-Wnn-4.2)
|
|
|
|
post-build:
|
|
|
|
cd ${WRKSRC}/Contrib/dic/gerodic; \
|
|
|
|
${ATOD} -h ${WRKSRC}/Pubdic/hinsi.data g-jinmei.dic < g-jinmei.u
|
|
|
|
.endif
|
1997-09-10 06:52:02 +00:00
|
|
|
|
|
|
|
pre-install:
|
1999-04-22 15:58:54 +00:00
|
|
|
@${SETENV} BATCH=${BATCH} \
|
|
|
|
${SH} ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL
|
1994-11-22 23:37:45 +00:00
|
|
|
|
1995-04-20 18:05:40 +00:00
|
|
|
post-install:
|
1999-02-10 14:32:00 +00:00
|
|
|
#### gerodic
|
|
|
|
.if (${PKGNAME} == ja-Wnn-4.2)
|
|
|
|
cd ${WRKSRC}/Contrib/dic/gerodic; \
|
|
|
|
make all install
|
|
|
|
.endif
|
|
|
|
####
|
1994-11-22 23:37:45 +00:00
|
|
|
# This package uses imake's "install.man" target to install man pages but
|
|
|
|
# I can't define USE_IMAKE because it doesn't involve xmkmf
|
1999-02-10 14:32:00 +00:00
|
|
|
@cd ${WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man
|
1997-09-19 09:34:33 +00:00
|
|
|
@${SETENV} PKG_PREFIX=${PREFIX} \
|
|
|
|
${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
|
1997-09-10 06:52:02 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
.if defined(PORT_DOCDIR)
|
|
|
|
${MKDIR} ${PORT_DOCDIR}
|
|
|
|
@(cd ${DOC_FROM}; tar cvf - manual manual.en | \
|
|
|
|
(cd ${PORT_DOCDIR}; tar xf -))
|
|
|
|
@chown -R bin.bin ${PORT_DOCDIR}
|
|
|
|
.endif
|
|
|
|
.endif
|
1999-02-10 14:32:00 +00:00
|
|
|
### for the shared libray
|
|
|
|
if [ X"${PORTOBJFORMAT}" != Xelf ]; then \
|
|
|
|
${LN} -sf ${SHARED_LIB}.so.1.0 \
|
|
|
|
${X11BASE}/lib/${SHARED_LIB}.so; \
|
|
|
|
fi
|
|
|
|
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib
|
1994-11-22 23:37:45 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|