pkgconfig dependency script fixes
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 10 Oct 2007 08:30:37 +0000 (11:30 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 10 Oct 2007 08:30:37 +0000 (11:30 +0300)
- don't make assumptions about package names, requires pkg-config executable
  path instead
- always create pkg-config dependency if *.pc files are included, not just
  in case the *.pc file requires other pkg-config modules

scripts/pkgconfigdeps.sh

index 7a81234..882d195 100755 (executable)
@@ -30,9 +30,9 @@ case $1 in
     while read filename ; do
     case "${filename}" in
     *.pc)
+       i="`expr $i + 1`"
+       [ $i -eq 1 ] && echo "$pkgconfig"
        $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
-           i="`expr $i + 1`"
-           [ $i -eq 1 ] && echo "pkgconfig"
            echo "pkgconfig($n)" "$r" "$v"
        done
     esac