Parse private dependencies from pkgconfig files

This commit is contained in:
Mikhail Novosyolov 2019-02-21 20:27:52 +03:00
parent d18cb76b8d
commit e49da0b732
2 changed files with 50 additions and 1 deletions

View file

@ -0,0 +1,48 @@
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

View file

@ -61,7 +61,7 @@ Summary: The RPM package management system
Name: rpm
Epoch: 1
Version: %{libver}.%{minorver}
Release: %{?prereldate:0.%{prereldate}.}84
Release: %{?prereldate:0.%{prereldate}.}85
License: LGPLv2.1+
Group: System/Configuration/Packaging
Url: http://rpm5.org/
@ -532,6 +532,7 @@ Patch519: rpm-5.4.10-debuginfo-too-many-notes.patch
Patch520: rpm-5.4.10-Multithreaded-XZ.patch
Patch521: rpm-5.4.10-Use-multithreaded-XZ-by-default-for-both-binary-and-.patch
Patch522: rpm-5.4.10-multithreaded-xz-memlimit.patch
Patch523: rpm-5.4.10-Parse-private-dependencies-from-pkgconfig-files.patch
BuildRequires: autoconf >= 2.57
BuildRequires: bzip2-devel