From df0ee64736a0f86bf80cb78eec020b77f27a68ab Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sep 14 2023 02:00:31 +0000 Subject: Add pkgconfig provides for installed pkgconfig files For example: * Provides: mingw32-pkgconfig(qt5svg) * Provides: mingw64-pkgconfig(qt5svg) --- diff --git a/mingw-filesystem.spec b/mingw-filesystem.spec index 325da3c..cb8a240 100644 --- a/mingw-filesystem.spec +++ b/mingw-filesystem.spec @@ -9,8 +9,8 @@ %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: mingw-filesystem -Version: 147 -Release: 3%{?dist} +Version: 148 +Release: 1%{?dist} Summary: MinGW cross compiler base filesystem and environment License: GPL-2.0-or-later @@ -378,6 +378,9 @@ echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/x86_64-w64-mingw32ucrt-p %dir %{_prefix}/lib/debug/%{_prefix}/x86_64-w64-mingw32ucrt %changelog +* Wed Sep 13 2023 Orion Poplawski - 148-1 +- Add pkgconfig provides + * Mon Sep 11 2023 Neal Gompa - 147-3 - Add dependency on cmake-rpm-macros diff --git a/mingw.prov b/mingw.prov index b877e16..1ce2ace 100755 --- a/mingw.prov +++ b/mingw.prov @@ -21,4 +21,14 @@ for f in $dlls; do done done +pcs=$(echo $filelist | tr '[:blank:]' '\n' | grep '\.pc$') + +for f in $pcs; do + basename=`basename $f .pc | tr '[:upper:]' '[:lower:]'` + for target in $targets; do + host_triplet=`rpm --eval "%{${target}_target}"` + [[ $f =~ .*$host_triplet.* ]] && echo "${target}-pkgconfig($basename)" + done +done + exit 0