Use of pkg-config

Richard Purdie richard.purdie at linuxfoundation.org
Tue May 13 14:55:29 CEST 2014


I notice this has been mentioned back in 2012 but I'd like to ask again
whether it would be possible to consider adding pkgconfig support to
libgpg-error and friends?

Why? pkgconfig is the more friendly way to cross compile things these
days. It does the same thing as the -config scripts but does so in a
standardised file format with standardised tooling to access them and
standardised macros. Many projects have now switched over.

One comment in the previous discussion was "Package using pkgconfig
require a wrapper to fix the paths.  Checkout the Gpg4win meta installer
for details.". 

Whilst there were times in the past when you did need to fix some paths
with pkgconfig, sysroot support was added to pkgconfig upstream some
time ago and certainly the OpenEmbedded+Yocto projects have been using
it for a long time without issue, certainly no need to fix paths.

I would add that we do need to fix paths with the current raft of
-config scripts out there however as these do not have the notion of a
sysroot. Compare and contrast our config handler:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/classes/binconfig.bbclass

with the effectively empty file of pkgconfig:

http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/classes/pkgconfig.bbclass

(git history will show this was not always the case but it is now).

The big win is that you can configure a target system layout, yet still
use the same files from "make install" on a build system as long as
specify that the directory containing the target files is a sysroot.
This is the same mechanism supported by all the major tooling including
the toolchain.

So if I were to propose some pkg-config patches, would there be any
interest in them?

Cheers,

Richard





More information about the Gnupg-devel mailing list