Subject: Re: *_OPTIONS for package options
To: Johnny C. Lam <jlam@NetBSD.org>
From: Juan RP <xtraeme@netbsd.org>
List: tech-pkg
Date: 07/27/2004 02:00:24
--Signature=_Tue__27_Jul_2004_02_00_24_+0200_BIcJgWPFLrUTBPs=
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
On Sat, 24 Jul 2004 09:02:50 +0000
"Johnny C. Lam" <jlam@NetBSD.org> wrote:
> I don't see how we can implement this without touching the package
> Makefile. The package Makefile must contain the logic for actually
> using the selected build options, e.g.
>
> .if !empty(PKG_OPTIONS:MPAM)
> . include "../../security/PAM/buildlink3.mk"
> CONFIGURE_ARGS+= --with-pam
> .endif
>
> So we clearly can't remove those sections of the package Makefiles.
>
> As for the rest, all that a package Makefile really needs to do is
> to put the following two lines somewhere before the option logic:
>
> PKG_SUPPORTED_OPTIONS= foo bar
> .include "../../mk/bsd.options.mk"
>
> The header of the example ("Global and legacy options") shown in
> bsd.options.mk is there solely to provide backwards-compatibility for
> using the old options, until we can deprecate and remove all instances
> of them.
>
> I think this is about as succinct as I can make it for the package
> developer to use.
>
> Or perhaps I'm not understanding the idea you're putting forth. Could
> you explain that to me again, with an example showing how your idea
> would work in practice?
My suggestion was only to add the buildlink files into another file, not into
the package Makefile, but this is wrong, because we'll have to add
CONFIGURE_ARGS to enable the feature, etc.
Just ignore my comments, bsd.options.mk looks really cool.
Cheers.
--Signature=_Tue__27_Jul_2004_02_00_24_+0200_BIcJgWPFLrUTBPs=
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iD8DBQFBBZsYypkLYVDran0RApmKAJ4kVp6nyQpIP8+o5/fOTVHWBwGMaQCggvz1
cazJZ6ISW0wl4YQpc44Tt/I=
=b40X
-----END PGP SIGNATURE-----
--Signature=_Tue__27_Jul_2004_02_00_24_+0200_BIcJgWPFLrUTBPs=--