summaryrefslogtreecommitdiff
path: root/editors/xemacs-nox11/Makefile
blob: 73783af1e3699b99beb4f11f12b78c59110e11cd (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# $NetBSD: Makefile,v 1.3 2003/01/17 02:40:25 uebayasi Exp $

DISTNAME=	xemacs-21.1.14
PKGNAME=	xemacs-nox11-21.1.14
CATEGORIES=	editors
MASTER_SITES=	ftp://ftp.xemacs.org/pub/xemacs/xemacs-21.1/ \
		ftp://ftp.mpi-sb.mpg.de/pub/gnu/mirror/ftp.xemacs.org/xemacs/xemacs-21.1/ \
		ftp://ftp.usyd.edu.au/pub/Xemacs/xemacs-21.1/ \
		ftp://ftp.lab.kdd.co.jp/xemacs/xemacs-21.1/ \
		ftp://ftp.th-darmstadt.de/pub/editors/xemacs/xemacs-21.1/
EXTRACT_SUFX=	.tar.bz2
DISTFILES=	${EXTRACT_ONLY} ${EXTRA_FILES}

MAINTAINER=	magick@netbsd.org
HOMEPAGE=	http://www.xemacs.org/
COMMENT=	XEmacs text editor version 21

NOT_FOR_PLATFORM=	*-*-mips*	# fails purespace dumping

CONFLICTS=	xemacs-[0-9]*

PLIST_SRC=	${.CURDIR}/../xemacs/PLIST
DISTINFO_FILE=	${.CURDIR}/../xemacs/distinfo
PATCHDIR=	${.CURDIR}/../xemacs/patches

USE_BUILDLINK2=	YES
#USE_X11=	YES

BUILD_DEFS+=	USE_LDAP USE_XFACE
DIST_SUBDIR=	xemacs
EXTRA_FILES=	${DISTNAME}-elc.tar.gz ${DISTNAME}-info.tar.gz
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
PLIST_SUBST+=	DISTNAME="${DISTNAME}"
MESSAGE_SUBST+=	DISTNAME="${DISTNAME}"

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

.if defined(MANZ)
PLIST_SUBST+=	ELSUFX='.gz'
.else
PLIST_SUBST+=	ELSUFX=''
.endif

#.if defined(USE_ATHENA)
# WITH_DIALOGS=  --with-menubars=athena\
#		--with-scrollbars=athena\
#		--with-dialogs=athena\
#		--with-xim=xlib
#.else
# WITH_DIALOGS=  --with-dialogs=motif
#.endif

.if defined(USE_LDAP) && (${USE_LDAP} == "YES")
WITH_LDAP=	--with-ldap
.  include "../../databases/openldap/buildlink2.mk"
.else
WITH_LDAP=	--without-ldap
.endif

.if defined(USE_XFACE) && (${USE_XFACE} == "YES")
WITH_XFACE=	--with-xface
.  include "../../mail/faces/buildlink2.mk"
.else
WITH_XFACE=	--without-xface
.endif

.if defined(EMACS_CANNA) && (${EMACS_CANNA} == "YES")
.  include "../../inputmethod/canna-lib/buildlink2.mk"
WITH_CANNA=	--with-canna
.else
WITH_CANNA=	--without-canna
.endif

.include "../../databases/gdbm/buildlink2.mk"
#.include "../../graphics/jpeg/buildlink2.mk"
#.include "../../graphics/png/buildlink2.mk"
#.include "../../graphics/tiff/buildlink2.mk"
#.include "../../graphics/xpm/buildlink2.mk"
#.if !defined(USE_ATHENA)
#.include "../../mk/motif.buildlink2.mk"
#.endif
.include "../../mk/ossaudio.buildlink2.mk"

INFOPATH=	${PREFIX}/info:${X11BASE}/info:/usr/local/info

HAS_CONFIGURE=		YES
CONFIGURE_ARGS+=	${MACHINE_GNU_PLATFORM}
CONFIGURE_ARGS+=	--prefix=${PREFIX}
CONFIGURE_ARGS+=	--with-clash-detection
CONFIGURE_ARGS+=	--with-mule=yes
CONFIGURE_ARGS+=	--without-ncurses
CONFIGURE_ARGS+=	--without-msw
CONFIGURE_ARGS+=	--with-session=yes
CONFIGURE_ARGS+=	${WITH_DIALOGS} ${WITH_LDAP} ${WITH_XFACE} ${WITH_CANNA}
CONFIGURE_ARGS+=	--infopath="${INFOPATH}"
CONFIGURE_ARGS+=	--lockdir=/var/tmp/xemacs.lock
CONFIGURE_ARGS+=	--site-includes=${PREFIX}/include:${WRKDIR}
CONFIGURE_ARGS+=	--site-libraries=${PREFIX}/lib
CONFIGURE_ARGS+=	--without-x11	# XXX -nox
CONFIGURE_ARGS+=	--without-jpeg	# XXX -nox
CONFIGURE_ARGS+=	--without-png	# XXX -nox
CONFIGURE_ARGS+=	--without-tiff	# XXX -nox
CONFIGURE_ARGS+=	--without-xpm	# XXX -nox

CFLAGS+=		-Dunix
MAKE_ENV+=		INSTALL_MAN="${INSTALL_MAN}"
MAKE_ENV+=		INSTALL_SCRIPT="${INSTALL_SCRIPT}"

post-extract:
	for FILE in ${EXTRA_FILES}; do					\
		${GTAR} xzCf ${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/$$FILE; \
	done

post-patch:
	@${RM} -f ${WRKSRC}/etc/ctags.1.orig

post-install:
	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/${DISTNAME}
	@${INSTALL_DATA_DIR} ${PREFIX}/lib/xemacs
	@if [ "X${MANZ}" != X"" ]; then \
		${WRKSRC}/lib-src/gzip-el.sh ${PREFIX}/lib/${DISTNAME}; \
	fi

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