pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libstatgrab + Convert to use the options framewo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/398beee39838
branches:  trunk
changeset: 540871:398beee39838
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Apr 09 16:18:39 2008 +0000

description:
+ 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:

 devel/libstatgrab/Makefile   |  34 ++++++++--------------------------
 devel/libstatgrab/PLIST      |  10 +++++-----
 devel/libstatgrab/options.mk |  27 +++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 31 deletions(-)

diffs (103 lines):

diff -r 568c1182af2b -r 398beee39838 devel/libstatgrab/Makefile
--- a/devel/libstatgrab/Makefile        Wed Apr 09 09:03:59 2008 +0000
+++ b/devel/libstatgrab/Makefile        Wed Apr 09 16:18:39 2008 +0000
@@ -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 @@
 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 -r 568c1182af2b -r 398beee39838 devel/libstatgrab/PLIST
--- a/devel/libstatgrab/PLIST   Wed Apr 09 09:03:59 2008 +0000
+++ b/devel/libstatgrab/PLIST   Wed Apr 09 16:18:39 2008 +0000
@@ -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 -r 568c1182af2b -r 398beee39838 devel/libstatgrab/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libstatgrab/options.mk      Wed Apr 09 16:18:39 2008 +0000
@@ -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



Home | Main Index | Thread Index | Old Index