2000-09-17 11:29:20 -04:00
|
|
|
# New ports collection makefile for: mule
|
1997-09-10 04:51:26 -04:00
|
|
|
# Date created: 6 July 1997
|
1999-05-01 00:03:48 -04:00
|
|
|
# Whom: Satoshi Taoka <taoka@FreeBSD.org>
|
1994-11-22 18:59:14 -05:00
|
|
|
#
|
1999-08-25 01:57:29 -04:00
|
|
|
# $FreeBSD$
|
1994-11-22 18:59:14 -05:00
|
|
|
#
|
|
|
|
|
2000-04-13 04:17:29 -04:00
|
|
|
PORTNAME= mule
|
2000-04-14 12:47:49 -04:00
|
|
|
PORTVERSION= ${MULE_VERSION}
|
2001-08-26 21:20:24 -04:00
|
|
|
PKGNAMESUFFIX= ${INPUT_METHOD}
|
2001-12-03 09:02:22 -05:00
|
|
|
PORTREVISION= 2
|
2000-04-14 12:47:49 -04:00
|
|
|
CATEGORIES+= editors
|
2001-12-03 09:02:22 -05:00
|
|
|
MASTER_SITES= ftp://ftp.m17n.org/pub/mule/ \
|
|
|
|
ftp://ftp.jaist.ac.jp/pub/GNU/mule/ \
|
1998-10-07 04:11:41 -04:00
|
|
|
http://www.infonets.hiroshima-u.ac.jp/~taoka/FreeBSD/mule/
|
2001-12-03 09:02:22 -05:00
|
|
|
DISTFILES= mule-${MULE_VERSION}-${EMACS_VERSION}.tar.gz \
|
2000-04-14 12:47:49 -04:00
|
|
|
mule-${MULE_VERSION}-${EMACS_VERSION}.patch-981002.tar.gz
|
1998-10-07 04:11:41 -04:00
|
|
|
|
1999-05-01 00:03:48 -04:00
|
|
|
MAINTAINER?= taoka@FreeBSD.org
|
1995-04-09 02:11:17 -04:00
|
|
|
|
2000-04-14 12:47:49 -04:00
|
|
|
RUN_DEPENDS= ${PREFIX}/share/${EMACS_PREFIX}/${EMACS_VERSION}/lisp/mule.el:${PORTSDIR}/editors/mule-common
|
1997-09-10 04:51:26 -04:00
|
|
|
LIB_DEPENDS= ${LIB_INPUT_METHOD}
|
|
|
|
BUILD_DEPENDS= ${BUILD_INPUT_METHOD}
|
|
|
|
|
2000-04-14 12:47:49 -04:00
|
|
|
MULE_VERSION= 2.3
|
|
|
|
EMACS_VERSION= 19.34
|
|
|
|
|
2000-09-17 11:29:20 -04:00
|
|
|
SLAVEDIRS= chinese/mule-freewnn
|
2000-04-20 06:23:17 -04:00
|
|
|
|
1998-12-02 03:40:00 -05:00
|
|
|
USE_XLIB= yes
|
2001-12-03 09:02:22 -05:00
|
|
|
WRKSRC= ${WRKDIR}/mule-${MULE_VERSION}-${EMACS_VERSION}
|
2000-10-08 03:21:03 -04:00
|
|
|
PATCHDIR= ${.CURDIR}/../../editors/mule-common/files
|
1997-09-10 04:51:26 -04:00
|
|
|
FILESDIR= ${.CURDIR}/../../editors/mule-common/files
|
2000-12-19 19:26:58 -05:00
|
|
|
MD5_FILE= ${.CURDIR}/../../editors/mule-common/distinfo
|
1997-09-10 04:51:26 -04:00
|
|
|
SCRIPTDIR= ${.CURDIR}/../../editors/mule-common/scripts
|
2000-10-08 03:21:03 -04:00
|
|
|
PLIST= ${.CURDIR}/../../editors/mule/pkg-plist
|
1996-08-16 05:43:57 -04:00
|
|
|
GNU_CONFIGURE= yes
|
1995-04-09 02:11:17 -04:00
|
|
|
USE_GMAKE= yes
|
2001-01-16 12:33:20 -05:00
|
|
|
MAKE_ENV= LIBDIR="${LIBDIR}"
|
1998-10-07 04:11:41 -04: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 02:28:36 -05:00
|
|
|
CONFIGURE_ARGS= --with-executable=${EMACS_EXECUTABLE} \
|
1998-10-07 04:11:41 -04:00
|
|
|
--with-emacs-prefix=${EMACS_PREFIX} \
|
|
|
|
--with-terminal-face \
|
1997-09-10 04:51:26 -04:00
|
|
|
--x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib \
|
|
|
|
${WITH_INPUT_METHOD} ${WITH_DIALOGS}
|
1995-04-09 02:11:17 -04:00
|
|
|
STRIP=
|
1997-09-10 04:51:26 -04:00
|
|
|
|
|
|
|
INSTALL_TARGET= install-arch-dep
|
|
|
|
|
|
|
|
.if defined(CANNA)
|
2001-08-26 21:20:24 -04:00
|
|
|
INPUT_METHOD+= canna
|
1998-09-21 18:33:26 -04:00
|
|
|
LIB_INPUT_METHOD+= canna.1:${PORTSDIR}/japanese/Canna
|
1998-10-07 04:11:41 -04:00
|
|
|
WITH_INPUT_METHOD+= --with-canna --with-canna-libraries=${PREFIX}/lib \
|
2001-01-16 12:33:20 -05:00
|
|
|
--with-canna-includes=${PREFIX}/include
|
1997-09-10 04:51:26 -04:00
|
|
|
.endif
|
2000-09-17 11:29:20 -04:00
|
|
|
.if defined(FREEWNN)
|
2001-08-26 21:20:24 -04:00
|
|
|
INPUT_METHOD+= freewnn
|
2001-01-16 12:33:20 -05:00
|
|
|
LIB_INPUT_METHOD+= wnn.0:${PORTSDIR}/japanese/FreeWnn-lib
|
2000-09-17 11:29:20 -04:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn4 --with-wnn-libraries=${LOCALBASE}/lib \
|
2001-01-16 12:33:20 -05:00
|
|
|
--with-wnn-includes=${LOCALBASE}/include/wnn
|
2000-09-17 11:29:20 -04:00
|
|
|
.elif defined(CFREEWNN)
|
2001-08-26 21:20:24 -04:00
|
|
|
INPUT_METHOD+= freewnn
|
2001-01-16 12:33:20 -05:00
|
|
|
LIB_INPUT_METHOD+= cwnn.0:${PORTSDIR}/chinese/FreeWnn-lib
|
2000-09-17 11:29:20 -04:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn4 --with-cwnn4 --with-wnn-libraries=${LOCALBASE}/lib \
|
2001-01-16 12:33:20 -05:00
|
|
|
--with-wnn-includes=${LOCALBASE}/include/cwnn
|
2000-09-17 11:29:20 -04:00
|
|
|
.elif defined(KFREEWNN)
|
2001-08-26 21:20:24 -04:00
|
|
|
INPUT_METHOD+= freewnn
|
2001-01-16 12:33:20 -05:00
|
|
|
LIB_INPUT_METHOD+= kwnn.0:${PORTSDIR}/korean/FreeWnn-lib
|
2000-09-17 11:29:20 -04:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn4 --with-kwnn4 --with-wnn-libraries=${LOCALBASE}/lib \
|
2001-01-16 12:33:20 -05:00
|
|
|
--with-wnn-includes=${LOCALBASE}/include/kwnn
|
2001-08-26 21:20:24 -04: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
|
2001-01-16 12:33:20 -05:00
|
|
|
LIB_INPUT_METHOD+= wnn6.1:${PORTSDIR}/japanese/Wnn6-lib
|
2000-09-17 11:29:20 -04:00
|
|
|
WITH_INPUT_METHOD+= --with-wnn6 --with-wnn-libraries=${LOCALBASE}/lib \
|
2001-01-16 12:33:20 -05:00
|
|
|
--with-wnn-includes=${LOCALBASE}/include/wnn6/wnn
|
2001-08-26 21:20:24 -04:00
|
|
|
.elif defined(WNN7)
|
|
|
|
INPUT_METHOD+= wnn7
|
|
|
|
LIB_INPUT_METHOD+= wnn6_for_wnn7.1:${PORTSDIR}/japanese/Wnn7-lib
|
|
|
|
WITH_INPUT_METHOD+= --with-wnn6=-lwnn6_for_wnn7 --with-wnn-libraries=${LOCALBASE}/lib \
|
|
|
|
--with-wnn-includes=${LOCALBASE}/include/wnn7/wnn
|
|
|
|
.endif
|
1997-09-10 04:51:26 -04:00
|
|
|
.endif
|
1998-10-07 04:11:41 -04:00
|
|
|
COMP_ELC= egg.elc wnn-egg.elc sj3-client.elc sj3-egg.elc canna.elc
|
|
|
|
ELC_DIR= ../lisp
|
2002-01-29 11:43:55 -05:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2001-08-26 21:20:24 -04:00
|
|
|
# Make a value of INPUT_METHOD
|
|
|
|
.if defined(INPUT_METHOD)
|
2002-01-29 05:34:23 -05:00
|
|
|
INPUT_METHOD!= ${ECHO_CMD} ${INPUT_METHOD} | sed -e 's/^/-/' -e 's/ /+/g'
|
2001-08-26 21:20:24 -04:00
|
|
|
.endif
|
|
|
|
|
1997-09-10 04:51:26 -04:00
|
|
|
|
|
|
|
WITH_DIALOGS= --with-x-toolkit
|
|
|
|
|
2000-04-14 12:47:49 -04:00
|
|
|
SITE_START=${PREFIX}/share/${EMACS_PREFIX}/${EMACS_VERSION}/site-lisp/site-start.el
|
1997-09-10 04:51:26 -04:00
|
|
|
|
1998-10-07 04:11:41 -04: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 04:51:26 -04:00
|
|
|
post-extract:
|
1998-10-07 04:11:41 -04:00
|
|
|
${CP} ${FILESDIR}/unexfreebsd.c ${WRKSRC}/src
|
|
|
|
.if !defined(ORIGINAL) && !defined(MEW_ORG_PATCH)
|
2000-04-14 12:47:49 -04:00
|
|
|
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${WRKDIR}/takana-${EMACS_VERSION}.tar.gz ${EXTRACT_AFTER_ARGS} -C ${WRKDIR}
|
1998-10-07 04:11:41 -04:00
|
|
|
${MKDIR} ${WRKSRC}/lisp/its
|
|
|
|
${CP} ${WRKDIR}/lisp/its/* ${WRKSRC}/lisp/its/
|
|
|
|
.endif
|
1997-09-10 04:51:26 -04:00
|
|
|
|
1998-10-07 04:11:41 -04:00
|
|
|
.if !defined(ORIGINAL)
|
1997-09-10 04:51:26 -04:00
|
|
|
post-patch:
|
1998-10-07 04:11:41 -04:00
|
|
|
.if !defined(MEW_ORG_PATCH)
|
2000-04-14 12:47:49 -04: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 04:11:41 -04:00
|
|
|
cd ${WRKSRC}; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/extra.patch
|
|
|
|
.if defined(MEW_PATCH)
|
2000-04-14 12:47:49 -04:00
|
|
|
cd ${WRKSRC}/lisp; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/mew/egg.el-${EMACS_VERSION}.patch-for_katayama
|
1998-10-07 04:11:41 -04:00
|
|
|
.endif
|
|
|
|
.else
|
2000-04-14 12:47:49 -04:00
|
|
|
cd ${WRKSRC}/lisp; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/mew/egg.el-${EMACS_VERSION}.patch
|
1998-10-07 04:11:41 -04:00
|
|
|
.endif
|
|
|
|
.if defined(MEW_PATCH) || defined(MEW_ORG_PATCH)
|
2000-04-14 12:47:49 -04:00
|
|
|
cd ${WRKSRC}/lisp; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/mew/canna.el-${EMACS_VERSION}.patch
|
1998-10-07 04:11:41 -04:00
|
|
|
cd ${WRKSRC}/lisp; ${PATCH} --forward --quiet -E -p0 < ${WRKDIR}/mew/sj3-egg.el.patch
|
|
|
|
.endif
|
|
|
|
.endif
|
1995-04-09 02:11:17 -04:00
|
|
|
|
1995-04-20 14:23:12 -04:00
|
|
|
pre-build:
|
1997-09-10 04:51:26 -04:00
|
|
|
find ${WRKSRC} \( -name \*.orig -o -name \*~ \) -exec ${RM} -f \{} \;
|
2000-04-14 12:47:49 -04:00
|
|
|
${RM} -f ${WRKSRC}/etc/DOC* ${WRKSRC}/src/emacs ${WRKSRC}/src/emacs-${EMACS_VERSION}.*
|
1998-10-07 04:11:41 -04: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-22 18:59:14 -05:00
|
|
|
|
1998-05-02 17:07:10 -04: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 04:11:41 -04:00
|
|
|
${SED} -e '/;; BEGIN mule-family/,/;; END mule-family/d' \
|
|
|
|
${SITE_START}.orig > ${SITE_START}; \
|
|
|
|
fi
|
1998-05-02 17:07:10 -04:00
|
|
|
|
1995-04-22 08:39:19 -04:00
|
|
|
post-install:
|
2000-04-14 12:47:49 -04:00
|
|
|
strip ${PREFIX}/bin/${EMACS_EXECUTABLE}-${EMACS_VERSION}
|
2000-09-17 11:29:20 -04:00
|
|
|
# for freewnn+sj3 or wnn6+sj3
|
2000-10-08 06:23:48 -04:00
|
|
|
@if [ -e ${PKGINSTALL} ]; then \
|
|
|
|
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL; \
|
1997-05-21 03:24:28 -04:00
|
|
|
fi
|
1997-09-10 04:51:26 -04:00
|
|
|
# Installing site-start.el
|
|
|
|
# (we redefun set-korean-environment etc)
|
2000-09-17 11:29:20 -04:00
|
|
|
.if defined(CFREEWNN)
|
1998-10-07 04:11:41 -04:00
|
|
|
${SED} -e 's/;;\(.*\);;CHINESE$$/\1;;CHINESE/' \
|
1997-09-10 04:51:26 -04:00
|
|
|
-e 's/;;\(.*\);;not KOREAN$$/\1;;not KOREAN/' \
|
1998-10-07 04:11:41 -04:00
|
|
|
-e 's,%%X11BASE%%,${X11BASE},' \
|
|
|
|
-e 's,%%LOCALBASE%%,${LOCALBASE},' \
|
|
|
|
${FILESDIR}/site-start.el.tmpl >> ${SITE_START}
|
2000-09-17 11:29:20 -04:00
|
|
|
.elif defined(KFREEWNN)
|
1998-10-07 04:11:41 -04: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 04:51:26 -04:00
|
|
|
.else
|
1998-10-07 04:11:41 -04: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 04:51:26 -04:00
|
|
|
.endif
|
1998-10-07 04:11:41 -04:00
|
|
|
@${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE}
|
1997-09-10 04:51:26 -04:00
|
|
|
|
|
|
|
post-package:
|
|
|
|
@${TOUCH} ${TOUCH_FLAGS} ${PACKAGE_COOKIE}
|
1995-04-22 08:39:19 -04:00
|
|
|
|
2002-01-29 11:43:55 -05:00
|
|
|
.include <bsd.port.post.mk>
|