summaryrefslogtreecommitdiff
path: root/editors/xemacs/Makefile.common
blob: 294686039de426a6a4dfb7780d3a1cb11832f248 (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
# $NetBSD: Makefile.common,v 1.10 2005/05/16 01:15:31 jlam Exp $

DISTNAME=	xemacs-21.4.17
CATEGORIES=	editors
MASTER_SITES=	${MASTER_SITE_XEMACS:=xemacs-21.4/}
DISTFILES=	${EXTRACT_ONLY} ${EXTRA_FILES}

HOMEPAGE=	http://www.xemacs.org/
COMMENT=	XEmacs text editor version 21

CONFLICTS+=	gnuclient-[0-9]*

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

PKGSRC_USE_TOOLS+=	gtar

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 "options.mk"

# XXX GUI configuration is a mess...
#
#.if defined(USE_ATHENA)
#WITH_DIALOGS= \
#		--with-menubars=athena \
#		--with-scrollbars=athena \
#		--with-dialogs=athena \
#		--with-widgets=athena \
#		--with-athena=xaw \
#		--with-xim=xlib
#.include "../../mk/xaw.buildlink3.mk"
#.elif defined(USE_MOTIF)
#WITH_DIALOGS= \
#		--with-menubars=motif \
#		--with-scrollbars=motif \
#		--with-dialogs=motif \
#		--with-widgets=motif \
#		--with-xim=motif
#.include "../../mk/motif.buildlink3.mk"
#.elif defined(USE_GTK)
#WITH_DIALOGS= \
#		--with-gtk \
#		--with-menubars=yes \
#		--with-scrollbars=yes \
#		--with-dialogs=yes \
#		--with-widgets=yes \
#		--with-xim=yes
#.include "../../x11/gtk/buildlink3.mk"
#.else
# XXX Default is "lucid".  Due to the output of `configure --help', Lucid
#     widgets wrap Athena, so xaw.buildlink3.mk.
WITH_DIALOGS= \
		--with-toolbars=yes \
		--with-menubars=lucid \
		--with-scrollbars=lucid \
		--with-dialogs=lucid \
		--with-widgets=lucid \
		--with-athena=xaw \
		--with-xim=xlib
.include "../../mk/xaw.buildlink3.mk"
#.endif

.if ${OPSYS} == "SunOS"
.  if !exists(/usr/demo/SOUND/libaudio.a) && !exists(/usr/demo/SOUND/lib/libaudio.a)
CONFIGURE_ARGS+=	--with_sound=none
.  endif
.endif

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

.include "../../databases/gdbm/buildlink3.mk"
.include "../../mk/ossaudio.buildlink3.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
.if ${OPSYS} != "Linux"
CONFIGURE_ARGS+=	--with-ncurses=no
.endif
CONFIGURE_ARGS+=	--with-msw=no
CONFIGURE_ARGS+=	${WITH_DIALOGS}
CONFIGURE_ARGS+=	--infopath="${INFOPATH}"

CFLAGS+=		-Dunix

post-extract:
	@for f in ${EXTRA_FILES}; do \
		${GTAR} xzCf ${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/$$f; \
	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 defined(MANZ)
	${FIND} ${PREFIX}/lib/${DISTNAME} -name "*.el" -type f -print | \
	${XARGS} ${GZIP_CMD}
.endif