summaryrefslogtreecommitdiff
path: root/editors/emacs20/Makefile
blob: c5167f78775f9b85c95aa2526fb1591990869c01 (plain)
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
# $NetBSD: Makefile,v 1.25 2006/01/04 17:00:32 joerg Exp $

DISTNAME=	emacs-20.7
PKGREVISION=	6
CATEGORIES=	editors
MASTER_SITES=	${MASTER_SITE_GNU:=emacs/} \
		${MASTER_SITE_LOCAL}
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
		${DISTNAME}-mule-4.1b-elc${EXTRACT_SUFX}

# Mule enhancement (back port) patch by Satoshi Yatagawa
PATCH_SITES=		http://www.teu.ac.jp/nsit/~yatagawa/comp/emacs/
PATCHFILES=		emacs-20.7-mule-4.1b.patch
# XIM fix patch by Seiichiro Inoue
PATCH_SITES+=		http://home.catv.ne.jp/pp/ginoue/software/emacs-xim/
PATCHFILES+=		emacs20-xim-20000713.diff
PATCH_DIST_STRIP=	-p1

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE=	http://www.gnu.org/software/emacs/emacs.html
COMMENT=	GNU editing macros (editor)

NOT_FOR_PLATFORM=	Darwin-*-*

CONFLICTS=	mule-[0-9]*

GNU_CONFIGURE=	yes
USE_TOOLS+=	gmake
GNU_ARCH.mipsbe= mips

BUILD_DEFS+=	USE_INET6 EMACS_USE_POP

# build PATH in the dumped emacs is not a problem
CHECK_WRKREF_SKIP+=	${PREFIX}/bin/emacs
CHECK_WRKREF_SKIP+=	${PREFIX}/bin/emacs-20.7

.include "../../mk/bsd.prefs.mk"

# This matches NetBSD <1.7 releases and 1.6A-1.6P, where ld is <2.13.2.1.
.if (${OPSYS} == "NetBSD" && \
    (empty(OS_VERSION:M1.[0-5]*) && \
     empty(OS_VERSION:M1.6_*) && \
     empty(OS_VERSION:M1.6) && \
     empty(OS_VERSION:M1.6.[0-9]*) && \
     empty(OS_VERSION:M1.6[A-P]*))) || \
    (${OPSYS} == "DragonFly")
# If using GNU ld 2.13.2.1 or later, avoid creating combined reloc
# sections and .data reloc sections, both of which Emacs can't handle
# properly.  Analyzed by Stephen Ma.
LDFLAGS+=	-Wl,-z,nocombreloc
.endif

EMACS_USE_POP?=	yes
.if (defined(EMACS_USE_POP) && \
    (${EMACS_USE_POP} == yes || ${EMACS_USE_POP} == YES))
CONFIGURE_ARGS+=--with-pop
.endif

.if defined(EMACS_USE_X)
.include "../../mk/x11.buildlink3.mk"
BUILD_DEFS+=		EMACS_USE_X EMACS_USE_X_TOOLKIT
CONFIGURE_ARGS+=	--with-x=yes
.if defined(EMACS_USE_X_TOOLKIT)
CONFIGURE_ARGS+=	--with-x-toolkit=${EMACS_USE_X_TOOLKIT:Q}
.if ${EMACS_USE_X_TOOLKIT} == "lucid" || ${EMACS_USE_X_TOOLKIT} == "athena"
.include "../../mk/xaw.buildlink3.mk"
.elif ${EMACS_USE_X_TOOLKIT} == "motif"
.include "../../mk/motif.buildlink3.mk"
.endif
.endif
.else
CONFIGURE_ARGS+=	--with-x=no
.endif	# EMACS_USE_X

.if defined(USE_INET6) && ${USE_INET6} == YES
CONFIGURE_ARGS+=--with-ipv6
.else
CONFIGURE_ARGS+=--without-ipv6
.endif
MAKE_ENV+=	INSTALL_STRIP=${_STRIPFLAG_INSTALL:Q}

.include "../../mk/compiler.mk"
.if !empty(CC_VERSION:Mgcc-3.*)
CFLAGS+=	-fno-zero-initialized-in-bss
.endif

INFO_FILES=	emacs vip viper forms gnus mh-e cl sc dired-x ediff \
		    ccmode message widget reftex

INSTALL_PROGRAM=${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}

post-extract:
	${CP} ${FILESDIR}/amd64.h ${WRKSRC}/src/m

pre-install:
	@${FIND} ${WRKSRC} -type f -name "*.orig*" -print | ${XARGS} ${RM} -f

post-install:
	${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/emacs

.include "../../mk/bsd.pkg.mk"