Bug 8836 - Add minimum pkg-config version field to .pc files
Summary: Add minimum pkg-config version field to .pc files
Status: RESOLVED INVALID
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-30 12:12 UTC by Tom Parker
Modified: 2007-01-23 17:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to implement this feature (3.23 KB, patch)
2006-10-30 14:51 UTC, Tom Parker
Details | Splinter Review

Description Tom Parker 2006-10-30 12:12:22 UTC
.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.
Comment 1 Tom Parker 2006-10-30 14:51:11 UTC
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.
Comment 2 Tollef Fog Heen 2006-10-31 08:24:13 UTC
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.