pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/editors Fix up the use of package options in the Emacs...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8fc535d53f3e
branches: trunk
changeset: 532186:8fc535d53f3e
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Aug 13 12:40:57 2007 +0000
description:
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:
editors/emacs-nox11/Makefile | 20 ++----
editors/emacs/Makefile | 5 +-
editors/emacs/options.mk | 111 ++++++++++++++++++++++++++++------------
editors/emacs20/Makefile | 33 +-----------
editors/emacs20/options.mk | 87 ++++++++++++++++++++++++++++++++
editors/emacs21-nox11/Makefile | 15 ++--
editors/emacs21/Makefile | 34 +-----------
editors/emacs21/options.mk | 80 +++++++++++++++++++++++++++++
8 files changed, 266 insertions(+), 119 deletions(-)
diffs (truncated from 482 to 300 lines):
diff -r d2046672feac -r 8fc535d53f3e editors/emacs-nox11/Makefile
--- a/editors/emacs-nox11/Makefile Mon Aug 13 12:09:47 2007 +0000
+++ b/editors/emacs-nox11/Makefile Mon Aug 13 12:40:57 2007 +0000
@@ -1,19 +1,13 @@
-# $NetBSD: Makefile,v 1.26 2007/06/11 13:57:21 markd Exp $
+# $NetBSD: Makefile,v 1.27 2007/08/13 12:40:57 jlam Exp $
-DISTNAME= emacs-${EMACSVERSION}
PKGNAME= emacs-nox11-${EMACSVERSION}
-CATEGORIES= editors
-COMMENT= GNU editing macros (editor) - non X11 version
-
-.include "../../editors/emacs/Makefile.common"
+COMMENT_EXTRA= : non-X11 version
CONFLICTS+= emacs-[0-9]*
-CONFIGURE_ARGS+= --without-x
-CONFIGURE_ARGS+= --without-xpm
-CONFIGURE_ARGS+= --without-jpeg
-CONFIGURE_ARGS+= --without-tiff
-CONFIGURE_ARGS+= --without-gif
-CONFIGURE_ARGS+= --without-png
+.include "../../mk/bsd.prefs.mk"
-.include "../../mk/bsd.pkg.mk"
+# Forcibly remove any "x11" options.
+PKG_OPTIONS.emacs+= -x11 -gtk -motif -xaw
+
+.include "../../editors/emacs/Makefile"
diff -r d2046672feac -r 8fc535d53f3e editors/emacs/Makefile
--- a/editors/emacs/Makefile Mon Aug 13 12:09:47 2007 +0000
+++ b/editors/emacs/Makefile Mon Aug 13 12:40:57 2007 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.104 2007/06/11 13:57:15 markd Exp $
+# $NetBSD: Makefile,v 1.105 2007/08/13 12:40:57 jlam Exp $
DISTNAME= emacs-${EMACSVERSION}
+PKGREVISION= 1
CATEGORIES= editors
-COMMENT= GNU editing macros (editor)
+COMMENT= GNU editing macros (editor)${COMMENT_EXTRA}
.include "../../editors/emacs/Makefile.common"
diff -r d2046672feac -r 8fc535d53f3e editors/emacs/options.mk
--- a/editors/emacs/options.mk Mon Aug 13 12:09:47 2007 +0000
+++ b/editors/emacs/options.mk Mon Aug 13 12:40:57 2007 +0000
@@ -1,48 +1,89 @@
-# $NetBSD: options.mk,v 1.1 2007/06/11 13:57:16 markd Exp $
+# $NetBSD: options.mk,v 1.2 2007/08/13 12:40:57 jlam Exp $
-PKG_OPTIONS_VAR= PKG_OPTIONS.emacs
-PKG_OPTIONS_REQUIRED_GROUPS= toolkit
-PKG_OPTIONS_GROUP.toolkit= gtk motif xaw nox11
-PKG_SUGGESTED_OPTIONS= xaw
+PKG_OPTIONS_VAR= PKG_OPTIONS.emacs
+PKG_SUPPORTED_OPTIONS= x11
+PKG_SUPPORTED_OPTIONS+= nox11 # OBSOLETE; remove after pkgsrc-2007Q4
+PKG_OPTIONS_OPTIONAL_GROUPS= toolkit
+PKG_OPTIONS_GROUP.toolkit= gtk motif xaw
+PKG_SUGGESTED_OPTIONS= x11
.include "../../mk/bsd.options.mk"
-.if !empty(PKG_OPTIONS:Mmotif) || !empty(PKG_OPTIONS:Mgtk) || !empty(PKG_OPTIONS:Mxaw)
+###
+### OBSOLETE section. Should be removed after pkgsrc-2007Q4.
+### The "nox11" option implies removing all of the "x11"-related options.
+###
+.if !empty(PKG_OPTIONS:Mnox11)
+PKG_OPTIONS:= ${PKG_OPTIONS:Nx11:Ngtk:Nmotif:Nxaw}
+PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated option nox11 used, use option -x11 instead."
+.endif
+
+###
+### Any of the "toolkit" options implies "x11".
+###
+.if !empty(PKG_OPTIONS:Mgtk) || !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:Mgtk) && 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
-CONFIGURE_ARGS+= --with-jpeg
-CONFIGURE_ARGS+= --with-tiff
-CONFIGURE_ARGS+= --with-gif
-CONFIGURE_ARGS+= --with-png
+.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
-.include "../../graphics/jpeg/buildlink3.mk"
-.include "../../graphics/tiff/buildlink3.mk"
-.include "../../graphics/libungif/buildlink3.mk"
-.include "../../graphics/png/buildlink3.mk"
-.include "../../x11/libXpm/buildlink3.mk"
-
+###
+### Support using Motif X11 widgets.
+###
.if !empty(PKG_OPTIONS:Mgtk)
-.include "../../x11/gtk2/buildlink3.mk"
+. include "../../x11/gtk2/buildlink3.mk
CONFIGURE_ARGS+= --with-x-toolkit=gtk
-.elif !empty(PKG_OPTIONS:Mmotif)
-.include "../../mk/motif.buildlink3.mk"
+.endif
+
+###
+### Support using Motif X11 widgets.
+###
+.if !empty(PKG_OPTIONS:Mmotif)
+. include "../../mk/motif.buildlink3.mk"
CONFIGURE_ARGS+= --with-x-toolkit=motif
-USE_TOOLS+= pkg-config
-.elif !empty(PKG_OPTIONS:Mxaw)
-.include "../../mk/xaw.buildlink3.mk"
+.endif
+
+###
+### Support using Xaw (Lucid) X11 widgets.
+###
+.if !empty(PKG_OPTIONS:Mxaw)
+. include "../../mk/xaw.buildlink3.mk"
CONFIGURE_ARGS+= --with-x-toolkit=athena
.endif
-
-# need 4.1.0b1 or higher (a bug in 4.1.0 can crash Emacs)
-BUILDLINK_API_DEPENDS.libungif+= libungif>=4.1.0.1
-.endif
-
-.if !empty(PKG_OPTIONS:Mnox11)
-CONFIGURE_ARGS+= --without-x
-CONFIGURE_ARGS+= --without-xpm
-CONFIGURE_ARGS+= --without-jpeg
-CONFIGURE_ARGS+= --without-tiff
-CONFIGURE_ARGS+= --without-gif
-CONFIGURE_ARGS+= --without-png
-.endif
diff -r d2046672feac -r 8fc535d53f3e editors/emacs20/Makefile
--- a/editors/emacs20/Makefile Mon Aug 13 12:09:47 2007 +0000
+++ b/editors/emacs20/Makefile Mon Aug 13 12:40:57 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2007/06/30 01:01:12 joerg Exp $
+# $NetBSD: Makefile,v 1.32 2007/08/13 12:40:58 jlam Exp $
DISTNAME= emacs-20.7
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_GNU:=emacs/} \
${MASTER_SITE_LOCAL}
@@ -28,8 +28,6 @@
USE_TOOLS+= gmake
GNU_ARCH.mipsbe= mips
-BUILD_DEFS+= USE_INET6 EMACS_USE_POP
-
# build PATH in the dumped emacs is not a problem
CHECK_WRKREF_SKIP+= bin/emacs
CHECK_WRKREF_SKIP+= bin/emacs-20.7
@@ -54,33 +52,8 @@
CPPFLAGS+= -DDFLY_PRE_17_CRT
.endif
-EMACS_USE_POP?= yes
-.if (defined(EMACS_USE_POP) && \
- (${EMACS_USE_POP} == yes || ${EMACS_USE_POP} == YES))
-CONFIGURE_ARGS+=--with-pop
-.endif
+.include "options.mk"
-.if defined(EMACS_USE_X)
-.include "../../mk/x11.buildlink3.mk"
-BUILD_DEFS+= EMACS_USE_X EMACS_USE_X_TOOLKIT
-CONFIGURE_ARGS+= --with-x=yes
-.if defined(EMACS_USE_X_TOOLKIT)
-CONFIGURE_ARGS+= --with-x-toolkit=${EMACS_USE_X_TOOLKIT:Q}
-.if ${EMACS_USE_X_TOOLKIT} == "lucid" || ${EMACS_USE_X_TOOLKIT} == "athena"
-.include "../../mk/xaw.buildlink3.mk"
-.elif ${EMACS_USE_X_TOOLKIT} == "motif"
-.include "../../mk/motif.buildlink3.mk"
-.endif
-.endif
-.else
-CONFIGURE_ARGS+= --with-x=no
-.endif # EMACS_USE_X
-
-.if defined(USE_INET6) && ${USE_INET6} == YES
-CONFIGURE_ARGS+=--with-ipv6
-.else
-CONFIGURE_ARGS+=--without-ipv6
-.endif
MAKE_ENV+= INSTALL_STRIP=${_STRIPFLAG_INSTALL:Q}
.include "../../mk/compiler.mk"
diff -r d2046672feac -r 8fc535d53f3e editors/emacs20/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/editors/emacs20/options.mk Mon Aug 13 12:40:57 2007 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index