.pc files should have a "pkgconfig-min-version" field (the name needs a bit of work). For example, .pc files with .private fields need pkg-config with a minimum version of 0.18, and having a check in individual .pc files as opposed to making maintainers of programs guess what the minimum version required by every single one of their dependancies (and their dependancies, and so on) sounds like a much better idea to me. Attempting to get flags from files with pkgconfig-min-version fields should cause pkg-config to break similarly to lack of a dependancy (although with a bit more information). For backwards compatability, .pc files should not have to have this field, but its use should be encouraged for programs using newer features of pkg-config.
Created attachment 7601 [details] [review] Patch to implement this feature pkgconfig-min-version became pkgconfig_min_version to avoid additional changes to the parser, but the feature is otherwise implemented. Uses the existing version comparator.
You mean similar to: : tfheen@xoog /usr/lib/pkgconfig > pkg-config --libs blah Package 'test thingabob' requires 'pkg-config >= 2.0' but version of pkg-config is 0.20 You may find new versions of pkg-config at http://www.freedesktop.org/software/pkgconfig/ : tfheen@xoog /usr/lib/pkgconfig > cat blah.pc prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: test thingabob Description: test Version: 2.1.10 Requires: pkg-config >= 2.0 Cflags: -I${includedir} Libs: -L${libdir} -lXft Libs.private: -lX11 : tfheen@xoog /usr/lib/pkgconfig >
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.