commit 1d565de42f38fd4682c7bb4f28a8a0518a2e86b7 Author: gnaygnil Date: Sat Nov 30 11:56:05 2019 +0800 sip: openEuler init diff --git a/macros.sip b/macros.sip new file mode 100644 index 0000000..6e07e48 --- /dev/null +++ b/macros.sip @@ -0,0 +1,3 @@ +%_sip_api_major 12 +%_sip_api_minor 5 +%_sip_api %{_sip_api_major}.%{_sip_api_minor} diff --git a/sip-4.18-no_rpath.patch b/sip-4.18-no_rpath.patch new file mode 100644 index 0000000..406a26c --- /dev/null +++ b/sip-4.18-no_rpath.patch @@ -0,0 +1,21 @@ +diff -up sip-4.18/siputils.py.no_rpath sip-4.18/siputils.py +--- sip-4.18/siputils.py.no_rpath 2015-03-25 06:00:24.000000000 -0500 ++++ sip-4.18/siputils.py 2016-04-13 11:34:48.179894616 -0500 +@@ -435,7 +435,7 @@ class Makefile: + if l_dir in ("", ".", ".."): + continue + +- rpaths.append(l) ++ #rpaths.append(l) + + if self._python: + incdir.append(self.config.py_inc_dir) +@@ -612,7 +612,7 @@ class Makefile: + # Handle library directories. + libdir_qt = self.optional_list("LIBDIR_QT") + libdir.extend(libdir_qt) +- rpaths.extend(libdir_qt) ++ #rpaths.extend(libdir_qt) + + if qt_version >= 0x040000: + # Try and read QT_LIBINFIX from qconfig.pri. diff --git a/sip-4.18-no_strip.patch b/sip-4.18-no_strip.patch new file mode 100644 index 0000000..3273311 --- /dev/null +++ b/sip-4.18-no_strip.patch @@ -0,0 +1,21 @@ +diff -up sip-4.18/siputils.py.no_strip sip-4.18/siputils.py +--- sip-4.18/siputils.py.no_strip 2015-03-25 06:00:24.000000000 -0500 ++++ sip-4.18/siputils.py 2016-04-13 11:34:23.718690341 -0500 +@@ -1469,7 +1469,7 @@ class ModuleMakefile(Makefile): + """ + def __init__(self, configuration, build_file, install_dir=None, static=0, + console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, +- dir=None, makefile="Makefile", installs=None, strip=1, ++ dir=None, makefile="Makefile", installs=None, strip=0, + export_all=0, universal=None, arch=None, + deployment_target=None): + """Initialise an instance of a module Makefile. +@@ -1780,7 +1780,7 @@ class SIPModuleMakefile(ModuleMakefile): + """ + def __init__(self, configuration, build_file, install_dir=None, static=0, + console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, +- dir=None, makefile="Makefile", installs=None, strip=1, ++ dir=None, makefile="Makefile", installs=None, strip=0, + export_all=0, universal=None, arch=None, prot_is_public=0, + deployment_target=None): + """Initialise an instance of a SIP generated module Makefile. diff --git a/sip-4.19.12.tar.gz b/sip-4.19.12.tar.gz new file mode 100644 index 0000000..a0adacb Binary files /dev/null and b/sip-4.19.12.tar.gz differ diff --git a/sip-wrapper.sh b/sip-wrapper.sh new file mode 100644 index 0000000..d7d3751 --- /dev/null +++ b/sip-wrapper.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec sip -n @SIP_MODULE@ $@ diff --git a/sip.spec b/sip.spec new file mode 100644 index 0000000..0be414a --- /dev/null +++ b/sip.spec @@ -0,0 +1,255 @@ +%{!?python2_inc:%global python2_inc %(%{__python2} -c "from distutils.sysconfig import get_python_inc; print get_python_inc(1)")} +%{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")} +%{!?python2_sitearch:%global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} + +%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) + +%undefine _strict_symbol_defs_build + +Name: sip +Version: 4.19.12 +Release: 10 +Summary: A C/C++ library bindings generator for Python v2 and v3 +License: GPLv2 or GPLv3 and (GPLv3+ with exceptions) +URL: http://www.riverbankcomputing.com/software/sip/intro +Source0: http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz +Source1: macros.sip +Source2: sip-wrapper.sh +BuildRequires: gcc-c++ sed +Obsoletes: sip-macros < %{version}-%{release} +Provides: sip-macros = %{version}-%{release} +Patch0001: sip-4.18-no_strip.patch +Patch0002: sip-4.18-no_rpath.patch + +%description +SIP is a tool that makes it very easy to create Python bindings for C and C++ +libraries. It was originally developed to create PyQt, the Python bindings for +the Qt toolkit, but can be used to create bindings for any C or C++ library. + +SIP comprises a code generator and a Python module. The code generator processes +a set of specification files and generates C or C++ code which is then compiled +to create the bindings extension module. The SIP Python module provides support +functions to the automatically generated code. + + +%package -n python2-sip +Summary: A C/C++ library bindings generator for Python v2 +Provides: sip-api(12) = 12.5 sip-api(12) = 12.5 +Provides: python2-sip-api(12) = 12.5 python2-sip-api(12) = 12.5 +%{?python_provide:%python_provide python2-sip} + +%description -n python2-sip +SIP is a tool that makes it very easy to create Python bindings for C and C++ +libraries. It was originally developed to create PyQt, the Python bindings for +the Qt toolkit, but can be used to create bindings for any C or C++ library. + +SIP comprises a code generator and a Python module. The code generator processes +a set of specification files and generates C or C++ code which is then compiled +to create the bindings extension module. The SIP Python module provides support +functions to the automatically generated code. + +%package -n python2-sip-devel +Summary: Files needed to generate Python v2 bindings for any C++ class library +Requires: sip = %{version}-%{release} python2-devel +BuildRequires: python2-devel +Provides: sip-devel = %{version}-%{release} sip-devel = %{version}-%{release} +Obsoletes: sip-devel < %{version}-%{release} + +%description -n python2-sip-devel +Files needed to generate Python v2 bindings for any C++ class library. + +%package -n python2-pyqt4-sip +Summary: Python 2/C++ Bindings Generator for pyqt5 +Provides: python2-pyqt4-sip-api(12) = 12.5 python2-pyqt4-sip-api(12) = 12.5 +%{?python_provide:%python_provide python2-pyqt4-sip} + +%description -n python2-pyqt4-sip +SIP is a tool that makes it very easy to create Python bindings for C and C++ +libraries. It was originally developed to create PyQt, the Python bindings for +the Qt toolkit, but can be used to create bindings for any C or C++ library. + +SIP comprises a code generator and a Python module. The code generator processes +a set of specification files and generates C or C++ code which is then compiled +to create the bindings extension module. The SIP Python module provides support +functions to the automatically generated code. + +%package -n python2-pyqt5-sip +Summary: Python 2/C++ Bindings Generator for pyqt5 +Provides: python2-pyqt5-sip-api(12) = 12.5 python2-pyqt5-sip-api(12) = 12.5 +%{?python_provide:%python_provide python2-pyqt5-sip} + +%description -n python2-pyqt5-sip +SIP is a tool that makes it very easy to create Python bindings for C and C++ +libraries. It was originally developed to create PyQt, the Python bindings for +the Qt toolkit, but can be used to create bindings for any C or C++ library. + +SIP comprises a code generator and a Python module. The code generator processes +a set of specification files and generates C or C++ code which is then compiled +to create the bindings extension module. The SIP Python module provides support +functions to the automatically generated code. + +%package -n python3-sip +Summary: A C/C++ library bindings generator for Python v3 +Provides: python3-sip-api(12) = 12.5 python3-sip-api(12) = 12.5 + +%description -n python3-sip +This is the Python 3 build of SIP. + +SIP is a tool that makes it very easy to create Python bindings for C and C++ +libraries. It was originally developed to create PyQt, the Python bindings for +the Qt toolkit, but can be used to create bindings for any C or C++ library. + +SIP comprises a code generator and a Python module. The code generator processes +a set of specification files and generates C or C++ code which is then compiled +to create the bindings extension module. The SIP Python module provides support +functions to the automatically generated code. + +%package -n python3-sip-devel +Summary: Files needed to generate Python v3 bindings for any C++ class library +Requires: sip = %{version}-%{release} python3-devel +BuildRequires: python3-devel + +%description -n python3-sip-devel +Files needed to generate Python v3 bindings for any C++ class library + +%package -n python3-pyqt4-sip +Summary: Python 3/C++ Bindings Generator for pyqt4 +Provides: python3-pyqt4-sip-api(12) = 12.5 python3-pyqt4-sip-api(12) = 12.5 +BuildRequires: python3-devel + +%description -n python3-pyqt4-sip +This is the Python 3 build of pyqt4-SIP. + +SIP is a tool that makes it very easy to create Python bindings for C and C++ +libraries. It was originally developed to create PyQt, the Python bindings for +the Qt toolkit, but can be used to create bindings for any C or C++ library. + +SIP comprises a code generator and a Python module. The code generator processes +a set of specification files and generates C or C++ code which is then compiled +to create the bindings extension module. The SIP Python module provides support +functions to the automatically generated code. + +%package -n python3-pyqt5-sip +Summary: Python 3/C++ Bindings Generator for pyqt5 +BuildRequires: python3-devel +Provides: python3-pyqt5-sip-api(12) = 12.5 python3-pyqt5-sip-api(12) = 12.5 + +%description -n python3-pyqt5-sip +This is the Python 3 build of pyqt5-SIP. + +SIP is a tool that makes it very easy to create Python bindings for C and C++ +libraries. It was originally developed to create PyQt, the Python bindings for +the Qt toolkit, but can be used to create bindings for any C or C++ library. + +SIP comprises a code generator and a Python module. The code generator processes +a set of specification files and generates C or C++ code which is then compiled +to create the bindings extension module. The SIP Python module provides support +functions to the automatically generated code. + +%prep +%autosetup -n %{name}-%{version} -p1 +%build +install -d %{_target_platform}-python2 +cd %{_target_platform}-python2 +%{__python2} ../configure.py CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" +%make_build +cd - +install -d %{_target_platform}-python2-pyqt4 +cd %{_target_platform}-python2-pyqt4 +%{__python2} ../configure.py --sip-module=PyQt4.sip CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" +%make_build +cd - +install -d %{_target_platform}-python2-pyqt5 +cd %{_target_platform}-python2-pyqt5 +%{__python2} ../configure.py --sip-module=PyQt5.sip CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" +%make_build +cd - +install -d %{_target_platform}-python3 +cd %{_target_platform}-python3 +%{__python3} ../configure.py CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" +%make_build +cd - +install -d %{_target_platform}-python3-pyqt4 +cd %{_target_platform}-python3-pyqt4 +%{__python3} ../configure.py --sip-module=PyQt4.sip CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" +%make_build +cd - +install -d %{_target_platform}-python3-pyqt5 +cd %{_target_platform}-python3-pyqt5 +%{__python3} ../configure.py --sip-module=PyQt5.sip CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}" +%make_build +cd - +%install +%make_install -C %{_target_platform}-python3 +ln -s sip %{buildroot}%{_bindir}/python3-sip +%make_install -C %{_target_platform}-python3-pyqt4 +%make_install -C %{_target_platform}-python3-pyqt5 +install -d %{buildroot}%{python3_sitearch}/__pycache__/exclude_rpm_hack +%make_install -C %{_target_platform}-python2 +%make_install -C %{_target_platform}-python2-pyqt4 +%make_install -C %{_target_platform}-python2-pyqt5 +install %{SOURCE2} %{buildroot}%{_bindir}/sip-pyqt4 +install %{SOURCE2} %{buildroot}%{_bindir}/sip-pyqt5 +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 +install -d %{buildroot}%{_datadir}/sip +install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip + +%files +%doc README LICENSE LICENSE-GPL2 LICENSE-GPL3 +%{_bindir}/sip +%{_bindir}/sip-pyqt4 +%{_bindir}/sip-pyqt5 +%{_bindir}/python3-sip +%dir %{_datadir}/sip/ +%{rpm_macros_dir}/macros.sip + +%files -n python2-sip-devel +%{python2_inc}/sip.h +%{python2_sitearch}/sipconfig.py* +%{python2_sitearch}/sipdistutils.py* + +%files -n python2-sip +%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3 +%{python2_sitearch}/sip.* +%{python2_sitearch}/sip-%{version}.dist-info/ + +%files -n python2-pyqt4-sip +%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3 +%{python2_sitearch}/PyQt4/ +%{python2_sitearch}/PyQt4_sip-%{version}.dist-info/ + +%files -n python2-pyqt5-sip +%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3 +%{python2_sitearch}/PyQt5/sip.* +%{python2_sitearch}/PyQt5_sip-%{version}.dist-info/ + +%files -n python3-sip-devel +%{python3_inc}/sip.h +%{python3_sitearch}/sipconfig.py* +%{python3_sitearch}/sipdistutils.py* +%{python3_sitearch}/__pycache__/* +%exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack + +%files -n python3-sip +%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3 +%{python3_sitearch}/sip.* +%{python3_sitearch}/sip-%{version}.dist-info/ + +%files -n python3-pyqt4-sip +%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3 +%{python3_sitearch}/PyQt4/sip.* +%{python3_sitearch}/PyQt4_sip-%{version}.dist-info/ +%{python3_sitearch}/__pycache__/* +%exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack + +%files -n python3-pyqt5-sip +%doc NEWS README LICENSE LICENSE-GPL2 LICENSE-GPL3 +%{python3_sitearch}/PyQt5/sip.* +%{python3_sitearch}/PyQt5_sip-%{version}.dist-info/ +%{python3_sitearch}/__pycache__/* +%exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack + +%changelog +* Thu Nov 28 2019 Ling Yang - 4.19.12-10 +- Package init