]>
Commit | Line | Data |
---|---|---|
8852b4d8 MT |
1 | #!/bin/bash |
2 | pkgconfig=${1:-/usr/bin/pkg-config} | |
3 | test -x $pkgconfig || exit 0 | |
4 | while read filename ; do | |
5 | case "${filename}" in | |
6 | *.pc) | |
7 | # Assume that this file doesn't contain useful information. | |
8 | needs_pkgconfig=false | |
9 | # Query the dependencies of the package. | |
10 | $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do | |
11 | # We have a dependency. Make a note that we need the pkgconfig | |
12 | # tool for this package. | |
13 | echo "pkgconfig($n)$r$v" | |
14 | needs_pkgconfig=true | |
15 | done | |
16 | # The dependency on the pkgconfig package itself. | |
17 | if $needs_pkgconfig ; then | |
18 | echo pkgconfig | |
19 | fi | |
20 | ;; | |
21 | esac | |
22 | done |