Subject: Re: options.mk in buildlink files?
To: Todd Vierling <tv@duh.org>
From: Johnny Lam <jlam@pkgsrc.org>
List: tech-pkg
Date: 04/20/2006 14:42:56
Todd Vierling wrote:
> On Thu, 20 Apr 2006, Geert Hendrickx wrote:
> 
>> 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).
> 
> The PKG_BUILD_OPTIONS method -- which, mind you, I don't like either -- is
> the established way to do it today.  Changing that method should be a
> different task; what's at point here is specifically cairo vs. glitz.  :)

Okay, just to chime in here... the PKG_BUILD_OPTIONS method was always 
meant to be modified to first try to lookup the PKG_OPTIONS from the 
installed package first.  It's just at the time I put the original 
PKG_BUILD_OPTIONS.* stuff in, the pkg_info on most folks' installations 
didn't support the -Q option.  I had always meant to go back and fix 
this now that pkg_info has been forced to be sufficiently new to have 
the -Q option.

So, to recap, PKG_BUILD_OPTIONS should be set by first checking for the 
existence of the package, and if it does exist, then using the result of 
"pkg_info -Q PKG_OPTIONS <pkg>", otherwise do the same dance we do now.

	Cheers,

	-- Johnny Lam <jlam@pkgsrc.org>