summaryrefslogtreecommitdiff
path: root/devel/libstatgrab
diff options
context:
space:
mode:
authorjlam <jlam>2008-04-09 16:18:39 +0000
committerjlam <jlam>2008-04-09 16:18:39 +0000
commit5052e10a67d7ccd24f54857923d9b39100e11e35 (patch)
treeb7305fb5821f772ec407b4ea392bfc5f0d03ed42 /devel/libstatgrab
parent5933bc4c20daba28a7df49ad3a8e640529b51865 (diff)
downloadpkgsrc-5052e10a67d7ccd24f54857923d9b39100e11e35.tar.gz
+ Convert to use the options framework instead of using WITHOUT_SAIDAR
and WITHOUT_STATGRAB. + Convert to use PLIST_VARS instead of manually passing "@comment " to the plist module. Bump the PKGREVISION to 3 for the options changes.
Diffstat (limited to 'devel/libstatgrab')
-rw-r--r--devel/libstatgrab/Makefile34
-rw-r--r--devel/libstatgrab/PLIST10
-rw-r--r--devel/libstatgrab/options.mk27
3 files changed, 40 insertions, 31 deletions
diff --git a/devel/libstatgrab/Makefile b/devel/libstatgrab/Makefile
index 4b033dd0d82..4603679e619 100644
--- a/devel/libstatgrab/Makefile
+++ b/devel/libstatgrab/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.14 2007/11/06 21:17:34 reed Exp $
+# $NetBSD: Makefile,v 1.15 2008/04/09 16:18:39 jlam Exp $
DISTNAME= libstatgrab-0.12
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel
MASTER_SITES= ftp://ftp.uk.i-scream.org/pub/i-scream/libstatgrab/ \
ftp://ftp.i-scream.org/pub/i-scream/libstatgrab/ \
@@ -11,35 +11,17 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.i-scream.org/libstatgrab/
COMMENT= Provides a useful interface to system statistics
-GNU_CONFIGURE= yes
-USE_LIBTOOL= yes
+.include "options.mk"
USE_TOOLS+= pkg-config perl:run
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
PKGCONFIG_OVERRIDE= libstatgrab.pc.in
-REPLACE_PERL+= src/statgrab/statgrab-make-mrtg-config.in
-REPLACE_PERL+= src/statgrab/statgrab-make-mrtg-index.in
+REPLACE_PERL+= src/statgrab/statgrab-make-mrtg-config.in
+REPLACE_PERL+= src/statgrab/statgrab-make-mrtg-index.in
CONFIGURE_ARGS+= --disable-examples
-.include "../../mk/bsd.prefs.mk"
-
-BUILD_DEFS+= WITHOUT_STATGRAB
-BUILD_DEFS+= WITHOUT_SAIDAR
-
-.if defined(WITHOUT_STATGRAB)
-CONFIGURE_ARGS+= --disable-statgrab
-PLIST_SUBST+= STATGRAB="@comment "
-.else
-PLIST_SUBST+= STATGRAB=""
-.endif
-
-.if defined(WITHOUT_SAIDAR)
-CONFIGURE_ARGS+= --disable-saidar
-PLIST_SUBST+= SAIDAR="@comment "
-.else
-PLIST_SUBST+= SAIDAR=""
-.include "../../devel/ncurses/buildlink3.mk"
-.endif
-
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/libstatgrab/PLIST b/devel/libstatgrab/PLIST
index 390d3113793..d21aa97c9d3 100644
--- a/devel/libstatgrab/PLIST
+++ b/devel/libstatgrab/PLIST
@@ -1,8 +1,8 @@
-@comment $NetBSD: PLIST,v 1.4 2005/11/08 21:43:03 reed Exp $
-${SAIDAR}bin/saidar
-${STATGRAB}bin/statgrab
-${STATGRAB}bin/statgrab-make-mrtg-config
-${STATGRAB}bin/statgrab-make-mrtg-index
+@comment $NetBSD: PLIST,v 1.5 2008/04/09 16:18:39 jlam Exp $
+${PLIST.saidar}bin/saidar
+${PLIST.statgrab}bin/statgrab
+${PLIST.statgrab}bin/statgrab-make-mrtg-config
+${PLIST.statgrab}bin/statgrab-make-mrtg-index
include/statgrab.h
include/statgrab_deprecated.h
lib/libstatgrab.la
diff --git a/devel/libstatgrab/options.mk b/devel/libstatgrab/options.mk
new file mode 100644
index 00000000000..392e45a63f3
--- /dev/null
+++ b/devel/libstatgrab/options.mk
@@ -0,0 +1,27 @@
+# $NetBSD: options.mk,v 1.1 2008/04/09 16:18:39 jlam Exp $
+
+PKG_OPTIONS_VAR= libstatgrab
+PKG_SUPPORTED_OPTIONS= saidar statgrab
+PKG_DEFAULT_OPTIONS= saidar statgrab
+
+.include "../../mk/bsd.options.mk"
+
+.if defined(WITHOUT_SAIDAR)
+PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated variable WITHOUT_SAIDAR used; use \`\`-saidar'' instead."
+.endif
+.if defined(WITHOUT_STATGRAB)
+PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated variable WITHOUT_STATGRAB used; use \`\`-statgrab'' instead."
+.endif
+
+.if !empty(PKG_OPTIONS:Mstatgrab)
+PLIST.statgrab= yes
+.else
+CONFIGURE_ARGS+= --disable-statgrab
+.endif
+
+.if !empty(PKG_OPTIONS:Msaidar)
+PLIST.saidar= yes
+. include "../../devel/ncurses/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-saidar
+.endif