pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/bacula Use PKG_OPTIONS_REQUIRED_GROUPS for ma...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c61b15f0c6f5
branches:  trunk
changeset: 500353:c61b15f0c6f5
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Oct 07 11:33:28 2005 +0000

description:
Use PKG_OPTIONS_REQUIRED_GROUPS for making sure only one option
from a group is selected, instead of handling it manually.
>From Geert Hendrickx on tech-pkg.

diffstat:

 sysutils/bacula/options.mk |  16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diffs (27 lines):

diff -r b07395a6e4d3 -r c61b15f0c6f5 sysutils/bacula/options.mk
--- a/sysutils/bacula/options.mk        Fri Oct 07 11:30:35 2005 +0000
+++ b/sysutils/bacula/options.mk        Fri Oct 07 11:33:28 2005 +0000
@@ -1,18 +1,12 @@
-# $NetBSD: options.mk,v 1.1 2005/10/07 11:30:35 wiz Exp $
+# $NetBSD: options.mk,v 1.2 2005/10/07 11:33:28 wiz Exp $
 
-PKG_OPTIONS_VAR=       PKG_OPTIONS.bacula
-PKG_SUPPORTED_OPTIONS= catalog-sqlite catalog-pgsql
-PKG_SUGGESTED_OPTIONS= catalog-sqlite
+PKG_OPTIONS_VAR=               PKG_OPTIONS.bacula
+PKG_OPTIONS_REQUIRED_GROUPS=   database
+PKG_OPTIONS_GROUP.database=    catalog-sqlite catalog-pgsql
+PKG_SUGGESTED_OPTIONS=         catalog-sqlite
 
 .include "../../mk/bsd.options.mk"
 
-# Too bad -1-6's make doesn't have :[#] modifier
-.for _option_ in catalog
-. if empty(PKG_OPTIONS:M${_option_}-*)
-PKG_FAIL_REASON+=      "There must one and only one ${_option_} defined."
-. endif
-.endfor
-
 # Other options
 
 BACULA_GROUP?=         bacula



Home | Main Index | Thread Index | Old Index