update to 5.3.2 [release 5.3.2-1mamba;Fri Sep 19 2014]

This commit is contained in:
Silvan Calarco 2024-01-05 17:52:29 +01:00
parent 100420ab06
commit 35a4c20f2e
6 changed files with 586 additions and 0 deletions

View File

@ -0,0 +1,254 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_qreal_float_support.dpatch by Michael Casadevall <sonicmctails@gmail.com>
##
## DP: Corrects a configure test, and adds explicate double handling
## to qlist.sip on architectures where qreal != double
@DPATCH@
Index: python-qt4-4.7.2/configure.py
===================================================================
--- python-qt4-4.7.2.orig/configure.py 2010-03-17 19:29:19.000000000 +0100
+++ python-qt4-4.7.2/configure.py 2010-03-25 23:53:55.468631945 +0100
@@ -1915,8 +1915,9 @@
out << "PyQt_NoOpenGLES\\n";
#endif
- if (sizeof (qreal) != sizeof (double))
+#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
out << "PyQt_qreal_double\\n";
+#endif
return 0;
}
Index: python-qt4-4.7.2/sip/QtCore/qlist.sip
===================================================================
--- python-qt4-4.7.2.orig/sip/QtCore/qlist.sip 2010-03-17 19:29:26.000000000 +0100
+++ python-qt4-4.7.2/sip/QtCore/qlist.sip 2010-03-25 23:53:55.468631945 +0100
@@ -749,3 +749,227 @@
return sipGetState(sipTransferObj);
%End
};
+
+// If we're on an architecture where qreal != double, then we need to also
+// explicately handle doubles. On architectures where qreal == double, they
+// will automaticially be cast upwards
+
+%If (!PyQt_qreal_double)
+
+%If (Qt_4_3_0 -)
+// QList<QPair<double, double> > is implemented as a Python list of 2-element tuples.
+%MappedType QList<QPair<double, double> >
+{
+%TypeHeaderCode
+#include <qlist.h>
+#include <qpair.h>
+%End
+
+%ConvertFromTypeCode
+ // Create the list.
+ PyObject *l;
+
+ if ((l = PyList_New(sipCpp->size())) == NULL)
+ return NULL;
+
+ // Set the list elements.
+ for (int i = 0; i < sipCpp->size(); ++i)
+ {
+ const QPair<double, double> &p = sipCpp->at(i);
+ PyObject *pobj;
+
+ if ((pobj = Py_BuildValue((char *)"dd", p.first, p.second)) == NULL)
+ {
+ Py_DECREF(l);
+
+ return NULL;
+ }
+
+ PyList_SET_ITEM(l, i, pobj);
+ }
+
+ return l;
+%End
+
+%ConvertToTypeCode
+ SIP_SSIZE_T len;
+
+ // Check the type if that is all that is required.
+ if (sipIsErr == NULL)
+ {
+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
+ return 0;
+
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
+ {
+ PyObject *tup = PySequence_ITEM(sipPy, i);
+
+ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2)
+ return 0;
+ }
+
+ return 1;
+ }
+
+ QList<QPair<double, double> > *ql = new QList<QPair<double, double> >;
+ len = PySequence_Size(sipPy);
+
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
+ {
+ PyObject *tup = PySequence_ITEM(sipPy, i);
+
+ double first = PyFloat_AsDouble(PySequence_ITEM(tup, 0));
+ double second = PyFloat_AsDouble(PySequence_ITEM(tup, 1));
+
+ ql->append(QPair<double, double>(first, second));
+ }
+
+ *sipCppPtr = ql;
+
+ return sipGetState(sipTransferObj);
+%End
+};
+%End
+%If (Qt_4_3_0 -)
+// QList<QPair<double, TYPE> > is implemented as a Python list of 2-element tuples.
+template<double, TYPE>
+%MappedType QList<QPair<double, TYPE> >
+{
+%TypeHeaderCode
+#include <qlist.h>
+#include <qpair.h>
+%End
+
+%ConvertFromTypeCode
+ // Create the list.
+ PyObject *l;
+
+ if ((l = PyList_New(sipCpp->size())) == NULL)
+ return NULL;
+
+ // Set the list elements.
+ for (int i = 0; i < sipCpp->size(); ++i)
+ {
+ const QPair<double, TYPE> &p = sipCpp->at(i);
+ TYPE *t = new TYPE(p.second);
+ PyObject *pobj;
+
+ if ((pobj = sipBuildResult(NULL, "(dB)", p.first, t, sipClass_TYPE, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+
+ return NULL;
+ }
+
+ PyList_SET_ITEM(l, i, pobj);
+ }
+
+ return l;
+%End
+
+%ConvertToTypeCode
+ SIP_SSIZE_T len;
+
+ // Check the type if that is all that is required.
+ if (sipIsErr == NULL)
+ {
+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
+ return 0;
+
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
+ {
+ PyObject *tup = PySequence_ITEM(sipPy, i);
+
+ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2)
+ return 0;
+
+ if (!sipCanConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, SIP_NOT_NONE))
+ return 0;
+ }
+
+ return 1;
+ }
+
+ QList<QPair<double, TYPE> > *ql = new QList<QPair<double, TYPE> >;
+ len = PySequence_Size(sipPy);
+
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
+ {
+ PyObject *tup = PySequence_ITEM(sipPy, i);
+ double d;
+ int state;
+
+ d = PyFloat_AsDouble(PySequence_ITEM(tup, 0));
+ TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+ sipReleaseInstance(t, sipClass_TYPE, state);
+
+ delete ql;
+ return 0;
+ }
+
+ ql->append(QPair<double, TYPE>(d, *t));
+
+ sipReleaseInstance(t, sipClass_TYPE, state);
+ }
+
+ *sipCppPtr = ql;
+
+ return sipGetState(sipTransferObj);
+%End
+};
+%End
+
+// QList<double> is implemented as a Python list of doubles.
+%MappedType QList<double>
+{
+%TypeHeaderCode
+#include <qlist.h>
+%End
+
+%ConvertFromTypeCode
+ // Create the list.
+ PyObject *l;
+
+ if ((l = PyList_New(sipCpp->size())) == NULL)
+ return NULL;
+
+ // Set the list elements.
+ for (int i = 0; i < sipCpp->size(); ++i)
+ {
+ PyObject *pobj;
+
+ if ((pobj = PyFloat_FromDouble(sipCpp->value(i))) == NULL)
+ {
+ Py_DECREF(l);
+
+ return NULL;
+ }
+
+ PyList_SET_ITEM(l, i, pobj);
+ }
+
+ return l;
+%End
+
+%ConvertToTypeCode
+ // Check the type if that is all that is required.
+ if (sipIsErr == NULL)
+ return (PySequence_Check(sipPy) && PySequence_Size(sipPy) >= 0);
+
+ QList<double> *ql = new QList<double>;
+ SIP_SSIZE_T len = PySequence_Size(sipPy);
+
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
+ ql->append(PyFloat_AsDouble(PySequence_ITEM(sipPy, i)));
+
+ *sipCppPtr = ql;
+
+ return sipGetState(sipTransferObj);
+%End
+};
+
+%End

29
PyQt4-4.9.4-x86_64.patch Normal file
View File

@ -0,0 +1,29 @@
diff -Nru PyQt-x11-gpl-4.9.4/configure.py PyQt-x11-gpl-4.9.4.buono/configure.py
--- PyQt-x11-gpl-4.9.4/configure.py 2012-09-26 10:57:20.302056510 +0000
+++ PyQt-x11-gpl-4.9.4.buono/configure.py 2012-09-26 10:56:12.418802710 +0000
@@ -966,6 +966,7 @@
else:
# Use distutils to get the additional configuration.
from distutils.sysconfig import get_config_vars
+ from distutils.sysconfig import get_python_lib
ducfg = get_config_vars()
config_args = ducfg.get("CONFIG_ARGS", "")
@@ -980,16 +981,7 @@
dynamic_pylib = "--enable-shared" in config_args
if dynamic_pylib:
- if glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor)):
- lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
- elif glob.glob("%s/libpython%d.%d*" % (ducfg["LIBDIR"], py_major, py_minor)):
- lib_dir_flag = quote("-L%s" % ducfg["LIBDIR"])
- else:
- sipconfig.inform("Qt Designer plugin disabled because Python library couldn't be found")
- lib_dir_flag = ''
- opts.designer_plugin = False
-
- link = "%s -lpython%d.%d%s" % (lib_dir_flag, py_major, py_minor, abi)
+ link = "-L%s -lpython%d.%d" % (get_python_lib(plat_specific=1, standard_lib=1), py_major, py_minor)
else:
sipconfig.inform("Qt Designer plugin disabled because Python library is static")
opts.designer_plugin = False

16
PyQt4-egl.patch Normal file
View File

@ -0,0 +1,16 @@
--- sip/QtOpenGL/qgl.sip 2010-12-04 17:15:10.497601234 +0200
+++ sip/QtOpenGL/qgl.sip 2010-12-04 17:15:46.138746235 +0200
@@ -255,13 +255,6 @@
%End
GLuint bindTexture(const QString &);
-protected:
-%If (WS_X11)
-%If (PyQt_NoOpenGLES)
- virtual void *chooseVisual();
-%End
-%End
-
public:
void deleteTexture(GLuint);
static void setTextureCacheLimit(int);

View File

@ -0,0 +1,11 @@
--- PyQt-gpl-5.3.2/configure.py.orig 2014-09-21 01:58:28.591540643 +0200
+++ PyQt-gpl-5.3.2/configure.py 2014-09-21 01:59:14.195602717 +0200
@@ -2386,6 +2386,8 @@
# This is needed for Windows.
pro_lines.append('INCLUDEPATH += .')
+ pro_lines.append('INCLUDEPATH += /usr/include/qt5/QtPrintSupport')
+
# Make sure the SIP include directory is searched before the Python include
# directory if they are different.
pro_lines.append('INCLUDEPATH += %s' % target_config.sip_inc_dir)

274
PyQt5.spec Normal file
View File

@ -0,0 +1,274 @@
%define pythonsip_ver %(sip -V)
Name: PyQt5
Version: 5.3.2
Release: 1mamba
Summary: Python bindings for the Qt cross platform GUI toolkit
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.riverbankcomputing.com/software/pyqt
Source: http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-%{version}/PyQt-gpl-%{version}.tar.gz
Patch0: PyQt4-egl.patch
Patch1: PyQt4-4.7.3-qreal_float_support.patch
Patch2: PyQt4-4.9.4-x86_64.patch
Patch3: PyQt5-5.3.2-python-sip-4.16.1.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libGL-devel
BuildRequires: libgcc
BuildRequires: libpython-devel
BuildRequires: libpython27-devel
BuildRequires: libqt5-devel
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRequires: chrpath
BuildRequires: libXcursor-devel
BuildRequires: libdbus-devel
BuildRequires: python-dbus
BuildRequires: python-dbus-devel
# WARNING: do not parametrize python-sip-devel version or it will be useless for ports
BuildRequires: python-sip-devel >= 4.14.7
Requires: python-sip = %{pythonsip_ver}
Requires: python-dbus
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.
%package devel
Summary: Development files for PyQt4
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: %{name}-QtDesigner = %{?epoch:%epoch:}%{version}-%{release}
%description devel
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.
This package contains files needed for development.
%package QtDesigner
Summary: QtDesigner support components for PyQt4
Group: System/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description QtDesigner
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.
This package contains the QtDesigner support components for PyQt4.
%prep
%setup -q -n PyQt-gpl-%{version}
#-D -T
#:<< _EOF
#%patch0 -p0
#% ifarch arm
#% patch1 -p1
#% endif
#%ifarch x86_64
#%patch2 -p1
#%endif
%patch3 -p1
%build
#:<< _EOF
sed -i "/generate_code(\"phonon\")/s:phonon\":&, extra_include_dirs=[\"%{_includedir}/phonon\"]:" configure.py
%{__python27} configure.py CXXFLAGS="%{optflags}" CFLAGS="%{optflags}" \
--qmake=%{_qt5_qmake} \
-d %{python27_sitearch} \
--confirm-license \
--assume-shared \
--verbose
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall INSTALL_ROOT=%{buildroot}
## Remove rpaths
#chrpath --list %{buildroot}%{python27_sitearch}/PyQt5/QtCore.so
#chrpath --delete %{buildroot}%{python27_sitearch}/PyQt5/QtCore.so
#
#chrpath --list %{buildroot}%{python27_sitearch}/PyQt5/QtGui.so
#chrpath --delete %{buildroot}%{python27_sitearch}/PyQt5/QtGui.so
#
#chrpath --list %{buildroot}%{python27_sitearch}/PyQt5/QtDesigner.so
#chrpath --delete %{buildroot}%{python27_sitearch}/PyQt5/QtDesigner.so
# Fix documentation permissions
find examples/ -type f -exec chmod 0644 {} ';'
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{python27_sitelib}/dbus/mainloop/pyqt5.so
%dir %{python27_sitearch}/PyQt5
%{python27_sitearch}/PyQt5/Enginio.so
%{python27_sitearch}/PyQt5/Qt.so
%{python27_sitearch}/PyQt5/QtBluetooth.so
#%{python27_sitearch}/PyQt5/QtAssistant.so
%{python27_sitearch}/PyQt5/QtCore.so
%{python27_sitearch}/PyQt5/QtDBus.so
#%{python27_sitearch}/PyQt5/QtDeclarative.so
%{python27_sitearch}/PyQt5/QtGui.so
%{python27_sitearch}/PyQt5/QtHelp.so
%{python27_sitearch}/PyQt5/QtMultimedia.so
%{python27_sitearch}/PyQt5/QtMultimediaWidgets.so
%{python27_sitearch}/PyQt5/QtNetwork.so
%{python27_sitearch}/PyQt5/QtOpenGL.so
%{python27_sitearch}/PyQt5/QtPositioning.so
%{python27_sitearch}/PyQt5/QtPrintSupport.so
%{python27_sitearch}/PyQt5/QtQml.so
%{python27_sitearch}/PyQt5/QtQuick.so
%{python27_sitearch}/PyQt5/QtQuickWidgets.so
%{python27_sitearch}/PyQt5/QtSensors.so
%{python27_sitearch}/PyQt5/QtSerialPort.so
#%{python27_sitearch}/PyQt5/QtScript.so
#%{python27_sitearch}/PyQt5/QtScriptTools.so
%{python27_sitearch}/PyQt5/QtSql.so
%{python27_sitearch}/PyQt5/QtSvg.so
%{python27_sitearch}/PyQt5/QtTest.so
%{python27_sitearch}/PyQt5/QtWebKit.so
%{python27_sitearch}/PyQt5/QtWebKitWidgets.so
%{python27_sitearch}/PyQt5/QtWebSockets.so
%{python27_sitearch}/PyQt5/QtWidgets.so
%{python27_sitearch}/PyQt5/QtX11Extras.so
#%{python27_sitearch}/PyQt5/QtXml.so
%{python27_sitearch}/PyQt5/QtXmlPatterns.so
%{python27_sitearch}/PyQt5/_QOpenGLFunctions_2_0.so
%{python27_sitearch}/PyQt5/__init__.py
%dir %{python27_sitearch}/PyQt5/uic
%{python27_sitearch}/PyQt5/uic/*
%dir %{_qt5_plugindir}/PyQt5
%{_qt5_plugindir}/PyQt5/libpyqt5qmlplugin.so
%doc LICENSE*
%files devel
%defattr(-,root,root)
%{_bindir}/*
%dir %{_datadir}/sip/PyQt5
%{_datadir}/sip/PyQt5/*
%doc doc/* examples
%doc NEWS README
%files QtDesigner
%defattr(-,root,root)
%{python27_sitearch}/PyQt5/QtDesigner.so
%{_qt5_plugindir}/designer/*
%changelog
* Fri Sep 19 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 5.3.2-1mamba
- update to 5.3.2
* Wed Dec 25 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.10.3-2mamba
- rebuilt with python-sip 4.15.3
* Mon Sep 30 2013 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.10.3-1mamba
- update to 4.10.3
* Thu Jul 11 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.10.2-1mamba
- update to 4.10.2
* Fri May 17 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.10.1-2mamba
- rebuilt with python 2.7
* Sat May 11 2013 Automatic Build System <autodist@mambasoft.it> 4.10.1-1mamba
- update to 4.10.1
* Thu Feb 14 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 4.9.6-1mamba
- update to 4.9.6
* Sat Aug 11 2012 Automatic Build System <autodist@mambasoft.it> 4.9.4-1mamba
- automatic version update by autodist
* Thu Feb 09 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 4.8.6-1mamba
- update to 4.8.6
- move uic module to main package as requires by system-config-printer-kde
- added patch to fix build with Qt EGL enabled
* Sun Sep 25 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 4.8.5-2mamba
- added PyQt4-QtDesigner subpackage
* Sun Aug 21 2011 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.8.5-1mamba
- update to 4.8.5
* Thu Jul 07 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 4.8.4-2mamba
- rebuilt with python-sip 4.12.3
* Wed May 18 2011 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.8.4-1mamba
- update to 4.8.4
* Tue Mar 08 2011 Automatic Build System <autodist@mambasoft.it> 4.8.3-1mamba
- automatic update by autodist
* Sat Jan 08 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 4.8.1-2mamba
- rebuilt with python-sip 4.12
* Sat Nov 13 2010 Automatic Build System <autodist@mambasoft.it> 4.8.1-1mamba
- automatic update by autodist
* Sat Oct 30 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.8-2mamba
- rebuilt with libqt 4.7.0
* Thu Oct 28 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.8-1mamba
- update to 4.8
- added string version requirement for python-sip
* Wed Jul 14 2010 Automatic Build System <autodist@mambasoft.it> 4.7.4-1mamba
- automatic update by autodist
* Wed May 05 2010 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.7.3-1mamba
- update to 4.7.3
* Sun Apr 11 2010 Davide Madrisan <davide.madrisan@gmail.com> 4.7.2-1mamba
- update to 4.7.2
- add missing %%defattr directive
- dropped patch for phonon: it was merged upstream
* Tue Mar 09 2010 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 4.7-2mamba
- added devel package
* Thu Jan 28 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.7-1mamba
- update to 4.7
* Tue Nov 10 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 4.6.1-1mamba
- update to 4.6.1
* Wed Aug 12 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 4.5.4-1mamba
- update to 4.5.4
* Fri Dec 12 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.4-3mamba
- added requirement for python-cups
* Fri Dec 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.4-2mamba
- rebuilt
* Mon Nov 10 2008 gil <puntogil@libero.it> 4.4.4-1mamba
- update to 4.4.4 with python 2.6
* Sun Oct 12 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.3-2mamba
- don't pass 'echo yes' but just 'yes' to accept license question
* Sat Oct 11 2008 gil <puntogil@libero.it> 4.4.3-1mamba
- update to 4.4.3
* Tue May 13 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.3.3-2mamba
- repackaged with dbus support
* Fri May 09 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.3.3-1mamba
- update to 4.3.3
* Fri Oct 05 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 3.17.3-1mamba
- update to 3.17.3
* Mon Jul 10 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 3.16-1qilnx
- update to version 3.16 by autospec
* Wed Mar 16 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 3.14.1-1qilnx
- package created by autospec

View File

@ -1,2 +1,4 @@
# PyQt5 # PyQt5
PyQt4 is a comprehensive set of Python bindings for Nokia's Qt4 cross platform GUI toolkit.