On 2016-08-26 18:30, Colin Close wrote:
Hi
Recently I came across an issue with pkgconfig file naming and I would
appreciate some advice.
I recently added a BuildRequires pkgconfig(librsvg) line to a spec
file I am working on. When I ran the build the librsvg package was not
found.
Further investigation showed that the package config file was named
librsvg-2.0.pc note the appended version number. Is this correct?

Yes.

The the major versions is contained within the *.pc file so it would
seem that adding the major version to the name of the pc seems like
overkill.
Is there a convention for naming this type of file?

There's multiple convention and every library follows a different one - that's why there's not that much consistency.

Some people think that as soon as a new version is out, the old version should be deprecated anyway, so there's no point in having development files for 2 different versions floating around on the same system. That's why e.g. pkgconfig(libdrm) will always give you the latest and greatest version of libdrm.

Others think that something that has been released think it should be supported forever and then some - so when librsvg 2.0 was released a decade or so ago, it became pkgconfig(librsvg-2.0) while pkgconfig(librsvg) would still give you librsvg 1.x if that was installed/available.

There's also inconsistencies about whether or not there's a "lib" prefix (e.g. it's "libdrm" but "xcb" (not libxcb)).

It's a mess, but we can't fix it on our side because everyone's build scripts, Makefiles etc. are written to match the behavior of the libraries they're looking for -- if we made them all follow the same conventions, build scripts etc. written on another distribution or OS simply wouldn't work anymore.

pkgconfig is a mess in more ways than just this - but we don't get to fix it unless we also rewrite everyone's build system. Fortunately at least the KDE side of the world is moving more and more towards cmake (but then again, even some cmake modules to check for stuff use pkgconfig internally).

ttyl
bero

_______________________________________________
OM-Cooker mailing list
[email protected]
http://ml.openmandriva.org/mailman/listinfo/om-cooker_ml.openmandriva.org

Reply via email to