GNOME Bugzilla – Bug 680363
gnome-common: gnome-autogen.sh: version_check() fails for pkgconf (alternative pkg-config implementation)
Last modified: 2014-05-02 16:04:40 UTC
`pkg-config --version` is a "wrong way" to check for working pkg-config, there are better ways that don't break the alternative implementations, like `pkg-config --atleast-version 0.14`, `pkg-config --atleast-pkgconfig-version 0.14`, or even `pkg-config --modversion pkg-config` $ pkg-config --version | head -n 1 pkgconf 0.8.1 [pkg-config compatible] pkgconf is an alternative implemntation of the freedesktop.org pkg-config package, here: http://github.com/nenolod/pkgconf there are also others, namely OpenBSD's pkg-config but it will print 0.26 with --version, here: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/pkg-config/ and the ruby version, here: http://github.com/rcairo/pkg-config (no idea what it prints as it's version) and the fork from freedesktop.org's copy, here: http://sourceforge.net/projects/pkgconfiglite/ (this will print same as freedesktop.org's pkg-config)
original bug report (downstream / distribution): http://bugs.gentoo.org/show_bug.cgi?id=427432 with pkgconf upstream commenting there on Comment #1 way to reproduce in Comment #3
Created attachment 219396 [details] [review] autogen-fix.patch Fixes the bug by using --modversion instead of --version.
Review of attachment 219396 [details] [review]: ::: macros2/gnome-autogen.sh @@ +99,3 @@ + # The most reliable way to check pkg-config version is to query the actual virtual + # pkg-config package entry's modversion. This works in all known implementations. + if test "x$vc_option" = "xpkg-config"; then I guess that should read ‘if test "x$vc_checkprog" = "xpkg-config"; then’?
Without any feedback I will not apply the patch, so if someone is interested, please test it, making the required change, and report back if it works.