Subject: Re: options.mk in buildlink files?
To: Christian Hattemer <c.hattemer@arcor.de>
From: Geert Hendrickx <ghen@telenet.be>
List: tech-pkg
Date: 04/20/2006 18:49:47
On Thu, Apr 20, 2006 at 05:23:01PM +0200, Christian Hattemer wrote:
> Hello Geert,
> 
> On 19.04.06, you wrote:
> 
> > I don't like how this is done.  It assumes options are set permanently.
> >  I often set options on the make command-line (e.g. "make
> > PKG_OPTIONS.foo=-bar install") and this would break with such
> > constructs.  
> 
> It does work. With my changes (or respectively in aalib) do:
> % cd /usr/pkgsrc/graphics/cairo
> % make show-options
> Any of the following general options may be selected:
>         glitz    Enable glitz backend.
>  
> These options are enabled by default:
>         glitz
>  
> These options are currently enabled:
>         glitz
> % make PKG_OPTIONS.cairo=-glitz show-options
> Any of the following general options may be selected:
>         glitz    Enable glitz backend.
>  
> These options are enabled by default:
>         glitz
>  
> These options are currently enabled:
> %
> 
> What do you see?

This not what I mean.  I mean that your approach assumes that different
packages use the same options.  

I could build cairo manually, with "PKG_OPTIONS.cairo=-glitz" on the
command line.  When I would build pango at another time (and I forgot that
I set -glitz when I built cairo), glitz will still be pulled in (unneeded,
since, IIUC, none of both packages will be linked against glitz).  

	Geert