From 0cc5e818a9305e7443dd46252b9d4af6833b733e Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 3 Dec 2010 12:44:49 +0200 Subject: Require pkg-config 0.24 for creating pkgconfig() dependencies - The support for --print-requires|provides was only upstreamed in pkg-config 0.24, prior to that it relied on distros patching their pkg-config. Rpm relying on non-upstream stuff is not good... Now that it's upstream we can make a clean break and simply not even try to generate the dependencies with anything older. - The upstreamed version behaves slightly differently from what distros were patching with, for rpm's purposes we also want --print-requires-private now. --- scripts/pkgconfigdeps.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/pkgconfigdeps.sh b/scripts/pkgconfigdeps.sh index 00cba0061..270dd745b 100755 --- a/scripts/pkgconfigdeps.sh +++ b/scripts/pkgconfigdeps.sh @@ -11,6 +11,11 @@ test -x $pkgconfig || { exit 0 } +$pkgconfig --atleast-pkgconfig-version="0.24" || { + cat > /dev/null + exit 0 +} + case $1 in -P|--provides) while read filename ; do @@ -39,7 +44,7 @@ case $1 in [ $i -eq 1 ] && echo "$pkgconfig" DIR="`dirname ${filename}`" export PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig" - $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do + $pkgconfig --print-requires --print-requires-private "$filename" 2> /dev/null | while read n r v ; do [ -n "$n" ] || continue echo -n "pkgconfig($n) " [ -n "$r" ] && [ -n "$v" ] && echo -n "$r" "$v" -- cgit v1.2.3