2000-09-17 17:29:20 +02:00
|
|
|
# New ports collection makefile for: mule
|
1997-09-10 10:51:26 +02:00
|
|
|
# Date created: 6 July 1997
|
1999-05-01 06:03:48 +02:00
|
|
|
# Whom: Satoshi Taoka <taoka@FreeBSD.org>
|
1994-11-23 00:59:14 +01:00
|
|
|
#
|
1999-08-25 07:57:29 +02:00
|
|
|
# $FreeBSD$
|
1994-11-23 00:59:14 +01:00
|
|
|
#
|
|
|
|
|
2000-04-13 10:17:29 +02:00
|
|
|
PORTNAME= mule
|
2000-04-14 18:47:49 +02:00
|
|
|
PORTVERSION= ${MULE_VERSION}
|
2001-08-27 03:20:24 +02:00
|
|
|
PKGNAMESUFFIX= ${INPUT_METHOD}
|
2002-10-30 14:25:34 +01:00
|
|
|
PORTREVISION= 3
|
2000-04-14 18:47:49 +02:00
|
|
|
CATEGORIES+= editors
|
2001-12-03 15:02:22 +01:00
|
|
|
MASTER_SITES= ftp://ftp.m17n.org/pub/mule/ \
|
|
|
|
ftp://ftp.jaist.ac.jp/pub/GNU/mule/ \
|
1998-10-07 10:11:41 +02:00
|
|
|
http://www.infonets.hiroshima-u.ac.jp/~taoka/FreeBSD/mule/
|
2001-12-03 15:02:22 +01:00
|
|
|
DISTFILES= mule-${MULE_VERSION}-${EMACS_VERSION}.tar.gz \
|
2000-04-14 18:47:49 +02:00
|
|
|
mule-${MULE_VERSION}-${EMACS_VERSION}.patch-981002.tar.gz
|
1998-10-07 10:11:41 +02:00
|
|
|
|
1999-05-01 06:03:48 +02:00
|
|
|
MAINTAINER?= taoka@FreeBSD.org
|
1995-04-09 08:11:17 +02:00
|
|
|
|
2000-04-14 18:47:49 +02:00
|
|
|
RUN_DEPENDS= ${PREFIX}/share/${EMACS_PREFIX}/${EMACS_VERSION}/lisp/mule.el:${PORTSDIR}/editors/mule-common
|
1997-09-10 10:51:26 +02:00
|
|
|
LIB_DEPENDS= ${LIB_INPUT_METHOD}
|
|
|
|
BUILD_DEPENDS= ${BUILD_INPUT_METHOD}
|
|
|
|
|
2000-04-14 18:47:49 +02:00
|
|
|
MULE_VERSION= 2.3
|
|
|
|
EMACS_VERSION= 19.34
|
|
|
|
|
2000-09-17 17:29:20 +02:00
|
|
|
SLAVEDIRS= chinese/mule-freewnn
|
2000-04-20 12:23:17 +02:00
|
|
|
|
1998-12-02 09:40:00 +01:00
|
|
|
USE_XLIB= yes
|
2001-12-03 15:02:22 +01:00
|
|
|
WRKSRC= ${WRKDIR}/mule-${MULE_VERSION}-${EMACS_VERSION}
|
2000-10-08 09:21:03 +02:00
|
|
|
PATCHDIR= ${.CURDIR}/../../editors/mule-common/files
|
1997-09-10 10:51:26 +02:00
|
|
|
FILESDIR= ${.CURDIR}/../../editors/mule-common/files
|
2000-12-20 01:26:58 +01:00
|
|
|
MD5_FILE= ${.CURDIR}/../../editors/mule-common/distinfo
|
1997-09-10 10:51:26 +02:00
|
|
|
SCRIPTDIR= ${.CURDIR}/../../editors/mule-common/scripts
|
2000-10-08 09:21:03 +02:00
|
|
|
PLIST= ${.CURDIR}/../../editors/mule/pkg-plist
|
1996-08-16 11:43:57 +02:00
|
|
|
GNU_CONFIGURE= yes
|
1995-04-09 08:11:17 +02:00
|
|
|
USE_GMAKE= yes
|
2001-01-16 18:33:20 +01:00
|
|
|
MAKE_ENV= LIBDIR="${LIBDIR}"
|
1998-10-07 10:11:41 +02:00
|
|
|
# /usr/bin/sed should be used because configure script includes 'Ctrl-L'
|
|
|
|
CONFIGURE_ENV= PATH=/usr/bin:$$PATH
|
|
|
|
EMACS_PREFIX= mule
|
|
|
|
EMACS_EXECUTABLE = mule
|
1999-03-08 08:28:36 +01:00
|
|
|
CONFIGURE_ARGS= --with-executable=${EMACS_EXECUTABLE} \
|
1998-10-07 10:11:41 +02:00
|
|
|
--with-emacs-prefix=${EMACS_PREFIX} \
|
|
|
|
--with-terminal-face \
|
1997-09-10 10:51:26 +02:00
|
|
|
--x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib \
|
|
|
|
${WITH_INPUT_METHOD} ${WITH_DIALOGS}
|
1995-04-09 08:11:17 +02:00
|
|
|
STRIP=
|
1997-09-10 10:51:26 +02:00
|
|
|
|
|
|
|
INSTALL_TARGET= install-arch-dep
|
|
|
|
|
|
|
|
.if defined(CANNA)
|
2001-08-27 03:20:24 +02:00
|
|
|
INPUT_METHOD+= canna
|
1998-09-22 00:33:26 +02:00
|
|
|
LIB_INPUT_METHOD+= canna.1:${PORTSDIR}/japanese/Canna
|
1998-10-07 10:11:41 +02:00
|
|
|
WITH_INPUT_METHOD+= --with-canna --with-canna-libraries=${PREFIX}/lib \
|
2001-01-16 18:33:20 +01:00
|
|
|
--with-canna-includes=${PREFIX}/include
|
1997-09-10 10:51:26 +02:00
|
|
|
.endif
|
2000-09-17 17:29:20 +02:00
|
|
|
.if defined(FREEWNN)
|
2001-08-27 03:20:24 +02:00
|
|
|
INPUT_METHOD+= freewnn
|
2001-01-16 18:33:20 +01:00
|
|
|
LIB_INPUT_METHOD+= wnn.0:${PORTSDIR}/japanese/FreeWnn-lib
|
2000-09-17 17:29:20 +02:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn4 --with-wnn-libraries=${LOCALBASE}/lib \
|
2001-01-16 18:33:20 +01:00
|
|
|
--with-wnn-includes=${LOCALBASE}/include/wnn
|
2000-09-17 17:29:20 +02:00
|
|
|
.elif defined(CFREEWNN)
|
2001-08-27 03:20:24 +02:00
|
|
|
INPUT_METHOD+= freewnn
|
2001-01-16 18:33:20 +01:00
|
|
|
LIB_INPUT_METHOD+= cwnn.0:${PORTSDIR}/chinese/FreeWnn-lib
|
2000-09-17 17:29:20 +02:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn4 --with-cwnn4 --with-wnn-libraries=${LOCALBASE}/lib \
|
2001-01-16 18:33:20 +01:00
|
|
|
--with-wnn-includes=${LOCALBASE}/include/cwnn
|
2000-09-17 17:29:20 +02:00
|
|
|
.elif defined(KFREEWNN)
|
2001-08-27 03:20:24 +02:00
|
|
|
INPUT_METHOD+= freewnn
|
2001-01-16 18:33:20 +01:00
|
|
|
LIB_INPUT_METHOD+= kwnn.0:${PORTSDIR}/korean/FreeWnn-lib
|
2000-09-17 17:29:20 +02:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn4 --with-kwnn4 --with-wnn-libraries=${LOCALBASE}/lib \
|
2001-01-16 18:33:20 +01:00
|
|
|
--with-wnn-includes=${LOCALBASE}/include/kwnn
|
2001-08-27 03:20:24 +02:00
|
|
|
.endif
|
|
|
|
.if defined(SJ3)
|
|
|
|
INPUT_METHOD+= sj3
|
|
|
|
BUILD_INPUT_METHOD+= sj3serv:${PORTSDIR}/japanese/sj3
|
|
|
|
WITH_INPUT_METHOD+= --with-sj3
|
|
|
|
.endif
|
|
|
|
.if !defined(FREEWNN) && !defined(CFREEWNN) && !defined(KFREEWNN)
|
|
|
|
.if defined(WNN6)
|
|
|
|
INPUT_METHOD+= wnn6
|
2002-10-30 14:25:34 +01:00
|
|
|
LIB_INPUT_METHOD+= wnn6.2:${PORTSDIR}/japanese/Wnn6-lib
|
2000-09-17 17:29:20 +02:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn6 --with-wnn-libraries=${LOCALBASE}/lib \
|
2001-01-16 18:33:20 +01:00
|
|
|
--with-wnn-includes=${LOCALBASE}/include/wnn6/wnn
|
2001-08-27 03:20:24 +02:00
|
|
|
.elif defined(WNN7)
|
2002-10-29 10:46:31 +01:00
|
|
|
# mule 2.3 cannot use Wnn7SDK (Wnn7-lib)
|
2002-10-30 14:25:34 +01:00
|
|
|
# so it should use Wnn6SDK (Wnn6-lib) instead of Wnn7SDK.
|
2002-10-29 10:46:31 +01:00
|
|
|
# But it can partly support Wnn7 by ${PREFIX}/share/mule/19.34/lisp/eggrc-wnn
|
2001-08-27 03:20:24 +02:00
|
|
|
INPUT_METHOD+= wnn7
|
2002-10-30 14:25:34 +01:00
|
|
|
LIB_INPUT_METHOD+= wnn6.2:${PORTSDIR}/japanese/Wnn6-lib
|
2002-10-29 10:46:31 +01:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn6=-lwnn6 --with-wnn-libraries=${LOCALBASE}/lib \
|
|
|
|
--with-wnn-includes=${LOCALBASE}/include/wnn6/wnn
|
2001-08-27 03:20:24 +02:00
|
|
|
.endif
|
1997-09-10 10:51:26 +02:00
|
|
|
.endif
|
1998-10-07 10:11:41 +02:00
|
|
|
COMP_ELC= egg.elc wnn-egg.elc sj3-client.elc sj3-egg.elc canna.elc
|
|
|
|
ELC_DIR= ../lisp
|
2002-01-29 17:43:55 +01:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2001-08-27 03:20:24 +02:00
|
|
|
# Make a value of INPUT_METHOD
|
|
|
|
.if defined(INPUT_METHOD)
|
2002-01-29 11:34:23 +01:00
|
|
|
INPUT_METHOD!= ${ECHO_CMD} ${INPUT_METHOD} | sed -e 's/^/-/' -e 's/ /+/g'
|
2001-08-27 03:20:24 +02:00
|
|
|
.endif
|
|
|
|
|
1997-09-10 10:51:26 +02:00
|
|
|
|
|
|
|
WITH_DIALOGS= --with-x-toolkit
|
|
|
|
|
2000-04-14 18:47:49 +02:00
|
|
|
SITE_START=${PREFIX}/share/${EMACS_PREFIX}/${EMACS_VERSION}/site-lisp/site-start.el
|
1997-09-10 10:51:26 +02:00
|
|
|
|
1998-10-07 10:11:41 +02:00
|
|
|
# ORIGINAL, MEW_ORG_PATCH and MEW_PATCH are used for debugging.
|
|
|
|
#
|
|
|
|
# ORIGINAL: original mule 2.3 based on emacs 19.34
|
|
|
|
# MEW_ORG_PATCH: apply mew's patches to original mule (http://www.mew.org)
|
|
|
|
# MEW_PATCH: apply mew's patch after apply Mr. Katayama's patches
|
1997-09-10 10:51:26 +02:00
|
|
|
post-extract:
|
1998-10-07 10:11:41 +02:00
|
|
|
${CP} ${FILESDIR}/unexfreebsd.c ${WRKSRC}/src
|
|
|
|
.if !defined(ORIGINAL) && !defined(MEW_ORG_PATCH)
|
2000-04-14 18:47:49 +02:00
|
|
|
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${WRKDIR}/takana-${EMACS_VERSION}.tar.gz ${EXTRACT_AFTER_ARGS} -C ${WRKDIR}
|
1998-10-07 10:11:41 +02:00
|
|
|
${MKDIR} ${WRKSRC}/lisp/its
|
|
|
|
${CP} ${WRKDIR}/lisp/its/* ${WRKSRC}/lisp/its/
|
|
|
|
.endif
|
1997-09-10 10:51:26 +02:00
|
|
|
|
1998-10-07 10:11:41 +02:00
|
|
|
.if !defined(ORIGINAL)
|
1997-09-10 10:51:26 +02:00
|
|
|
post-patch:
|
1998-10-07 10:11:41 +02:00
|
|
|
.if !defined(MEW_ORG_PATCH)
|
2000-04-14 18:47:49 +02:00
|
|
|
cd ${WRKSRC}; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/patch-${EMACS_VERSION}
|
|
|
|
cd ${WRKSRC}; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/Mule-${MULE_VERSION}-${EMACS_VERSION}.patch
|
1998-10-07 10:11:41 +02:00
|
|
|
cd ${WRKSRC}; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/extra.patch
|
|
|
|
.if defined(MEW_PATCH)
|
2000-04-14 18:47:49 +02:00
|
|
|
cd ${WRKSRC}/lisp; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/mew/egg.el-${EMACS_VERSION}.patch-for_katayama
|
1998-10-07 10:11:41 +02:00
|
|
|
.endif
|
|
|
|
.else
|
2000-04-14 18:47:49 +02:00
|
|
|
cd ${WRKSRC}/lisp; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/mew/egg.el-${EMACS_VERSION}.patch
|
1998-10-07 10:11:41 +02:00
|
|
|
.endif
|
|
|
|
.if defined(MEW_PATCH) || defined(MEW_ORG_PATCH)
|
2000-04-14 18:47:49 +02:00
|
|
|
cd ${WRKSRC}/lisp; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/mew/canna.el-${EMACS_VERSION}.patch
|
1998-10-07 10:11:41 +02:00
|
|
|
cd ${WRKSRC}/lisp; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/mew/sj3-egg.el.patch
|
|
|
|
.endif
|
|
|
|
.endif
|
1995-04-09 08:11:17 +02:00
|
|
|
|
1995-04-20 20:23:12 +02:00
|
|
|
pre-build:
|
1997-09-10 10:51:26 +02:00
|
|
|
find ${WRKSRC} \( -name \*.orig -o -name \*~ \) -exec ${RM} -f \{} \;
|
2000-04-14 18:47:49 +02:00
|
|
|
${RM} -f ${WRKSRC}/etc/DOC* ${WRKSRC}/src/emacs ${WRKSRC}/src/emacs-${EMACS_VERSION}.*
|
1998-10-07 10:11:41 +02:00
|
|
|
|
|
|
|
post-build:
|
|
|
|
# bytecompile elisps for Japanese input method
|
|
|
|
for file in ${COMP_ELC}; do \
|
|
|
|
target="$$target ${ELC_DIR}/$$file"; \
|
|
|
|
done; \
|
|
|
|
cd ${WRKSRC}/src; \
|
|
|
|
./temacs -batch -l mule-inst.el $$target
|
1994-11-23 00:59:14 +01:00
|
|
|
|
1998-05-02 23:07:10 +02:00
|
|
|
# If site-start.el exists, you should run below when you install by
|
|
|
|
# this port
|
|
|
|
pre-install:
|
|
|
|
@if [ -f ${SITE_START} ]; then \
|
|
|
|
${MV} ${SITE_START} ${SITE_START}.orig ; \
|
1998-10-07 10:11:41 +02:00
|
|
|
${SED} -e '/;; BEGIN mule-family/,/;; END mule-family/d' \
|
|
|
|
${SITE_START}.orig > ${SITE_START}; \
|
|
|
|
fi
|
1998-05-02 23:07:10 +02:00
|
|
|
|
1995-04-22 14:39:19 +02:00
|
|
|
post-install:
|
2000-04-14 18:47:49 +02:00
|
|
|
strip ${PREFIX}/bin/${EMACS_EXECUTABLE}-${EMACS_VERSION}
|
2000-09-17 17:29:20 +02:00
|
|
|
# for freewnn+sj3 or wnn6+sj3
|
2000-10-08 12:23:48 +02:00
|
|
|
@if [ -e ${PKGINSTALL} ]; then \
|
|
|
|
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL; \
|
1997-05-21 09:24:28 +02:00
|
|
|
fi
|
1997-09-10 10:51:26 +02:00
|
|
|
# Installing site-start.el
|
|
|
|
# (we redefun set-korean-environment etc)
|
2000-09-17 17:29:20 +02:00
|
|
|
.if defined(CFREEWNN)
|
1998-10-07 10:11:41 +02:00
|
|
|
${SED} -e 's/;;\(.*\);;CHINESE$$/\1;;CHINESE/' \
|
1997-09-10 10:51:26 +02:00
|
|
|
-e 's/;;\(.*\);;not KOREAN$$/\1;;not KOREAN/' \
|
1998-10-07 10:11:41 +02:00
|
|
|
-e 's,%%X11BASE%%,${X11BASE},' \
|
|
|
|
-e 's,%%LOCALBASE%%,${LOCALBASE},' \
|
|
|
|
${FILESDIR}/site-start.el.tmpl >> ${SITE_START}
|
2000-09-17 17:29:20 +02:00
|
|
|
.elif defined(KFREEWNN)
|
1998-10-07 10:11:41 +02:00
|
|
|
${SED} -e 's/;;\(.*\);;KOREAN$$/\1;;KOREAN/' \
|
|
|
|
-e 's,%%X11BASE%%,${X11BASE},' \
|
|
|
|
-e 's,%%LOCALBASE%%,${LOCALBASE},' \
|
|
|
|
${FILESDIR}/site-start.el.tmpl >> ${SITE_START}
|
1997-09-10 10:51:26 +02:00
|
|
|
.else
|
1998-10-07 10:11:41 +02:00
|
|
|
${SED} -e 's/;;\(.*\);;not KOREAN$$/\1;;not KOREAN/' \
|
|
|
|
-e 's,%%X11BASE%%,${X11BASE},' \
|
|
|
|
-e 's,%%LOCALBASE%%,${LOCALBASE},' \
|
|
|
|
${FILESDIR}/site-start.el.tmpl >> ${SITE_START}
|
1997-09-10 10:51:26 +02:00
|
|
|
.endif
|
1998-10-07 10:11:41 +02:00
|
|
|
@${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE}
|
1997-09-10 10:51:26 +02:00
|
|
|
|
|
|
|
post-package:
|
|
|
|
@${TOUCH} ${TOUCH_FLAGS} ${PACKAGE_COOKIE}
|
1995-04-22 14:39:19 +02:00
|
|
|
|
2002-01-29 17:43:55 +01:00
|
|
|
.include <bsd.port.post.mk>
|