Subject: Re: Avoiding netpm dependencies
To: Geert Hendrickx <ghen@telenet.be>
From: Johnny Lam <jlam@pkgsrc.org>
List: tech-pkg
Date: 11/08/2005 17:42:30
Geert Hendrickx wrote:
> On Tue, Nov 08, 2005 at 06:39:48PM +0100, Thomas Klausner wrote:
>
>>On Tue, Nov 08, 2005 at 12:10:39PM +0100, Geert Hendrickx wrote:
>>
>>> .if !empty(PKG_OPTIONS:Mtk)
>>>-DEPENDS+= tk>=8.4:../../x11/tk
>>>+. include "../../x11/tk/buildlink3.mk"
>>> PLIST_SUBST+= TK=""
>>
>>Don't change this part -- tk is not used for linking, so a plain DEPENDS
>>is quite sufficient. (The package only needs the wish executable from
>>tk.)
>
>
> Oh, is this a different "kind" of dependency then?
Yes, I believe it is a different kind. It only wants "wish" from at
least a certain version of x11/tk, as opposed to wanting to link against
libtk.so. If a packages wanted to do the latter, then including
tk/buildlink3.mk is appropriate.
I'm debating whether to add "wish" (and similarly for "tclsh") to the
tools framework, so that a package that wanted "wish" at run-time would
set instead:
USE_TOOLS+= wish:run
The tools framework would then take care of providing a common place for
setting the dependency on the tk package, though it may be overridden on
a per-package basis. This matches what I've currently done with "perl",
i.e., packages that want just want the "perl" interpreter at run-time
are setting:
USE_TOOLS+= perl:run
Note that the perl dependency in the tools framework is looser than the
one in perl5/buildlink3.mk because if a package just wants the perl
interpreter, then some older version of perl can still be used.
Cheers,
-- Johnny Lam <jlam@pkgsrc.org>