summaryrefslogtreecommitdiff
path: root/editors/emacs20/Makefile
blob: 361c8b45e4457c320c7cb95148c750081f83a0c8 (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
# New ports collection makefile for:	GNU emacs
# Date created:		29 October 1994
# Whom:			jkh
#
# $FreeBSD$
#

PORTNAME=	emacs
PORTVERSION=	${EMACS_VER}
PORTREVISION=	7
CATEGORIES+=	editors ipv6
MASTER_SITES=	${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR=	emacs

PATCH_SITES=		${MASTER_SITE_LOCAL}
PATCH_SITE_SUBDIR=	shige/emacs
PATCHFILES=		emacs-20.7-linespace-patch.gz
PATCH_DIST_STRIP=	-p1

MAINTAINER?=	ports@FreeBSD.org
COMMENT?=	GNU editing macros

ONLY_FOR_ARCHS=	i386 alpha
DEPRECATED=	"editors/emacs is recommended instead for new installations"
EXPIRATION_DATE=	2007-08-19

USE_AUTOTOOLS=	autoconf:213
USE_GMAKE=	yes
EMACS_VER=	20.7
LATEST_LINK?=	${PKGNAMEPREFIX}emacs20
CONFIGURE_TARGET=	${MACHINE_ARCH}--freebsd
.if defined(WITHOUT_X11)
CONFIGURE_ARGS=	--with-x=no --with-pop
.else
CONFIGURE_ARGS=	--with-x-toolkit --with-pop
USE_XLIB=	yes
USE_XORG=	xbitmaps
.endif
CONFIGURE_ARGS+=	--with-line-space \
	--bindir='$${archlibdir}' \
	--infodir='$${datadir}/emacs/$${version}/info'
MAKE_ARGS+=	manext=20.1

MAKE_ENV=	INSTALL_SCRIPT="${INSTALL_SCRIPT}"
MAN1=		emacs20.1 etags20.1 ctags20.1
PLIST_SUB=	EMACS_VER=${EMACS_VER} EMACS_ARCH=${CONFIGURE_TARGET}

RECOMPILE_ELS=	dired.el startup.el

pre-build:
	${RM} -rf ${WRKSRC}/info/*

post-build:
# to rebuild emacs because startup.elc should be updated
	@(cd ${WRKSRC}/lisp; \
		${WRKSRC}/src/emacs -batch -q -no-init-file \
			-f batch-byte-compile ${RECOMPILE_ELS} ; \
	)
	@${RM} -f ${WRKSRC}/src/emacs ${WRKSRC}/src/emacs-${EMACS_VER}*
	@(cd ${BUILD_WRKSRC}; \
		${SETENV} ${MAKE_ENV} \
		${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET} ;\
	)

BINDIR=	${PREFIX}/libexec/emacs/${EMACS_VER}/${CONFIGURE_TARGET}
post-install::
	for f in b2m ctags emacs emacsclient etags rcs-checkin; do \
		${LN} -sf ${BINDIR}/$${f} ${PREFIX}/bin/$${f}20; \
	done
	${LN} -sf ${BINDIR}/emacs-${EMACS_VER} ${PREFIX}/bin/emacs-${EMACS_VER}

.include <bsd.port.mk>