mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 18:33:04 +00:00
48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
From f5192769e9e1fbf0e0e613c69c5158b66a6c4026 Mon Sep 17 00:00:00 2001
|
|
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
|
|
Date: Thu, 21 Feb 2019 20:10:40 +0300
|
|
Subject: [PATCH] Parse private dependencies from pkgconfig files
|
|
|
|
- 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.
|
|
|
|
This is a port of https://github.com/rpm-software-management/rpm/commit/0cc5e818a
|
|
from RPM4 to RPM5.
|
|
---
|
|
scripts/pkgconfigdeps.sh | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/scripts/pkgconfigdeps.sh b/scripts/pkgconfigdeps.sh
|
|
index cd4f452..b00b6c4 100755
|
|
--- a/scripts/pkgconfigdeps.sh
|
|
+++ b/scripts/pkgconfigdeps.sh
|
|
@@ -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
|
|
@@ -44,7 +49,7 @@ case $1 in
|
|
DIR=`dirname ${filename}`
|
|
PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
|
|
export PKG_CONFIG_PATH
|
|
- $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
|
|
if [ -n "$r" ] && [ -n "$v" ]; then
|
|
echo "pkgconfig($n) $r $v"
|
|
--
|
|
2.19.2
|
|
|