rpm/pkgconfig-0.24.diff
Ruediger Oertel d8ecf1d951 Accepting request 45500 from home:vuntz:branches:Base:System
Copy from home:vuntz:branches:Base:System/rpm via accept of submit request 45500 revision 2.
Request was accepted with message:
forward

OBS-URL: https://build.opensuse.org/request/show/45500
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=59
2010-08-20 12:47:14 +00:00

28 lines
897 B
Diff

Index: ./scripts/pkgconfigdeps.sh
===================================================================
--- ./scripts/pkgconfigdeps.sh
+++ ./scripts/pkgconfigdeps.sh
@@ -11,6 +11,13 @@ test -x $pkgconfig || {
exit 0
}
+`$pkgconfig --exists "pkg-config >= 0.24" 2> /dev/null`
+if [ $? -eq 0 ]; then
+ PRINT_REQUIRES="--print-requires --print-requires-private"
+else
+ PRINT_REQUIRES="--print-requires"
+fi
+
case $1 in
-P|--provides)
while read filename ; do
@@ -39,7 +46,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 "$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"