Subject: patch: bacula option group, plus a fix in the docs
To: None <tech-pkg@netbsd.org>
From: Geert Hendrickx <ghen@telenet.be>
List: tech-pkg
Date: 10/07/2005 11:19:31
The sysutils/bacula package uses some non-standard method to force the
selection of only one of its options, it should use option groups, I guess.
Here's a patch:
Index: Makefile.options
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/sysutils/bacula/Makefile.options,v
retrieving revision 1.2
diff -u -r1.2 Makefile.options
--- Makefile.options 31 May 2005 10:01:39 -0000 1.2
+++ Makefile.options 7 Oct 2005 09:18:25 -0000
@@ -1,18 +1,12 @@
# $NetBSD: Makefile.options,v 1.2 2005/05/31 10:01:39 dillo 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
Also, this bug in the documentation made it take longer than necessary to
figure out the above. :-)
--- options.html 2005-10-07 11:11:23.000000000 +0200
+++ options.html 005-10-07 11:11:43.000000000 +0200
@@ -125,8 +125,8 @@
<pre class="programlisting">
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= wibble-foo ldap
-PKG_OPTIONAL_GROUPS= database
-PKG_GROUP.database= mysql pgsql
+PKG_OPTIONS_OPTIONAL_GROUPS= database
+PKG_OPTIONS_GROUP.database= mysql pgsql
PKG_SUGGESTED_OPTIONS= wibble-foo
PKG_OPTIONS_LEGACY_VARS+= WIBBLE_USE_OPENLDAP:ldap
PKG_OPTIONS_LEGACY_OPTS+= foo:wibble-foo
Geert