import sip-4.19.19-1.el8

This commit is contained in:
CentOS Sources 2020-04-28 04:56:42 -04:00 committed by Andrew Lukoshko
parent ad67b064dd
commit 64ec34aab1
7 changed files with 127 additions and 135 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/sip-4.19.12.tar.gz
SOURCES/sip-4.19.19.tar.gz

View File

@ -1 +1 @@
9f4d0f05ab814ddcde767669cfb6bc184bba931d SOURCES/sip-4.19.12.tar.gz
bfe8a39bf1d399d5f3580db25befed2e78b4ebb9 SOURCES/sip-4.19.19.tar.gz

View File

@ -1,3 +1,3 @@
%_sip_api_major 12
%_sip_api_minor 5
%_sip_api_minor 7
%_sip_api %{_sip_api_major}.%{_sip_api_minor}

View File

@ -0,0 +1,12 @@
diff -up sip-4.19.18/configure.py.orig sip-4.19.18/configure.py
--- sip-4.19.18/configure.py.orig 2019-07-04 12:28:08.000000000 -0400
+++ sip-4.19.18/configure.py 2019-08-27 21:56:33.871428348 -0400
@@ -447,7 +447,7 @@ def create_makefiles(macros):
if sys.platform == 'win32':
mod = 'sip.lib' if opts.static else 'sip.pyd'
else:
- mod = 'libsip.a' if opts.static else 'sip.so'
+ mod = 'libsip.a' if opts.static else sip_module_name.split('.')[-1] + '.so'
all_installs.append((mod, sip_module_dest_dir))

View File

@ -1,12 +0,0 @@
diff -up sip-4.19.3/configure.py.sip_bin sip-4.19.3/configure.py
--- sip-4.19.3/configure.py.sip_bin 2017-07-03 12:24:27.000000000 -0500
+++ sip-4.19.3/configure.py 2017-07-05 20:21:24.376350683 -0500
@@ -281,7 +281,7 @@ def create_config(module, template, macr
"sip_version": sip_version,
"sip_version_str": sip_version_str,
"platform": build_platform,
- "sip_bin": os.path.join(sip_bin_dir, "sip"),
+ "sip_bin": os.path.join(sip_bin_dir, "python3-sip"),
"sip_inc_dir": sip_inc_dir,
"sip_mod_dir": sip_module_dir,
"default_bin_dir": plat_bin_dir,

3
SOURCES/sip-wrapper.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec sip -n @SIP_MODULE@ $@

View File

@ -1,22 +1,13 @@
%if 0%{?fedora} > 12 || 0%{?rhel} > 7
%bcond_without python3
%else
%bcond_with python3
%endif
%if 0%{?rhel} > 7
%global with_python2 0
%endif
%if %{with python3}
%{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
%endif
%if 0%{?with_python2}
%{!?__python2:%global __python2 /usr/bin/python2}
%{!?python2_sitearch:%global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?python2_inc:%global python2_inc %(%{__python2} -c "from distutils.sysconfig import get_python_inc; print get_python_inc(1)")}
%endif
%global PYINCLUDE %{_includedir}/python%{python3_version}m
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
# trim changelog included in binary rpms
@ -25,20 +16,23 @@
# see also https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/JQQ66XJSIT2FGTK2YQY7AXMEH5IXMPUX/
%undefine _strict_symbol_defs_build
# provide non-namespace python modules
# needed by at least some legacy/non-qt consumers, e.g. pykde4
%if 0%{?rhel} < 8
%global no_namespace 1
%endif
Summary: SIP - Python/C++ Bindings Generator
Name: sip
Version: 4.19.12
Release: 3%{?dist}
Version: 4.19.19
Release: 1%{?dist}
# sipgen/parser.{c.h} is GPLv3+ with exceptions (bison)
License: GPLv2 or GPLv3 and (GPLv3+ with exceptions)
Url: http://www.riverbankcomputing.com/software/sip/intro
#URL: http://sourceforge.net/projects/pyqt/
%if 0%{?snap:1}
Source0: https://www.riverbankcomputing.com/static/Downloads/sip/sip-%{version}%{?snap:.%{snap}}.tar.gz
%else
Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz
%endif
Source0: https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/sip-%{version}%{?snap:.%{snap}}.tar.gz
Source10: sip-wrapper.sh
## upstream patches
@ -48,23 +42,31 @@ Patch50: sip-4.18-no_strip.patch
# try not to rpath the world (I *think* this may not be required anymore, since sip-4.19 -- rex)
Patch51: sip-4.18-no_rpath.patch
# set sip_bin properly for python3 build (needswork to be upstreamable)
Patch52: sip-4.19.3-python3_sip_bin.patch
# no longer needed? keep for a little while before dropping completely -- rex
#Patch52: sip-4.19.3-python3_sip_bin.patch
# Avoid hardcoding sip.so (needed for wxpython's siplib.so)
Patch53: sip-4.19.18-no_hardcode_sip_so.patch
# extracted from sip.h, SIP_API_MAJOR_NR SIP_API_MINOR_NR defines
Source1: macros.sip
%global _sip_api_major 12
%global _sip_api_minor 5
%global _sip_api_minor 7
%global _sip_api %{_sip_api_major}.%{_sip_api_minor}
BuildRequires: gcc-c++
%if 0%{?with_python2}
BuildRequires: python2-devel
%endif
BuildRequires: sed
Obsoletes: sip-macros < %{version}-%{release}
Provides: sip-macros = %{version}-%{release}
# upgrade path when no_namespace variants are dropped
%if ! 0%{?no_namespace}
Obsoletes: python2-sip < %{version}-%{release}
Provides: python2-sip = %{version}-%{release}
Obsoletes: python3-sip < %{version}-%{release}
Provides: python3-sip = %{version}-%{release}
%endif
%global _description\
SIP is a tool for generating bindings for C++ classes so that they can be\
accessed as normal Python classes. SIP takes many of its ideas from SWIG but,\
@ -78,48 +80,26 @@ class library.
%description %_description
%if 0%{?with_python2}
%package -n python2-sip
Summary: %summary
Provides: sip-api(%{_sip_api_major}) = %{_sip_api}
Provides: sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
Provides: python2-sip-api(%{_sip_api_major}) = %{_sip_api}
Provides: python2-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
%{?python_provide:%python_provide python2-sip}
%description -n python2-sip %_description
%package -n python2-pyqt5-sip
Summary: %summary
Provides: python2-pyqt5-sip-api(%{_sip_api_major}) = %{_sip_api}
Provides: python2-pyqt5-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
%{?python_provide:%python_provide python2-pyqt5-sip}
%description -n python2-pyqt5-sip %_description
%package -n python2-sip-devel
Summary: Files needed to generate Python bindings for any C++ class library
Requires: sip = %{version}-%{release}
Requires: python2-sip%{?_isa} = %{version}-%{release}
Requires: python2-devel
# Remove before F30
Provides: sip-devel = %{version}-%{release}
Provides: sip-devel%{?_isa} = %{version}-%{release}
Obsoletes: sip-devel < %{version}-%{release}
%description -n python2-sip-devel
%{summary}.
%endif
%if %{with python3}
%if 0%{with python3}
%if 0%{?no_namespace}
%package -n python%{python3_pkgversion}-sip
Summary: SIP - Python 3/C++ Bindings Generator
BuildRequires: python%{python3_pkgversion}-devel
Provides: python%{python3_pkgversion}-sip-api(%{_sip_api_major}) = %{_sip_api}
Provides: python%{python3_pkgversion}-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
%description -n python%{python3_pkgversion}-sip
This is the Python 3 build of SIP.
%_description
%endif
%package -n python%{python3_pkgversion}-sip-devel
Summary: Files needed to generate Python bindings for any C++ class library
Requires: sip = %{version}-%{release}
#Requires: python3-sip%{?_isa} = %{version}-%{release}
BuildRequires: python%{python3_pkgversion}-devel
Requires: python%{python3_pkgversion}-devel
%description -n python%{python3_pkgversion}-sip-devel
%{summary}.
%package -n python%{python3_pkgversion}-pyqt5-sip
Summary: SIP - Python 3/C++ Bindings Generator for pyqt5
@ -129,15 +109,16 @@ 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.
%package -n python%{python3_pkgversion}-wx-siplib
Summary: SIP - Python 3/C++ Bindings Generator for wx
BuildRequires: python%{python3_pkgversion}-devel
Provides: python%{python3_pkgversion}-wx-siplib-api(%{_sip_api_major}) = %{_sip_api}
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.
%_description
%package -n python3-sip-devel
Summary: Files needed to generate Python bindings for any C++ class library
Requires: sip = %{version}-%{release}
Requires: python3-sip%{?_isa} = %{version}-%{release}
Requires: python3-devel
%description -n python3-sip-devel
%{summary}.
%endif
@ -146,36 +127,28 @@ Requires: python3-devel
%patch50 -p1 -b .no_strip
%patch51 -p1 -b .no_rpath
%patch53 -p1 -b .no_sip_so
%build
%if 0%{?with_python2}
mkdir %{_target_platform}-python2
pushd %{_target_platform}-python2
%{__python2} ../configure.py \
--no-dist-info \
CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
sed -i -e 's|target = siplib|target = sip|g' siplib/siplib.sbf
%make_build
popd
mkdir %{_target_platform}-python2-pyqt5
pushd %{_target_platform}-python2-pyqt5
%{__python2} ../configure.py \
--no-dist-info \
--sip-module=PyQt5.sip \
CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%if %{with python3}
%if 0%{?no_namespace}
mkdir %{_target_platform}-python3
pushd %{_target_platform}-python3
%{__python3} ../configure.py \
-b %{_bindir} -d %{python3_sitearch} -e %{PYINCLUDE} \
CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build
popd
%endif
%if %{with python3}
patch -p1 < %{PATCH52}
mkdir %{_target_platform}-python3
pushd %{_target_platform}-python3
mkdir %{_target_platform}-python3-pyqt4
pushd %{_target_platform}-python3-pyqt4
%{__python3} ../configure.py \
--no-dist-info \
-d %{python3_sitearch} \
--sip-module=PyQt4.sip \
-b %{_bindir} -d %{python3_sitearch} -e %{PYINCLUDE} \
CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build
@ -184,22 +157,37 @@ popd
mkdir %{_target_platform}-python3-pyqt5
pushd %{_target_platform}-python3-pyqt5
%{__python3} ../configure.py \
--no-dist-info \
--sip-module=PyQt5.sip \
-b %{_bindir} -d %{python3_sitearch} -e %{PYINCLUDE} \
CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build
popd
%endif
sed -i -e 's|target = sip|target = siplib|g' siplib/siplib.sbf
mkdir %{_target_platform}-python3-wx
pushd %{_target_platform}-python3-wx
%{__python3} ../configure.py \
--sip-module=wx.siplib \
-b %{_bindir} -d %{python3_sitearch} -e %{PYINCLUDE} \
CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
%make_build
popd
sed -i -e 's|target = siplib|target = sip|g' siplib/siplib.sbf
%endif
%install
# Perform the Python 3 installation first, to avoid stomping over the Python 2
# /usr/bin/sip:
%if %{with python3}
%if 0%{?no_namespace}
%make_install -C %{_target_platform}-python3
%endif
%make_install -C %{_target_platform}-python3-pyqt5
%make_install -C %{_target_platform}-python3-wx
mv %{buildroot}%{python3_sitearch}/wx/sip.pyi %{buildroot}%{python3_sitearch}/wx/siplib.pyi
ln -s sip %{buildroot}%{_bindir}/python3-sip
## toplevel __pycache__ creation is ... inconsistent
@ -207,13 +195,13 @@ ln -s sip %{buildroot}%{_bindir}/python3-sip
mkdir -p %{buildroot}%{python3_sitearch}/__pycache__/exclude_rpm_hack
%endif
# Python 2 installation:
%if 0%{?with_python2}
%make_install -C %{_target_platform}-python2
%make_install -C %{_target_platform}-python2-pyqt5
# sip-wrapper
install %{SOURCE10} %{buildroot}%{_bindir}/sip-pyqt5
install %{SOURCE10} %{buildroot}%{_bindir}/sip-wx
sed -i -e 's|@SIP_MODULE@|PyQt5.sip|g' %{buildroot}%{_bindir}/sip-pyqt5
sed -i -e 's|@SIP_MODULE@|wx.siplib|g' %{buildroot}%{_bindir}/sip-wx
mkdir -p %{buildroot}%{_datadir}/sip
%endif
# Macros used by -devel subpackages:
install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip
@ -223,50 +211,51 @@ install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip
%doc README
%license LICENSE LICENSE-GPL2 LICENSE-GPL3
%{_bindir}/sip
# sip-wrappers
%{_bindir}/sip-pyqt5
%{_bindir}/sip-wx
# compat symlink
%{_bindir}/python3-sip
%dir %{_datadir}/sip/
%{rpm_macros_dir}/macros.sip
%if 0%{?with_python2}
%files -n python2-sip
%doc NEWS README
%license LICENSE LICENSE-GPL2 LICENSE-GPL3
%{python2_sitearch}/sip.so
%{python2_sitearch}/sip*.py*
%files -n python2-sip-devel
%{_bindir}/sip
%dir %{_datadir}/sip/
%{python2_inc}/sip.h
%files -n python2-pyqt5-sip
%doc NEWS README
%license LICENSE LICENSE-GPL2 LICENSE-GPL3
%{python2_sitearch}/PyQt5/
%endif
%if %{with python3}
%files -n python%{python3_pkgversion}-sip
%doc NEWS README
%license LICENSE LICENSE-GPL2 LICENSE-GPL3
%{python3_sitearch}/sip.so
%{python3_sitearch}/sip*.py*
%files -n python%{python3_pkgversion}-sip-devel
%{PYINCLUDE}/sip.h
%{python3_sitearch}/sipconfig.py*
%{python3_sitearch}/sipdistutils.py*
%{python3_sitearch}/__pycache__/*
%exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack
%files -n python%{python3_pkgversion}-sip-devel
%{python3_inc}/sip.h
%if 0%{?no_namespace}
%files -n python%{python3_pkgversion}-sip
%doc NEWS README
%license LICENSE LICENSE-GPL2 LICENSE-GPL3
%{python3_sitearch}/sip.*
%{python3_sitearch}/sip-%{version}.dist-info/
%endif
%files -n python%{python3_pkgversion}-pyqt5-sip
%doc NEWS README
%license LICENSE LICENSE-GPL2 LICENSE-GPL3
%{python3_sitearch}/PyQt5/
%{python3_sitearch}/__pycache__/*
%exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack
%dir %{python3_sitearch}/PyQt5/
%{python3_sitearch}/PyQt5/sip.*
%{python3_sitearch}/PyQt5_sip-%{version}.dist-info/
%files -n python%{python3_pkgversion}-wx-siplib
%doc NEWS README
%license LICENSE LICENSE-GPL2 LICENSE-GPL3
%dir %{python3_sitearch}/wx/
%{python3_sitearch}/wx/siplib.*
%{python3_sitearch}/wx_siplib-%{version}.dist-info/
%endif
%changelog
* Fri Nov 22 2019 Jan Grulich <jgrulich@redhat.com> - 4.19.19-1
- 4.19.19
Resolves: bz#1775604
* Tue Jul 17 2018 Jan Grulich <jgrulich@redhat.com> - 4.19.12-3
- *-devel: Requires: sip
- drop Obsoletes: sip, now that we have a real sip pkg again