Skip to content

Commit

Permalink
Require pkg-config 0.24 for creating pkgconfig() dependencies
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
pmatilai committed Dec 3, 2010
1 parent ccab611 commit 0cc5e81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/pkgconfigdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 0cc5e81

Please sign in to comment.