On Tue, Jun 29, 2010 at 12:36:20AM +0200, Jiri B. wrote:
> Hello,
> 
> just simple questions from a porting beginner:
> 
> WANTLIB should contains only libs not comming from ports tree? Do I
> understand correctly that LIB_DEPENDS is for ports tree libs?

Nope.

WANTLIB should contain libraries from source, and libs reachable through
dependencies of dependencies as well.

For instance, take kde3.

If I have a port that depends on kdelibs, it will usually say:
LIB_DEPENDS = kdecore::x11/kde/libs3

this is enough to pull qt3, jpeg, png... and various other things as 
dependencies of kdelibs.

So they can be listed in
WANTLIB=

Actually, what's important is how those are registered in packages (see
pkg_create(1) ), which separates @wantlib from @depend almost entirely:
a @wantlib needs only be "reachable" by computing the closure of @depend
(that, and base system libs, of course).


The main difference between LIB_DEPENDS and RUN_DEPENDS is that LIB_DEPENDS
will only be BUILD_DEPENDS on an arch with static lib, and the libspec is
used to know whether there's a shared lib that actually wants the LIB_DEPENDS
as RUN_DEPENDS.

I'm actually thinking of further decoupling WANTLIB.
Namely, every lib would be marked in WANTLIB.
And LIB_DEPENDS would become RUN_DEPENDS as soon as one of the WANTLIB requires
the package as @depend to reach that lib as a shared library...

Reply via email to