summaryrefslogtreecommitdiff
path: root/editors/emacs21
diff options
context:
space:
mode:
authorjlam <jlam>2007-08-13 12:40:57 +0000
committerjlam <jlam>2007-08-13 12:40:57 +0000
commita0fba3233dc71c3455274135a60ec9e1e342beba (patch)
tree8552a79498067dda4b7f3f68a15003858bc3d074 /editors/emacs21
parent4b98925ad30b614ddd1c412c27104add60c1aaec (diff)
downloadpkgsrc-a0fba3233dc71c3455274135a60ec9e1e342beba.tar.gz
Fix up the use of package options in the Emacs packages:
(1) Get rid of "nox11" -- the concept of "no" in package options is expressed by negating an option; use "-x11" instead. (2) Teach editors/emacs20 to use package options instead of EMACS_USE_POP, EMACS_USE_X, EMACS_USE_X_TOOLKIT and USE_INET6. We now use similar options as the other emacs packages, i.e. "x11", "motif", "xaw", as well as "pop" and "inet6". (3) Make the emacs*-nox11 packages simply remove all X11 options by setting PKG_OPTIONS.emacs appropriately and include the corresponding emacs Makefile. This allows for modifications to the emacs "X11" versions to be automatically picked up by the "non-X11" versions. The two corresponding versions of emacs now share the same version numbering, including PKGREVISIONs. Bump the PKGREVISIONs on all Emacs editor packages.
Diffstat (limited to 'editors/emacs21')
-rw-r--r--editors/emacs21/Makefile34
-rw-r--r--editors/emacs21/options.mk80
2 files changed, 83 insertions, 31 deletions
diff --git a/editors/emacs21/Makefile b/editors/emacs21/Makefile
index ee73c1e0ecc..ac51f42e700 100644
--- a/editors/emacs21/Makefile
+++ b/editors/emacs21/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2007/06/11 13:38:27 markd Exp $
+# $NetBSD: Makefile,v 1.7 2007/08/13 12:40:58 jlam Exp $
DISTNAME= emacs-${EMACSVERSION}a
-PKGREVISION= 10
+PKGREVISION= 11
CATEGORIES= editors
COMMENT= GNU editing macros (editor)
@@ -11,36 +11,8 @@ USE_TOOLS+= imake
CONFLICTS+= emacs-nox11-[0-9]*
-CONFIGURE_ARGS+= --with-x
CONFIGURE_ARGS+= --srcdir=${WRKSRC:Q}
-.include "../../x11/libXpm/buildlink3.mk"
-CONFIGURE_ARGS+= --with-xpm
-.include "../../graphics/jpeg/buildlink3.mk"
-CONFIGURE_ARGS+= --with-jpeg
-.include "../../graphics/tiff/buildlink3.mk"
-CONFIGURE_ARGS+= --with-tiff
-# need 4.1.0b1 or higher (a bug in 4.1.0 can crash Emacs)
-BUILDLINK_API_DEPENDS.libungif+= libungif>=4.1.0.1
-.include "../../graphics/libungif/buildlink3.mk"
-CONFIGURE_ARGS+= --with-gif
-.include "../../graphics/png/buildlink3.mk"
-CONFIGURE_ARGS+= --with-png
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.emacs
-PKG_OPTIONS_OPTIONAL_GROUPS= toolkit
-PKG_OPTIONS_GROUP.toolkit= emacs-xaw3d motif
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mmotif)
-.include "../../mk/motif.buildlink3.mk"
-CONFIGURE_ARGS+= --with-x-toolkit=motif
-.elif !empty(PKG_OPTIONS:Memacs-xaw3d)
-.include "../../x11/Xaw3d/buildlink3.mk"
-CONFIGURE_ARGS+= --with-x-toolkit=athena
-.else
-.include "../../x11/libXaw/buildlink3.mk"
-CONFIGURE_ARGS+= --with-x-toolkit=athena
-.endif
+.include "options.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/editors/emacs21/options.mk b/editors/emacs21/options.mk
new file mode 100644
index 00000000000..9a6ca2fd16d
--- /dev/null
+++ b/editors/emacs21/options.mk
@@ -0,0 +1,80 @@
+# $NetBSD: options.mk,v 1.1 2007/08/13 12:40:58 jlam Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.emacs
+PKG_SUPPORTED_OPTIONS= x11
+PKG_OPTIONS_OPTIONAL_GROUPS= toolkit
+PKG_OPTIONS_GROUP.toolkit= emacs-xaw3d motif xaw
+PKG_SUGGESTED_OPTIONS= x11
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Treat "emacs-xaw3d" as a special case of "xaw".
+###
+.if !empty(PKG_OPTIONS:Memacs-xaw3d)
+XAW_TYPE= 3d
+PKG_OPTIONS:= ${PKG_OPTIONS:Nemacs-xaw3d}
+PKG_OPTIONS+= xaw
+.endif
+
+###
+### Any of the "toolkit" options implies "x11".
+###
+.if !empty(PKG_OPTIONS:Mmotif) || !empty(PKG_OPTIONS:Mxaw)
+. if empty(PKG_OPTIONS:Mx11)
+PKG_OPTIONS+= x11
+. endif
+.endif
+
+###
+### Default to using the Xaw X11 toolkit if none is specified.
+###
+.if !empty(PKG_OPTIONS:Mx11)
+. if empty(PKG_OPTIONS:Mmotif) && empty(PKG_OPTIONS:Mxaw)
+PKG_OPTIONS+= xaw
+. endif
+.endif
+
+###
+### Support drawing pretty X11 widgets.
+###
+.if !empty(PKG_OPTIONS:Mx11)
+. include "../../graphics/jpeg/buildlink3.mk"
+. include "../../graphics/tiff/buildlink3.mk"
+. include "../../graphics/png/buildlink3.mk"
+. include "../../x11/libXpm/buildlink3.mk"
+
+# Need libungif>=4.1.0b1 (a bug in 4.1.0 can crash Emacs)
+BUILDLINK_API_DEPENDS.libungif+= libungif>=4.1.0.1
+. include "../../graphics/libungif/buildlink3.mk"
+
+CONFIGURE_ARGS+= --with-gif
+CONFIGURE_ARGS+= --with-jpeg
+CONFIGURE_ARGS+= --with-png
+CONFIGURE_ARGS+= --with-tiff
+CONFIGURE_ARGS+= --with-x
+CONFIGURE_ARGS+= --with-xpm
+.else
+CONFIGURE_ARGS+= --without-gif
+CONFIGURE_ARGS+= --without-jpeg
+CONFIGURE_ARGS+= --without-png
+CONFIGURE_ARGS+= --without-tiff
+CONFIGURE_ARGS+= --without-x
+CONFIGURE_ARGS+= --without-xpm
+.endif
+
+###
+### Support using Motif X11 widgets.
+###
+.if !empty(PKG_OPTIONS:Mmotif)
+. include "../../mk/motif.buildlink3.mk"
+CONFIGURE_ARGS+= --with-x-toolkit=motif
+.endif
+
+###
+### Support using Xaw (Lucid) X11 widgets.
+###
+.if !empty(PKG_OPTIONS:Mxaw)
+. include "../../mk/xaw.buildlink3.mk"
+CONFIGURE_ARGS+= --with-x-toolkit=athena
+.endif