summaryrefslogtreecommitdiff
path: root/editors/emacs
diff options
context:
space:
mode:
authormarkd <markd>2005-06-08 14:39:40 +0000
committermarkd <markd>2005-06-08 14:39:40 +0000
commitef2aa0da0d262ec0dd5f35c06432069a14a2c037 (patch)
tree1a8ea8ccfa653e9c59c6f205251945b62278b3cd /editors/emacs
parent8bb0cc70fbb68590928a93e2916e1a28206ef024 (diff)
downloadpkgsrc-ef2aa0da0d262ec0dd5f35c06432069a14a2c037.tar.gz
Share a Makefile.common between emacs and emacs-nox11.
Should fix PR pkg/30462. Also convert emacs to options framework.
Diffstat (limited to 'editors/emacs')
-rw-r--r--editors/emacs/Makefile72
-rw-r--r--editors/emacs/Makefile.common69
2 files changed, 78 insertions, 63 deletions
diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
index 6f714fef719..2ef85be2b5f 100644
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -1,23 +1,13 @@
-# $NetBSD: Makefile,v 1.85 2005/06/01 18:02:45 jlam Exp $
+# $NetBSD: Makefile,v 1.86 2005/06/08 14:39:40 markd Exp $
-DISTNAME= emacs-21.4a
+DISTNAME= emacs-${EMACSVERSION}a
PKGREVISION= 1
CATEGORIES= editors
-MASTER_SITES= ${MASTER_SITE_GNU:=emacs/}
-
-MAINTAINER= markd@NetBSD.org
-HOMEPAGE= http://www.gnu.org/software/emacs/emacs.html
COMMENT= GNU editing macros (editor)
-CONFLICTS= mule-[0-9]*
-
-USE_TOOLS+= gmake
-GNU_CONFIGURE= yes
+.include "../../editors/emacs/Makefile.common"
-# needed for 21.4a, can probably go away on next update
-EMACSVERSION= 21.4
-WRKSRC= ${WRKDIR}/emacs-${EMACSVERSION}
-PLIST_SUBST+= EMACSVERSION=${EMACSVERSION}
+CONFLICTS+= emacs-nox11-[0-9]*
CONFIGURE_ARGS+= --with-x
CONFIGURE_ARGS+= --with-x-toolkit=athena
@@ -36,57 +26,13 @@ CONFIGURE_ARGS+= --with-gif
.include "../../graphics/png/buildlink3.mk"
CONFIGURE_ARGS+= --with-png
-MAKEFLAGS+= EMACSLOADPATH=${WRKSRC}/lisp
+PKG_OPTIONS_VAR= PKG_OPTIONS.emacs
+PKG_SUPPORTED_OPTIONS= emacs-xaw3d
+PKG_OPTIONS_LEGACY_VARS+= EMACS_USE_XAW3D:emacs-xaw3d
+.include "../../mk/bsd.options.mk"
-.include "../../mk/bsd.prefs.mk"
-
-.if defined(EMACS_USE_XAW3D) && !empty(EMACS_USE_XAW3D:M[Yy][Ee][Ss])
+.if !empty(PKG_OPTIONS:Memacs-xaw3d)
.include "../../x11/Xaw3d/buildlink3.mk"
.endif
-# 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]*))
-# 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
-
-.if ${OPSYS} == "Darwin"
-PLIST_SUBST+= FNS_EL="@comment "
-PLIST_SUBST+= DOCTAIL=""
-.else
-PLIST_SUBST+= FNS_EL=""
-PLIST_SUBST+= DOCTAIL="-${EMACSVERSION}.1"
-.endif
-
-.include "../../mk/compiler.mk"
-.if !empty(CC_VERSION:Mgcc-3.*)
-CFLAGS+= -fno-zero-initialized-in-bss
-.endif
-
-INFO_FILES= ada-mode autotype ccmode cl dired-x ebrowse ediff efaq emacs
-INFO_FILES+= emacs-mime eshell eudc forms gnus idlwave message mh-e pcl-cvs
-INFO_FILES+= reftex sc speedbar vip viper widget woman
-
-REPLACE_PERL= lib-src/grep-changelog
-
-post-extract:
- ${CP} ${FILESDIR}/site-init.el ${WRKSRC}/lisp
- ${CP} ${FILESDIR}/amd64.h ${WRKSRC}/src/m
- ${CP} ${FILESDIR}/powermac.h ${WRKSRC}/src/m
- ${CP} ${FILESDIR}/darwin.h ${WRKSRC}/src/s
- ${CP} ${FILESDIR}/unexmacosx.c ${WRKSRC}/src
-
-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"
diff --git a/editors/emacs/Makefile.common b/editors/emacs/Makefile.common
new file mode 100644
index 00000000000..3c3f8cdd744
--- /dev/null
+++ b/editors/emacs/Makefile.common
@@ -0,0 +1,69 @@
+# $NetBSD: Makefile.common,v 1.1 2005/06/08 14:39:40 markd Exp $
+
+MASTER_SITES= ${MASTER_SITE_GNU:=emacs/}
+MAINTAINER= markd@NetBSD.org
+HOMEPAGE= http://www.gnu.org/software/emacs/emacs.html
+
+CONFLICTS= mule-[0-9]*
+
+USE_TOOLS+= gmake
+GNU_CONFIGURE= yes
+
+PATCHDIR= ${.CURDIR}/../../editors/emacs/patches
+FILESDIR= ${.CURDIR}/../../editors/emacs/files
+DISTINFO_FILE= ${.CURDIR}/../../editors/emacs/distinfo
+PLIST_SRC= ${.CURDIR}/../../editors/emacs/PLIST
+
+# needed for 21.4a, can probably go away on next update
+EMACSVERSION= 21.4
+WRKSRC= ${WRKDIR}/emacs-${EMACSVERSION}
+PLIST_SUBST+= EMACSVERSION=${EMACSVERSION}
+
+MAKEFLAGS+= EMACSLOADPATH=${WRKSRC}/lisp
+
+.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]*))
+# 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
+
+.if ${OPSYS} == "Darwin"
+PLIST_SUBST+= FNS_EL="@comment "
+PLIST_SUBST+= DOCTAIL=""
+.else
+PLIST_SUBST+= FNS_EL=""
+PLIST_SUBST+= DOCTAIL="-${EMACSVERSION}.1"
+.endif
+
+.include "../../mk/compiler.mk"
+.if !empty(CC_VERSION:Mgcc-3.*)
+CFLAGS+= -fno-zero-initialized-in-bss
+.endif
+
+INFO_FILES= ada-mode autotype ccmode cl dired-x ebrowse ediff efaq emacs
+INFO_FILES+= emacs-mime eshell eudc forms gnus idlwave message mh-e pcl-cvs
+INFO_FILES+= reftex sc speedbar vip viper widget woman
+
+REPLACE_PERL= lib-src/grep-changelog
+
+post-extract:
+ ${CP} ${FILESDIR}/site-init.el ${WRKSRC}/lisp
+ ${CP} ${FILESDIR}/amd64.h ${WRKSRC}/src/m
+ ${CP} ${FILESDIR}/powermac.h ${WRKSRC}/src/m
+ ${CP} ${FILESDIR}/darwin.h ${WRKSRC}/src/s
+ ${CP} ${FILESDIR}/unexmacosx.c ${WRKSRC}/src
+
+pre-install:
+ @${FIND} ${WRKSRC} -type f -name "*.orig" -print | ${XARGS} ${RM} -f
+
+post-install:
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/emacs