pkg-config has a de-facto metadata syntax that it's held to for years now. This is well understood by people, but what exactly pkg-config will accept is not well documented. Furthermore, there are ways the metadata could be improved to add functionality, but changing the behavior would be really harmful since older versions wouldn't know how to cope with it. Here's a plan to deal with that: 1. A new optional field is added that declares what version of the pkg-config metadata syntax it uses. In the absence of this field, version 1 is assumed. My suggestion for the name is SpecVersion. 2. The currently accepted metadata is specified as version 1 so that .pc file writers know exactly pkg-config or any other program handling .pc files know what to write. 3. Release pkg-config-1.0 that covers version 1 of the metadata specification. After that, the metadata can be changed by bumping the spec version. .pc file writers can then opt-in to the newer syntax in a controlled way. Michał Górny submitted a spec a while ago on the mailing list. http://lists.freedesktop.org/archives/pkg-config/2012-September/000884.html This document goes far beyond specifying the .pc metadata syntax. In particular, it specs the implementation details of the pkg-config program, which I don't think we want to get into. Still, it provides a solid starting point for a spec.
If I may interject, I believe a better approach would be to add a new virtual package. Then you can do: Requires: pkgconfig-spec > 1 The current freedesktop implementation and pkgconf allow for multiple Requires: fields, so you can even do: Requires: pkgconfig-spec > 1 [...]
In fact, I believe that this is the only possible way to do it, as a conformant implementation at present is required to ignore unsupported fields. So, requiring a specific spec version in the dependency tree will cause the dependency tree to be incomplete, raising an error.
(In reply to comment #1) > If I may interject, I believe a better approach would be to add a new > virtual package. > > Then you can do: > > Requires: pkgconfig-spec > 1 > > The current freedesktop implementation and pkgconf allow for multiple > Requires: fields, so you can even do: > > Requires: pkgconfig-spec > 1 > [...] I like that idea, thanks.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/37.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.