summaryrefslogtreecommitdiff
path: root/scripts/pkgconfig.prov.sh
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2005-07-13 12:03:04 +0000
committerjbj <devnull@localhost>2005-07-13 12:03:04 +0000
commit54338346440f6b7552e232fa5179eb51b60a851a (patch)
treef511b73d6a99edf3da586786a17381ceafb87763 /scripts/pkgconfig.prov.sh
parent1f35cde9cadf21446f2fd2dc57ce7dbd2e942df1 (diff)
downloadlibrpm-tizen-54338346440f6b7552e232fa5179eb51b60a851a.tar.gz
librpm-tizen-54338346440f6b7552e232fa5179eb51b60a851a.tar.bz2
librpm-tizen-54338346440f6b7552e232fa5179eb51b60a851a.zip
Added from bugzilla #153936.
CVS patchset: 7884 CVS date: 2005/07/13 12:03:04
Diffstat (limited to 'scripts/pkgconfig.prov.sh')
-rw-r--r--scripts/pkgconfig.prov.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/pkgconfig.prov.sh b/scripts/pkgconfig.prov.sh
new file mode 100644
index 000000000..389bef7e1
--- /dev/null
+++ b/scripts/pkgconfig.prov.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+pkgconfig=${1:-/usr/bin/pkg-config}
+test -x $pkgconfig || exit 0
+while read filename ; do
+case "${filename}" in
+*.pc)
+ # Assume that this file doesn't contain useful information.
+ needs_pkgconfig=false
+ # Query the dependencies of the package.
+ $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do
+ # We have a dependency. Make a note that we need the pkgconfig
+ # tool for this package.
+ echo "pkgconfig($n)" "$r" "$v"
+ needs_pkgconfig=true
+ done
+ # The dependency on the pkgconfig package itself.
+ if $needs_pkgconfig ; then
+ echo pkgconfig
+ fi
+ ;;
+esac
+done