summaryrefslogtreecommitdiff
path: root/editors/xemacs21-mule/Makefile
blob: 647d5ef027a3cc19c64650970a5fbd9c1d12511d (plain) (blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# New ports collection makefile for:	XEmacs
# Version required:	20.4
# Date created:		5 Dec 1997
# Whom:			Kazuyuki IENAGA <ienaga@jsys.co.jp>
#
# $Id: Makefile,v 1.14 1999/01/23 07:05:33 vanilla Exp $
#

DISTNAME=	xemacs-20.4
PKGNAME?=	xemacs-mule-20.4
CATEGORIES?=	editors
MASTER_SITES=	ftp://unipro.jsys.co.jp/pub/editor/xemacs/20.4/ \
		ftp://ftp.lab.kdd.co.jp/xemacs/xemacs-20.4/ \
		ftp://ftp.xemacs.org/pub/xemacs-20.4/ \
		ftp://ftp2.xemacs.org/pub/xemacs/xemacs-20.4/ \
		ftp://ftp.jpl.org/pub/elisp/
DISTFILES=	xemacs-20.4.tar.gz xemacs-20.4-elc.tar.gz \
		xemacs-20.4-info.tar.gz xemacs-20.4-mule.tar.gz \
		ps-print-jp.el.gz

MAINTAINER?=	kiri@kiri.toba-cmt.ac.jp

BUILD_DEPENDS=	${BUILD_INPUT_METHOD}
LIB_DEPENDS=	Xpm.4:${PORTSDIR}/graphics/xpm \
		jpeg.9:${PORTSDIR}/graphics/jpeg \
		png.3:${PORTSDIR}/graphics/png \
		compface.1:${PORTSDIR}/mail/faces \
		${LIB_INPUT_METHOD}
RUN_DEPENDS=	${PREFIX}/lib/${XEMACS_DIR}/lisp/x11/x-win-xfree86.elc:${PORTSDIR}/editors/xemacs-mule-common

EXTRACT_ONLY=	xemacs-20.4.tar.gz xemacs-20.4-elc.tar.gz \
		xemacs-20.4-info.tar.gz xemacs-20.4-mule.tar.gz
WRKSRC=		${WRKDIR}/xemacs-20.4
PATCHDIR=	${.CURDIR}/../../editors/xemacs-mule-common/patches
FILESDIR=	${.CURDIR}/../../editors/xemacs-mule-common/files
SCRIPTDIR=	${.CURDIR}/../../editors/xemacs-mule-common/scripts
INSTALL_COOKIE=	${WRKDIR}/.install_done-${PKGNAME}
PACKAGE_COOKIE=	${WRKDIR}/.package_done-${PKGNAME}
GNU_CONFIGURE=	yes
USE_AUTOCONF=	yes
CONFIGURE_ARGS=	\
		--with-clash-detection \
		--lockdir=/var/run/emacs/lock \
		--with-x11 \
		--with-mule \
		--x-includes=${X11BASE}/include \
		--x-libraries=${X11BASE}/lib \
		--site-libraries='${SITE_LIBRARIES}' \
		--site-includes='${SITE_INCLUDES}' \
		--sitelispdir=${PREFIX}/lib/${XEMACS_DIR}/lisp:${PREFIX}/lib/${XEMACS_DIR}/site-lisp:${PREFIX}/lib/xemacs/site-lisp:${PREFIX}/share/emacs/site-lisp \
		--infopath=${PREFIX}/lib/xemacs/info:${PREFIX}/info:${X11BASE}/info:/usr/info:${PREFIX}/lib/texmf/doc/info:/usr/lib/texmf/doc:/usr/share/info \
		${MISC_OPTIONS} ${WITH_INPUT_METHOD} ${WITH_WIDGETS}
CONFIGURE_TARGET=	${MACHINE_ARCH}--freebsd

STRIP=

INSTALL_TARGET=	install-arch-dep

PLIST_SUB=	XEMACS_DIR=${XEMACS_DIR}

PKGLDIR=	${.CURDIR}/../../editors/xemacs-mule/pkg
XEMACS_DIR=	xemacs-20.4

.if defined(WNN4)
SITE_INCLUDES=		${X11BASE}/include
SITE_LIBRARIES=		${X11BASE}/lib
.endif
SITE_INCLUDES+=		${PREFIX}/include
SITE_LIBRARIES+=	${PREFIX}/lib
.if defined(CANNA)
LIB_INPUT_METHOD+=	canna.1:${PORTSDIR}/japanese/Canna
WITH_INPUT_METHOD+=	--with-canna
.endif
.if defined(WNN4)
BUILD_INPUT_METHOD+=	${PREFIX}/bin/Wnn4/jserver:${PORTSDIR}/japanese/Wnn
WITH_INPUT_METHOD+=	--with-wnn
.elif defined(WNN6)
BUILD_INPUT_METHOD+=	${PREFIX}/include/wnn/jlib.h:${PORTSDIR}/japanese/Wnn6-lib
WITH_INPUT_METHOD+=	--with-wnn6
.endif
.if !defined(WITH_INPUT_METHOD)
WITH_INPUT_METHOD=	--with-wnn=no
WITH_INPUT_METHOD+=	--with-wnn6=no
WITH_INPUT_METHOD+=	--with-canna=no
.endif

WITH_WIDGETS=	--with-menubars=lucid --with-scrollbars=lucid --with-dialogs=athena
MISC_OPTIONS=	--with-xface --with-xpm --with-sound=native --with-pop --with-xfs

LANGUAGE?=
.if (${LANGUAGE} == "Japanese")
PLIST=	${PKGLDIR}/PLIST-ja
.else
PLIST=	${PKGLDIR}/PLIST
.endif

pre-build:
	@find ${WRKSRC} \( -name \*.orig -o -name \*~ \) -exec ${RM} -f \{} \;
	@${RM} -f ${WRKSRC}/lib-src/DOC* ${WRKSRC}/src/xemacs
.if (${LANGUAGE} == "Japanese")
	@if [ -e ${WRKSRC}/lisp/packages/ps-print.elc ]; then \
		${RM} -f ${WRKSRC}/lisp/packages/ps-print.elc; \
	fi
	@${GZCAT} ${DISTDIR}/ps-print-jp.el.gz > ${WRKSRC}/lisp/packages/ps-print.el
.endif

# for xemacs-mule-common in defining ${WRKDIRPREFIX}
.if !exists(${WRKDIRPREFIX}${.CURDIR}/../../editors/xemacs-mule-common)
post-build:
	@${MKDIR} ${WRKDIRPREFIX}${.CURDIR}/../../editors/xemacs-mule-common
.endif

post-install::
.for file in b2m ctags etags gnuclient xemacs-20.4
	@strip ${PREFIX}/bin/${file}
.endfor
	@if [ -f ${PKGDIR}/INSTALL ]; then \
		${SETENV} PKG_PREFIX=${PREFIX} \
			${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL; \
	fi
	@${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE}

post-package:
	@${TOUCH} ${TOUCH_FLAGS} ${PACKAGE_COOKIE}

.include <bsd.port.mk>