Add pkgconfig provides for installed pkgconfig files

For example:
  * Provides: mingw32-pkgconfig(qt5svg)
  * Provides: mingw64-pkgconfig(qt5svg)
This commit is contained in:
Orion Poplawski 2023-05-06 09:12:38 -06:00
parent 88d6e607ff
commit df0ee64736
2 changed files with 15 additions and 2 deletions

View File

@ -9,8 +9,8 @@
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: mingw-filesystem Name: mingw-filesystem
Version: 147 Version: 148
Release: 3%{?dist} Release: 1%{?dist}
Summary: MinGW cross compiler base filesystem and environment Summary: MinGW cross compiler base filesystem and environment
License: GPL-2.0-or-later 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 %dir %{_prefix}/lib/debug/%{_prefix}/x86_64-w64-mingw32ucrt
%changelog %changelog
* Wed Sep 13 2023 Orion Poplawski <orion@nwra.com> - 148-1
- Add pkgconfig provides
* Mon Sep 11 2023 Neal Gompa <ngompa@fedoraproject.org> - 147-3 * Mon Sep 11 2023 Neal Gompa <ngompa@fedoraproject.org> - 147-3
- Add dependency on cmake-rpm-macros - Add dependency on cmake-rpm-macros

View File

@ -21,4 +21,14 @@ for f in $dlls; do
done done
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 exit 0