Subject: Re: *_OPTIONS for package options
To: Johnny C. Lam <jlam@NetBSD.org>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 07/24/2004 15:22:25
--31zvzas5NXT9fief
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jul 24, 2004 at 05:08:16AM +0000, Johnny C. Lam wrote:

> 	# These stay untouched as they're used by other packages, e.g.
> 	# net/samba, databases/openldap, etc.
> 	#
> 	USE_SASL2=3D	YES
> 	USE_OPENLDAP=3D	YES
>=20
> 	# Explicitly list options for Postfix because we don't want all
> 	# of the global settings to apply.
> 	#
> 	POSTFIX_OPTIONS=3D	sasl
>=20
> The benefit here is that you can still have global switches that apply
> to all packages, e.g. USE_SASL2, USE_CUPS, etc., but on a per-package
> basis, you can override them by setting a single variable.
>=20
> Clearly, in the above example, you can do the same thing with package
> variables like POSTFIX_USE_LDAP, POSTFIX_USE_SASL, etc., but I prefer
> the single variable POSTFIX_OPTIONS because it makes for less clutter
> in my /etc/mk.conf.  This is, of course, entirely subjective.

I really like this concept. I've often wanted to be able to do just
this :)

using PKG_OPTIONS=3D+ sasl etc.. throughout bsd.pkg.defaults.mk would make
this more self-consistent and simpler to understand, I think, eg:

	# include SASL2 support in packages that support it
	PKG_OPTIONS+=3D	sasl

	# include openldap support in packages ...
	PKG_OPTIONS+=3D	openldap

or something similar. what do you think?

grant.


--31zvzas5NXT9fief
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD4DBQFBAfIRluYOb9yiFXoRAhc7AKCNz8InCdm4wJxm5UoqAye8a3g5pwCXY7Wt
m6nuTgdRbws2uXUvSTKxnw==
=Q7sp
-----END PGP SIGNATURE-----

--31zvzas5NXT9fief--