Subject: Re: A way to get more consistency with *USE_* variables
To: Quentin Garnier <cube@NetBSD.org>
From: Juan RP <juan@xtraeme.unixbsd.org>
List: tech-pkg
Date: 05/02/2004 20:25:25
--Signature=_Sun__2_May_2004_20_25_25_+0200_l+g_XU1G7vMqPau2
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

On Sun, 2 May 2004 01:26:36 +0200
Quentin Garnier <cube@NetBSD.org> wrote:

> Hi,
> 
> I find it rather annoying the way we are unconsistently making
> features optional inside packages.  I already made a change
> recently for the OpenLDAP case, but I'd like to go a step
> further and have a generalized way of handling this.
> 
> The issue with having USE_<FEATURE> gloablly set is that
> sometimes, for a given package, you don't want to enable
> that feature, or you want it only for one package.
> 
> I suggest the following:  having a set of optional features,
> that get actived with USE_<feature>=YES globally, but can
> also be set on a per-package basis, using:
> 
> USE_<feature>.<package>=YES
> 
> I've made a quick patch that does this for OpenLDAP.  It
> defines a variable in bsd.pkg.defaults.mk, GLOBAL_FEATURES
> that defines every USE_* variable that can be defined on a
> per-package basis.  Right now it only contains OPENLDAP.
> 
> The only big change it needs is moving away the defintion of
> PKGNAME and PKGBASE (and associated) into bsd.prefs.mk,
> because we need them way before inclusion of bsd.pkg.mk in the
> packages Makefile.
> 
> The patch also adds a small message about how you got the
> value of the BUILD_DEFS variable and that tells the user she
> can set the specific variable USE_<FEATURE>.<package>.
> 
> It might be implemented in another way, a bit like
> PREFER_PKGSRC/PRFER_NATIVE, where the user would give a list
> of package in USE_<FEATURE> defition, and also we could use
> along an AVOID_<FEATURE> variable.  I prefer the .<package>
> way, even if it means more lines in mk.conf.
> 
> Comments?

This is a great idea/feature to have in pkgsrc.

I prefer .<package> too.

-- 
	Juan RP <juan@xtraeme.unixbsd.org>

--Signature=_Sun__2_May_2004_20_25_25_+0200_l+g_XU1G7vMqPau2
Content-Type: application/pgp-signature

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

iD8DBQFAlT0cypkLYVDran0RAghfAJ4sqC8fBO4LOCShlN73Fose2h92rQCfZQzf
7UolkjPdh3XZ1bB5B2bDxa4=
=EK8k
-----END PGP SIGNATURE-----

--Signature=_Sun__2_May_2004_20_25_25_+0200_l+g_XU1G7vMqPau2--