Autogenerate python dependency, also capture pc, pyd for dependency generation
This commit is contained in:
parent
0a51e8a6f9
commit
91f2255bd3
@ -6,7 +6,7 @@
|
|||||||
%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: 122
|
Version: 123
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: MinGW cross compiler base filesystem and environment
|
Summary: MinGW cross compiler base filesystem and environment
|
||||||
|
|
||||||
@ -351,6 +351,10 @@ echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/x86_64-w64-mingw32-pkg-c
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 21 2021 Sandro Mani <manisandro@gmail.com> - 123-1
|
||||||
|
- Autogenerate mingw-python3 BR
|
||||||
|
- Fix mingw{32/64}.attr to also capture pyd, pc files
|
||||||
|
|
||||||
* Thu Sep 02 2021 Sandro Mani <manisandro@gmail.com> - 122-1
|
* Thu Sep 02 2021 Sandro Mani <manisandro@gmail.com> - 122-1
|
||||||
- Allow overriding CMake INCLUDE_INSTALL_DIR in MINGWXX_CMAKE_ARGS
|
- Allow overriding CMake INCLUDE_INSTALL_DIR in MINGWXX_CMAKE_ARGS
|
||||||
- Drop evaling $@ in mingw-scripts, ensure mingw macros invoked by mingw-scripts contain $@
|
- Drop evaling $@ in mingw-scripts, ensure mingw macros invoked by mingw-scripts contain $@
|
||||||
|
18
mingw.req
18
mingw.req
@ -15,12 +15,14 @@ fi
|
|||||||
|
|
||||||
filelist=`sed "s/['\"]/\\\&/g"`
|
filelist=`sed "s/['\"]/\\\&/g"`
|
||||||
|
|
||||||
dlls=$(echo $filelist | tr '[:blank:]' '\n' | grep -Ei '\.(dll|exe)$')
|
dlls=$(echo $filelist | tr '[:blank:]' '\n' | grep -Ei '\.(dll|exe|pyd)$')
|
||||||
pkgconfig_files=$(echo $filelist | tr '[:blank:]' '\n' | grep -Ei '\.(pc)$')
|
pkgconfig_files=$(echo $filelist | tr '[:blank:]' '\n' | grep -Ei '\.(pc)$')
|
||||||
|
py3_files=$(echo $filelist | tr '[:blank:]' '\n' | grep -Ei '\.(pyd?)$')
|
||||||
|
|
||||||
for target in $targets; do
|
for target in $targets; do
|
||||||
dll_found=false
|
dll_found=false
|
||||||
host_triplet=`rpm --eval "%{${target}_target}"`
|
host_triplet=`rpm --eval "%{${target}_target}"`
|
||||||
|
libdir=`rpm --eval "%{${target}_libdir}"`
|
||||||
for f in $dlls; do
|
for f in $dlls; do
|
||||||
if [[ $f =~ .*$host_triplet.* ]]; then
|
if [[ $f =~ .*$host_triplet.* ]]; then
|
||||||
$OBJDUMP -p $f | grep 'DLL Name' | grep -Eio '[-._\+[:alnum:]]+\.dll' |
|
$OBJDUMP -p $f | grep 'DLL Name' | grep -Eio '[-._\+[:alnum:]]+\.dll' |
|
||||||
@ -40,6 +42,15 @@ for target in $targets; do
|
|||||||
for f in $pkgconfig_files; do
|
for f in $pkgconfig_files; do
|
||||||
if [[ $f =~ .*$host_triplet.* ]]; then
|
if [[ $f =~ .*$host_triplet.* ]]; then
|
||||||
pkgconfig_files_found=true
|
pkgconfig_files_found=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
py3_files_found=false
|
||||||
|
for f in $py3_files; do
|
||||||
|
if [[ $f =~ .*$host_triplet.*lib/python3.* ]]; then
|
||||||
|
py3_files_found=true
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -47,4 +58,9 @@ for target in $targets; do
|
|||||||
if [ $pkgconfig_files_found = true ]; then
|
if [ $pkgconfig_files_found = true ]; then
|
||||||
echo "${target}-pkg-config"
|
echo "${target}-pkg-config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Add a dependency on python if necessary
|
||||||
|
if [ $py3_files_found = true ]; then
|
||||||
|
echo "${target}-python3";
|
||||||
|
fi
|
||||||
done | sort -u
|
done | sort -u
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
%__mingw32_provides %{_rpmconfigdir}/mingw.prov mingw32
|
%__mingw32_provides %{_rpmconfigdir}/mingw.prov mingw32
|
||||||
%__mingw32_requires %{_rpmconfigdir}/mingw.req mingw32
|
%__mingw32_requires %{_rpmconfigdir}/mingw.req mingw32
|
||||||
%__mingw32_path ^%{mingw32_prefix}/.*\.([Dd][Ll][Ll]|[Ee][Xx][Ee])$
|
%__mingw32_path ^%{mingw32_prefix}/.*\.([Dd][Ll][Ll]|[Ee][Xx][Ee]|[Pp][Yy][Dd]?|[Pp][Cc])$
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
%__mingw64_provides %{_rpmconfigdir}/mingw.prov mingw64
|
%__mingw64_provides %{_rpmconfigdir}/mingw.prov mingw64
|
||||||
%__mingw64_requires %{_rpmconfigdir}/mingw.req mingw64
|
%__mingw64_requires %{_rpmconfigdir}/mingw.req mingw64
|
||||||
%__mingw64_path ^%{mingw64_prefix}/.*\.([Dd][Ll][Ll]|[Ee][Xx][Ee])$
|
%__mingw64_path ^%{mingw64_prefix}/.*\.([Dd][Ll][Ll]|[Ee][Xx][Ee]|[Pp][Yy][Dd]?|[Pp][Cc])$
|
||||||
|
Loading…
Reference in New Issue
Block a user