Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/sip.git#4735f6efad39d8939dadc44a0523061a36537460
This commit is contained in:
DistroBaker 2021-01-18 15:39:02 +00:00
parent 58fddba910
commit 91275433f1
1 changed files with 26 additions and 1 deletions

View File

@ -30,10 +30,17 @@
%global no_namespace 1
%endif
# Stop building siplib for wx on F34+
%if 0%{?fedora} && 0%{?fedora} >= 34
%global wx_siplib 0
%else
%global wx_siplib 1
%endif
Summary: SIP - Python/C++ Bindings Generator
Name: sip
Version: 4.19.24
Release: 1%{?dist}
Release: 2%{?dist}
# sipgen/parser.{c.h} is GPLv3+ with exceptions (bison)
License: GPLv2 or GPLv3 and (GPLv3+ with exceptions)
@ -61,6 +68,7 @@ Source1: macros.sip
%global _sip_api_minor 7
%global _sip_api %{_sip_api_major}.%{_sip_api_minor}
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: sed
@ -177,6 +185,7 @@ Provides: python%{python3_pkgversion}-pyqt5-sip-api(%{_sip_api_major})%{?_isa} =
%description -n python%{python3_pkgversion}-pyqt5-sip
This is the Python 3 build of pyqt5-SIP.
%if %{?wx_siplib}
%package -n python%{python3_pkgversion}-wx-siplib
Summary: SIP - Python 3/C++ Bindings Generator for wx
BuildRequires: python%{python3_pkgversion}-devel
@ -184,6 +193,7 @@ Provides: python%{python3_pkgversion}-wx-siplib-api(%{_sip_api_major}) = %{_sip_
Provides: python%{python3_pkgversion}-wx-siplib-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
%description -n python%{python3_pkgversion}-wx-siplib
This is the Python 3 build of wx-siplib.
%endif
%_description
@ -277,6 +287,7 @@ pushd %{_target_platform}-python3-pyqt5
%make_build
popd
%if %{?wx_siplib}
sed -i -e 's|target = sip|target = siplib|g' siplib/siplib.sbf
mkdir %{_target_platform}-python3-wx
pushd %{_target_platform}-python3-wx
@ -288,6 +299,7 @@ pushd %{_target_platform}-python3-wx
%make_build
popd
sed -i -e 's|target = siplib|target = sip|g' siplib/siplib.sbf
%endif
%endif
@ -301,8 +313,10 @@ sed -i -e 's|target = siplib|target = sip|g' siplib/siplib.sbf
%endif
%make_install -C %{_target_platform}-python3-pyqt4
%make_install -C %{_target_platform}-python3-pyqt5
%if %{?wx_siplib}
%make_install -C %{_target_platform}-python3-wx
mv %{buildroot}%{python3_sitearch}/wx/sip.pyi %{buildroot}%{python3_sitearch}/wx/siplib.pyi
%endif
ln -s sip %{buildroot}%{_bindir}/python3-sip
## toplevel __pycache__ creation is ... inconsistent
@ -324,10 +338,14 @@ mv %{buildroot}%{python2_sitearch}/wx/sip.pyi %{buildroot}%{python2_sitearch}/wx
# sip-wrapper
install %{SOURCE10} %{buildroot}%{_bindir}/sip-pyqt4
install %{SOURCE10} %{buildroot}%{_bindir}/sip-pyqt5
%if %{?wx_siplib}
install %{SOURCE10} %{buildroot}%{_bindir}/sip-wx
%endif
sed -i -e 's|@SIP_MODULE@|PyQt4.sip|g' %{buildroot}%{_bindir}/sip-pyqt4
sed -i -e 's|@SIP_MODULE@|PyQt5.sip|g' %{buildroot}%{_bindir}/sip-pyqt5
%if %{?wx_siplib}
sed -i -e 's|@SIP_MODULE@|wx.siplib|g' %{buildroot}%{_bindir}/sip-wx
%endif
mkdir -p %{buildroot}%{_datadir}/sip
@ -347,7 +365,9 @@ popd
# sip-wrappers
%{_bindir}/sip-pyqt4
%{_bindir}/sip-pyqt5
%if %{?wx_siplib}
%{_bindir}/sip-wx
%endif
# compat symlink
%{_bindir}/python3-sip
%dir %{_datadir}/sip/
@ -421,6 +441,7 @@ popd
%{python3_sitearch}/PyQt5/sip.*
%{python3_sitearch}/PyQt5_sip-%{version}.dist-info/
%if %{?wx_siplib}
%files -n python%{python3_pkgversion}-wx-siplib
%doc NEWS README
%license LICENSE LICENSE-GPL2 LICENSE-GPL3
@ -428,9 +449,13 @@ popd
%{python3_sitearch}/wx/siplib.*
%{python3_sitearch}/wx_siplib-%{version}.dist-info/
%endif
%endif
%changelog
* Sun Jan 17 2021 Scott Talbert <swt@techie.net> - 4.19.24-2
- Stop building wx.siplib on F34+ as wx has switched to sip 5
* Mon Aug 17 2020 Rex Dieter <rdieter@fedoraproject.org> - 4.19.24-1
- 4.19.24