summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2005-10-03 21:18:55 +0000
committeragc <agc@pkgsrc.org>2005-10-03 21:18:55 +0000
commitb88676d14004fc34f123ad25a44dc2df743e2efe (patch)
treebcac4103d18db2664a7d30bf91ecb0bb5e311b22
parent1130c6ef25444f15bf91f0beb62ba4a52a66f1be (diff)
downloadpkgsrc-b88676d14004fc34f123ad25a44dc2df743e2efe.tar.gz
Move jwhois to the package options framework.
With thanks to Thomas Klausner for clueing me in - all mistakes are mine.
-rw-r--r--mk/defaults/mk.conf7
-rw-r--r--mk/defaults/options.description1
-rw-r--r--net/jwhois/Makefile12
-rw-r--r--net/jwhois/options.mk15
4 files changed, 19 insertions, 16 deletions
diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf
index f9ab415b7d8..634c35dc6ce 100644
--- a/mk/defaults/mk.conf
+++ b/mk/defaults/mk.conf
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.78 2005/08/13 11:25:14 dillo Exp $
+# $NetBSD: mk.conf,v 1.79 2005/10/03 21:18:55 agc Exp $
#
# A file providing defaults for pkgsrc and the packages collection.
@@ -1145,11 +1145,6 @@ JSDK_HOME?= ${JAVA_HOME}/jsdk
# Possible: any directory
# Default: ${JAVA_HOME}/jsdk
-#JWHOIS_ENABLE_CACHE=
-# Enable cache option in net/jwhois package.
-# Possible: defined or not defined.
-# Default: not defined.
-
#KERBEROS=
# Used in many packages to specify use of a Kerberos (or compatible)
# subsystem. Requires Kerberos libraries in /usr/lib.
diff --git a/mk/defaults/options.description b/mk/defaults/options.description
index 85743d0c15b..702841c40bb 100644
--- a/mk/defaults/options.description
+++ b/mk/defaults/options.description
@@ -132,6 +132,7 @@ jasper Enable JPEG 2000 support using the jasper library.
java
jpeg Enable JPEG support.
jpilot
+jwhois Enable cache support.
kde
kerberos Enable Kerberos support.
kerberos4 Enable Kerberos4 support.
diff --git a/net/jwhois/Makefile b/net/jwhois/Makefile
index 34e6402a6e2..6293067067d 100644
--- a/net/jwhois/Makefile
+++ b/net/jwhois/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.54 2005/05/24 07:43:07 kleink Exp $
+# $NetBSD: Makefile,v 1.55 2005/10/03 21:18:55 agc Exp $
#
DISTNAME= jwhois-3.2.2
@@ -20,15 +20,7 @@ LIBS.SunOS+= -lnsl -lsocket
INFO_FILES= jwhois.info
-BUILD_DEFS+= JWHOIS_ENABLE_CACHE
-
-.if defined(JWHOIS_ENABLE_CACHE)
-CONFIGURE_ARGS+= --with-cache
-CONF_FILES_PERMS= /dev/null /${VARBASE}/db/jwhois.db \
- ${ROOT_USER} nogroup 0666
-.else
-CONFIGURE_ARGS+= --without-cache
-.endif
+.include "options.mk"
EGDIR= ${PREFIX}/share/examples/jwhois
CONF_FILES= ${EGDIR}/jwhois.conf.default \
diff --git a/net/jwhois/options.mk b/net/jwhois/options.mk
new file mode 100644
index 00000000000..8ef16aa3839
--- /dev/null
+++ b/net/jwhois/options.mk
@@ -0,0 +1,15 @@
+# $NetBSD: options.mk,v 1.1 2005/10/03 21:18:55 agc Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.jwhois
+PKG_SUPPORTED_OPTIONS= jwhois-enable-cache
+PKG_OPTIONS_LEGACY_VARS=JWHOIS_ENABLE_CACHE:jwhois-enable-cache
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mjwhois-enable-cache)
+CONFIGURE_ARGS+= --with-cache
+CONF_FILES_PERMS= /dev/null /${VARBASE}/db/jwhois.db \
+ ${ROOT_USER} nogroup 0666
+.else
+CONFIGURE_ARGS+= --without-cache
+.endif