Subject: Re: pkgconfig and buildlink
To: None <tech-pkg@netbsd.org>
From: Amitai Schlair <schmonz@schmonz.com>
List: tech-pkg
Date: 03/17/2002 11:51:00
"Masao Uebayashi" <uebayasi@soum.co.jp> wrote:

>> are there any examples of how to create buildlink.mk files for packages
>> which use devel/pkgconfig (sort of a universal gtk-config type program).
> 
> As far as I read the manual, pkgconfig creates a foo-config for a
> package Foo, and the foo-config will be installed as a part of Foo.
> So what's needed is to write `config wrapper' as usual?

A simple example of a package that can be used with pkgconfig is
graphics/libexif. Like all packages designed for use with pkgconfig, it
installs a small text file into ${PREFIX}/lib/pkgconfig. Then, when a
package that uses libexif wants to get the right flags, it calls "pkg-config
-libs libexif", etc.

The problem, of course, is that pkgconfig doesn't know about buildlink, and
emits paths in LOCALBASE.

For graphics/gphoto2, I haggled with the authors for a "--without-pkgconfig"
configure option. This is obviously not a general solution. :-)  I think the
right thing is a buildlink-wrapper-like script for "pkg-config" itself, that
gets copied into ${BUILDLINK_DIR}/bin for packages that BUILD_DEPENDS on
devel/pkgconfig.

- Amitai