summaryrefslogtreecommitdiff
path: root/editors/emacs20/options.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-08-13 12:40:57 +0000
committerjlam <jlam@pkgsrc.org>2007-08-13 12:40:57 +0000
commit81867fe6ef7fe46dc373c35df23a5ed9cb0e55a5 (patch)
tree8552a79498067dda4b7f3f68a15003858bc3d074 /editors/emacs20/options.mk
parentd630f7f510973cac23195da6d1d277d776921899 (diff)
downloadpkgsrc-81867fe6ef7fe46dc373c35df23a5ed9cb0e55a5.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/emacs20/options.mk')
-rw-r--r--editors/emacs20/options.mk87
1 files changed, 87 insertions, 0 deletions
diff --git a/editors/emacs20/options.mk b/editors/emacs20/options.mk
new file mode 100644
index 00000000000..44b6d5b66be
--- /dev/null
+++ b/editors/emacs20/options.mk
@@ -0,0 +1,87 @@
+# $NetBSD: options.mk,v 1.1 2007/08/13 12:40:58 jlam Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.emacs
+PKG_SUPPORTED_OPTIONS= emacs-pop inet6 x11
+PKG_OPTIONS_OPTIONAL_GROUPS= toolkit
+PKG_OPTIONS_GROUP.toolkit= motif xaw
+PKG_SUGGESTED_OPTIONS= emacs-pop inet6
+
+###
+### OBSOLETE section. Should be removed after pkgsrc-2007Q4.
+###
+
+PKG_OPTIONS_LEGACY_VARS+= EMACS_USE_POP:emacs-pop
+PKG_OPTIONS_LEGACY_VARS+= EMACS_USE_X:x11
+
+.if defined(EMACS_USE_X) && defined(EMACS_USE_X_TOOLKIT)
+. if (${EMACS_USE_X_TOOLKIT} == "lucid") || \
+ (${EMACS_USE_X_TOOLKIT} == "athena")
+PKG_LEGACY_OPTIONS+= xaw
+PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated variable EMACS_USE_X_TOOLKIT="${EMACS_USE_X_TOOLKIT:Q}" used, use PKG_DEFAULT_OPTIONS+=xaw instead."
+. elif ${EMACS_USE_X_TOOLKIT} == "motif"
+PKG_LEGACY_OPTIONS+= motif
+PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated variable EMACS_USE_X_TOOLKIT="${EMACS_USE_X_TOOLKIT:Q}" used, use PKG_DEFAULT_OPTIONS+=motif instead."
+. endif
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Support POP connections for retrieving mail.
+###
+.if !empty(PKG_OPTIONS:Memacs-pop)
+CONFIGURE_ARGS+= --with-pop
+.endif
+
+###
+### Support IPv6 connections.
+###
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --enable-ipv6
+.else
+CONFIGURE_ARGS+= --disable-ipv6
+.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)
+USE_TOOLS+= imake
+CONFIGURE_ARGS+= --with-x
+.else
+CONFIGURE_ARGS+= --without-x
+.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