2000-04-05 13:13:55 -04:00
|
|
|
# From FreeBSD: Satoshi Taoka <taoka@infonets.hiroshima-u.ac.jp>
|
1998-07-28 21:31:02 -04:00
|
|
|
#
|
|
|
|
# $FreeBSD: Makefile,v 1.19 1997/09/23 02:17:58 max Exp $
|
2004-01-02 17:03:36 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.46 2004/01/02 22:03:36 espie Exp $
|
2001-03-28 10:13:03 -05:00
|
|
|
|
|
|
|
COMMENT= "Japanese input method"
|
|
|
|
COMMENT-dict= "dictionaries for Japanese Wnn"
|
|
|
|
COMMENT-ko= "Korean input method"
|
|
|
|
COMMENT-kodict= "dictionaries for Korean Wnn"
|
|
|
|
COMMENT-zh= "Chinese input method"
|
|
|
|
COMMENT-zhdict= "dictionaries for Chinese Wnn"
|
|
|
|
COMMENT-data= "common files to all languages of Wnn"
|
2001-04-02 06:33:45 -04:00
|
|
|
COMMENT-xwnmo= "X11 input method for Wnn"
|
2001-03-28 10:13:03 -05:00
|
|
|
|
1998-07-28 21:31:02 -04:00
|
|
|
DISTNAME= Wnn4.2
|
2000-04-21 11:09:51 -04:00
|
|
|
|
2001-03-28 10:13:03 -05:00
|
|
|
# If you are building this manually, you can override MULTI_PACKAGES
|
|
|
|
# on the command line, and thus avoid building all three languages
|
|
|
|
|
|
|
|
MULTI_PACKAGES=-dict -zh -zhdict -ko -kodict -xwnmo -data
|
2002-10-26 20:52:43 -04:00
|
|
|
|
2003-06-23 15:11:10 -04:00
|
|
|
PKGNAME= ja-Wnn-4.2p0
|
|
|
|
PKGNAME-dict= ja-Wnndict-4.2p0
|
|
|
|
PKGNAME-zh= zh-Wnn-4.2p0
|
|
|
|
PKGNAME-zhdict= zh-Wnndict-4.2p0
|
|
|
|
PKGNAME-ko= ko-Wnn-4.2p0
|
|
|
|
PKGNAME-kodict= ko-Wnndict-4.2p0
|
2001-03-16 10:42:49 -05:00
|
|
|
PKGNAME-xwnmo= Wnn-xwnmo-4.2
|
2001-03-28 10:13:03 -05:00
|
|
|
PKGNAME-data= Wnn-data-4.2
|
2001-03-16 10:42:49 -05:00
|
|
|
|
2000-04-21 11:09:51 -04:00
|
|
|
WNNDICDIR=/var/dict/Wnn
|
2001-08-18 09:25:42 -04:00
|
|
|
WNNBASE=${LOCALBASE}
|
|
|
|
SUBST_VARS=WNNBASE
|
2000-04-21 11:09:51 -04:00
|
|
|
|
2001-04-20 11:12:03 -04:00
|
|
|
.if defined(PACKAGING)
|
2001-04-23 19:19:02 -04:00
|
|
|
SUBPACKAGE?=
|
2001-04-20 11:12:03 -04:00
|
|
|
. if ${SUBPACKAGE} == "-dict"
|
2000-04-20 20:36:06 -04:00
|
|
|
CATEGORIES= japanese
|
2000-04-21 11:09:51 -04:00
|
|
|
PREFIX=${WNNDICDIR}
|
2001-04-20 11:12:03 -04:00
|
|
|
. elif ${SUBPACKAGE} == "-zh"
|
2000-04-20 20:36:06 -04:00
|
|
|
CATEGORIES= chinese
|
2001-04-20 11:12:03 -04:00
|
|
|
. elif ${SUBPACKAGE} == "-zhdict"
|
2000-04-20 20:36:06 -04:00
|
|
|
CATEGORIES= chinese
|
2000-04-21 11:09:51 -04:00
|
|
|
PREFIX=${WNNDICDIR}
|
2001-04-20 11:12:03 -04:00
|
|
|
. elif ${SUBPACKAGE} == "-ko"
|
2000-04-20 20:36:06 -04:00
|
|
|
CATEGORIES= korean
|
2001-04-20 11:12:03 -04:00
|
|
|
. elif ${SUBPACKAGE} == "-kodict"
|
2000-04-20 20:36:06 -04:00
|
|
|
CATEGORIES= korean
|
2000-04-21 11:09:51 -04:00
|
|
|
PREFIX=${WNNDICDIR}
|
2001-04-20 11:12:03 -04:00
|
|
|
. elif ${SUBPACKAGE} == "-xwnmo"
|
2000-04-22 08:05:57 -04:00
|
|
|
CATEGORIES= japanese chinese korean
|
2001-04-20 11:12:03 -04:00
|
|
|
. elif ${SUBPACKAGE} == "-data"
|
2001-03-28 10:13:03 -05:00
|
|
|
CATEGORIES= japanese chinese korean
|
2001-04-20 11:12:03 -04:00
|
|
|
. else
|
|
|
|
CATEGORIES= japanese
|
|
|
|
. endif
|
|
|
|
. if ${SUBPACKAGE} != "-data"
|
2001-09-19 12:03:09 -04:00
|
|
|
RUN_DEPENDS= ::japanese/Wnn,-data
|
2001-04-20 11:12:03 -04:00
|
|
|
. endif
|
2000-04-20 19:32:22 -04:00
|
|
|
.else
|
2000-04-20 20:36:06 -04:00
|
|
|
CATEGORIES= japanese
|
2000-04-20 19:32:22 -04:00
|
|
|
.endif
|
|
|
|
|
1998-07-28 21:31:02 -04:00
|
|
|
MASTER_SITES= ftp://ftp.u-tokyo.ac.jp/pub/Japanese/Wnn/ \
|
|
|
|
ftp://ports.jp.FreeBSD.org/pub/incoming/distfiles/
|
|
|
|
DISTFILES= Wnn4.2.tar.gz Wnn4.2.patch.tar.gz
|
|
|
|
|
2000-10-09 20:40:20 -04:00
|
|
|
MAINTAINER= Marc Espie <espie@openbsd.org>
|
1998-07-28 21:31:02 -04:00
|
|
|
|
2000-10-09 20:40:20 -04:00
|
|
|
# BSD
|
2000-04-05 13:13:55 -04:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2000-02-12 01:29:49 -05:00
|
|
|
|
1998-07-28 21:31:02 -04:00
|
|
|
EXTRACT_ONLY= Wnn4.2.tar.gz
|
2000-04-05 13:13:55 -04:00
|
|
|
WRKDIST= ${WRKDIR}/Xsi
|
2000-04-20 20:25:25 -04:00
|
|
|
# `User' configuration file
|
|
|
|
CONFIG_FILE= ${WRKDIST}/config/config.h
|
1999-11-02 20:06:42 -05:00
|
|
|
|
2000-04-20 20:36:06 -04:00
|
|
|
PORT_JDOCDIR= ${PREFIX}/share/doc/ja-Wnn
|
|
|
|
JDOC_FROM= ${WRKSRC}/Wnn
|
|
|
|
|
|
|
|
PORT_CDOCDIR= ${PREFIX}/share/doc/zh-cWnn
|
|
|
|
CDOC_FROM= ${WRKSRC}/cWnn
|
1998-07-28 21:31:02 -04:00
|
|
|
|
2000-04-16 17:53:26 -04:00
|
|
|
# Will turn into a RUN_DEPENDS when we install non-formatted manpages
|
2002-06-09 01:31:40 -04:00
|
|
|
BUILD_DEPENDS= :ja-groff-*:japanese/groff
|
2000-04-20 19:32:22 -04:00
|
|
|
# Run depends ensure this does not turn into infinite recursion, since
|
|
|
|
# this is not needed before package build time.
|
2001-03-28 10:13:03 -05:00
|
|
|
|
2003-03-31 08:44:03 -05:00
|
|
|
USE_X11= Yes
|
|
|
|
|
2000-04-05 13:13:55 -04:00
|
|
|
do-distpatch:
|
|
|
|
cd ${WRKDIR} && tar zxf ${FULLDISTDIR}/Wnn4.2.patch.tar.gz
|
|
|
|
cd ${WRKSRC} && patch ${PATCH_DIST_ARGS} < ${WRKDIR}/Wnn4.2.patch
|
1998-07-28 21:31:02 -04:00
|
|
|
|
2000-04-21 11:09:51 -04:00
|
|
|
SRCDOCDIRS=Wnn/man Wnn/manual Wnn/manual.en cWnn/man cWnn/manual cWnn/manual.en
|
|
|
|
|
|
|
|
# do those as post-patch, because of the $Id
|
2000-04-20 20:25:25 -04:00
|
|
|
post-patch:
|
|
|
|
@cd ${WRKDIST}; \
|
|
|
|
for file in Wnn/jd/jserverrc cWnn/cd/cserverrc kWnn/kd/kserverrc; do\
|
2000-04-21 11:09:51 -04:00
|
|
|
perl -pi.bak -e 's,\@LIBDIR/\@LANG/dic,${WNNDICDIR}/\@LANG,;' $$file; done
|
|
|
|
# Commands are installed directly under /usr/local/bin and dictionaries in /var/dict
|
|
|
|
@{ for dir in ${SRCDOCDIRS}; do \
|
|
|
|
find ${WRKSRC}/$$dir -type f; done; } \
|
|
|
|
| xargs perl -pi.bok -e \
|
|
|
|
's,/usr/local/bin/Wnn4/,${PREFIX}/bin/,g; s,/usr/local/lib/wnn/dic,${WNNDICDIR},g;'
|
|
|
|
@{ for dir in ${SRCDOCDIRS}; do \
|
|
|
|
find ${WRKSRC}/$$dir -type f -name \*.bok; done; } | xargs rm
|
2000-04-20 20:25:25 -04:00
|
|
|
|
2000-04-20 20:36:06 -04:00
|
|
|
do-configure:
|
2000-04-21 11:09:51 -04:00
|
|
|
@echo " WNNDICDIR = ${WNNDICDIR}" >${CONFIG_FILE}
|
|
|
|
@echo " WNNBASEDIR = ${PREFIX}" >>${CONFIG_FILE}
|
|
|
|
@echo "#define BuildWnn YES" >>${CONFIG_FILE}
|
2000-04-22 08:05:57 -04:00
|
|
|
@echo "#define BuildJlibV3 YES" >>${CONFIG_FILE}
|
2000-04-20 20:36:06 -04:00
|
|
|
.if ${MULTI_PACKAGES:M-zh}
|
|
|
|
@echo "#define BuildCWnn YES" >>${CONFIG_FILE}
|
|
|
|
.else
|
2000-04-20 20:25:25 -04:00
|
|
|
@echo "#define BuildCWnn NO" >>${CONFIG_FILE}
|
2000-04-20 20:36:06 -04:00
|
|
|
.endif
|
|
|
|
.if ${MULTI_PACKAGES:M-ko}
|
|
|
|
@echo "#define BuildKWnn YES" >>${CONFIG_FILE}
|
|
|
|
.else
|
2000-04-20 20:25:25 -04:00
|
|
|
@echo "#define BuildKWnn NO" >>${CONFIG_FILE}
|
2000-04-20 20:36:06 -04:00
|
|
|
.endif
|
2000-04-22 08:05:57 -04:00
|
|
|
.if ${MULTI_PACKAGES:M-xwnmo}
|
|
|
|
@echo "#define BuildXwnmo YES" >>${CONFIG_FILE}
|
|
|
|
.else
|
2000-04-20 21:01:32 -04:00
|
|
|
@echo "#define BuildXwnmo NO" >>${CONFIG_FILE}
|
2000-04-22 08:05:57 -04:00
|
|
|
.endif
|
2000-04-20 20:36:06 -04:00
|
|
|
@cd ${WRKSRC}/config && ln -sf Project.tmpl X11.tmpl
|
1998-07-28 21:31:02 -04:00
|
|
|
|
2001-03-28 10:13:03 -05:00
|
|
|
|
2001-03-28 04:22:57 -05:00
|
|
|
# Xfree4 believes it can build html documentation, fat chance...
|
2004-01-02 17:03:36 -05:00
|
|
|
#MAKE_FLAGS=IMAKE='imake -DBuildHtmlManPages=0 -DPorts' WNNOWNER_INDIRECT=_wnn
|
|
|
|
MAKE_FLAGS=IMAKE='imake -DPorts' WNNOWNER_INDIRECT=_wnn
|
2000-04-05 13:13:55 -04:00
|
|
|
FAKE_FLAGS=DESTDIR=${WRKINST} WNNOWNER_INDIRECT=bin
|
|
|
|
|
|
|
|
MAKE_ENV=IMAKEINCLUDE=-I${WRKSRC}/config
|
|
|
|
# These are necessary because this package uses a different Makefile for
|
1998-07-28 21:31:02 -04:00
|
|
|
# building and installing etc.
|
|
|
|
|
2000-04-05 13:13:55 -04:00
|
|
|
do-build:
|
|
|
|
@cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV} make ${MAKE_FLAGS} -f Makefile.inst ${ALL_TARGET}
|
|
|
|
ALL_TARGET=World
|
|
|
|
INSTALL_TARGET=install install.man
|
2002-10-26 20:52:43 -04:00
|
|
|
NO_REGRESS=Yes
|
1998-07-28 21:31:02 -04:00
|
|
|
|
|
|
|
post-install:
|
2000-04-20 20:36:06 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PORT_JDOCDIR}
|
|
|
|
@(cd ${JDOC_FROM}; tar cf - manual manual.en | \
|
|
|
|
(cd ${PORT_JDOCDIR}; tar xf -))
|
2003-04-14 11:02:08 -04:00
|
|
|
@chown -R ${SHAREOWN}:${SHAREGRP} ${PORT_JDOCDIR}
|
2000-04-20 22:01:50 -04:00
|
|
|
.if ${MULTI_PACKAGES:M-zh}
|
|
|
|
${INSTALL_DATA_DIR} ${PORT_CDOCDIR}
|
|
|
|
@(cd ${CDOC_FROM}; tar cf - manual manual.en | \
|
|
|
|
(cd ${PORT_CDOCDIR}; tar xf -))
|
2003-04-14 11:02:08 -04:00
|
|
|
@chown -R ${SHAREOWN}:${SHAREGRP} ${PORT_CDOCDIR}
|
2000-04-20 20:36:06 -04:00
|
|
|
.endif
|
2001-03-28 10:13:03 -05:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/lib/wnn
|
|
|
|
${INSTALL_DATA} ${WRKDIST}/Wnn/jd/sysV/cvt_key* ${PREFIX}/lib/wnn
|
|
|
|
${INSTALL_DATA} ${WRKDIST}/Wnn/jd/serverdefs ${PREFIX}/lib/wnn
|
|
|
|
${INSTALL_SCRIPT} ${FILESDIR}/install-script ${PREFIX}/lib/wnn
|
1998-07-28 21:31:02 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|