Subject: Re: pkgconfig and buildlink
To: Johnny Lam <>
From: None <>
List: tech-pkg
Date: 03/20/2002 09:14:37
I think this looks good to me.  As far as build vs run dependency, its a
little bit of a mix.  gtk2 will need pkg-config to build because thats how
it will test for and get flags for glib2, atk, and pango.  Packages that
link to gtk2 will probably also need pkg-config as build depends so they
can properly locate and link to gtk2, glib2, atk, and pango.  But after
that pkg-config isn't needed.  To summarize, at least for gtk2, pkg-config
is always a build depends (because of glib2) and also a run depends (for
others linking to it).  Packages which link to gtk2 always need a build
depends, but in most cases (applications, not libs) not a run depends.
So maybe the thing to do is in the pkg-config file, list
pkg-config as a build depends.  Then every package that is configured via
pkg-config pulls in the pkg-config file in its own file.  I think this should properly propagate build depends
everywhere that needs it.  

Do you want to commit the pkg-config file you send or shall
I?  Either way I can install it here and do some testing first.


On Tue, 19 Mar 2002, Johnny Lam wrote:

> On Tue, Mar 19, 2002 at 08:35:57PM -0500, wrote:
> >
> [ buildlink pkg-config implementation removed ]
> > 
> > The idea is just to create a wrapper around pkg-config.  Have to be a bit
> > careful about return values as pkg-config's return value does mean
> > something.
> I'll modify the wrapper generated by _BUILDLINK_CONFIG_WRAPPER_USE to
> respect the return value.  It makes a lot of sense to be more careful
> here, and it would allow just reusing that macro target to generate
> the pkg-config wrapper.
> > Comments?  Maybe I should put this instead in a
> > devel/pkgconfig/ file?  Maybe we need a USE_PKG_CONFIG
> > variable?
> Yes, I think a devel/pkgconfig/ file would be better.  The
> idea is that pkgconfig/ should be included by packages that
> actually use pkg-config, so unless glib2 or gtk2 _use_ pkg-config, then
> their files really don't need to include pkgconfig's.  I
> was thinking something like the attached file (after I make the above
> mentioned change to _BUILDLINK_CONFIG_WRAPPER_USE).  Note that it adds
> a build dependency on pkgconfig and not a regular dependency, as from
> your description, I don't think pkg-config is used at run-time.
> 	Comments?
> 	-- Johnny Lam <>