diff options
Diffstat (limited to 'devel/py-qt4-core/files')
-rw-r--r-- | devel/py-qt4-core/files/Qt.py | 73 | ||||
-rw-r--r-- | devel/py-qt4-core/files/patch-configure.py | 209 | ||||
-rw-r--r-- | devel/py-qt4-core/files/patch-sip_QtCore_qlist.sip | 238 |
3 files changed, 0 insertions, 520 deletions
diff --git a/devel/py-qt4-core/files/Qt.py b/devel/py-qt4-core/files/Qt.py deleted file mode 100644 index 71a0d98b9d08..000000000000 --- a/devel/py-qt4-core/files/Qt.py +++ /dev/null @@ -1,73 +0,0 @@ -# Replacement for the composite module PyQt4.Qt for FreeBSD -# Provides namespace for all installed PyQt4 modules by importing them - -from PyQt4.QtCore import * - -try: - from PyQt4.QtGui import * -except ImportError: - pass -try: - from PyQt4.QtXml import * -except ImportError: - pass -try: - from PyQt4.QtXmlPatterns import * -except ImportError: - pass -try: - from PyQt4.QtAssistant import * -except ImportError: - pass -try: - from PyQt4.QtDeclarative import * -except ImportError: - pass -try: - from PyQt4.QtDesigner import * -except ImportError: - pass -try: - from PyQt4.QtNetwork import * -except ImportError: - pass -try: - from PyQt4.QtOpenGL import * -except ImportError: - pass -try: - from PyQt4.QtScript import * -except ImportError: - pass -try: - from PyQt4.QtSql import * -except ImportError: - pass -try: - from PyQt4.QtSvg import * -except ImportError: - pass -try: - from PyQt4.QtTest import * -except ImportError: - pass -try: - from PyQt4.QtHelp import * -except ImportError: - pass -try: - from PyQt4.QtWebKit import * -except ImportError: - pass -try: - from PyQt4.QtMultimedia import * -except ImportError: - pass -try: - from PyQt4.phonon import * -except ImportError: - pass -try: - from PyQt4.Qsci import * -except: - pass diff --git a/devel/py-qt4-core/files/patch-configure.py b/devel/py-qt4-core/files/patch-configure.py deleted file mode 100644 index d69b05ad1770..000000000000 --- a/devel/py-qt4-core/files/patch-configure.py +++ /dev/null @@ -1,209 +0,0 @@ ---- configure.py.orig 2014-07-03 17:00:02.000000000 +0300 -+++ configure.py 2014-07-19 23:51:03.000000000 +0300 -@@ -343,7 +343,7 @@ - - # Note that the order in which we check is important for the - # consolidated module - a module's dependencies must be checked first. -- pyqt_modules.append("QtCore") -+ check_module("QtCore", "qobject.h", "new QObject()") - - check_module("QtGui", "qwidget.h", "new QWidget()") - check_module("QtHelp", "qhelpengine.h", "new QHelpEngine(\"foo\")") -@@ -372,8 +372,8 @@ - check_module("QtTest", "QtTest", "QTest::qSleep(0)") - check_module("QtWebKit", "qwebpage.h", "new QWebPage()") - check_module("QtXmlPatterns", "qxmlname.h", "new QXmlName()") -- check_module("phonon", "phonon/videowidget.h", -- "new Phonon::VideoWidget()") -+ check_module("phonon", "phonon/mediacontroller.h", -+ "new Phonon::MediaController(0)") - check_module("QtAssistant", "qassistantclient.h", - "new QAssistantClient(\"foo\")", extra_lib_dirs=ass_lib_dirs, - extra_libs=ass_libs) -@@ -635,21 +635,6 @@ - if opts.staticplugins: - sipconfig.inform("Unable to find the following static plugins: %s" % ", ".join(opts.staticplugins)) - -- # Generate the QScintilla API file. -- sipconfig.inform("Creating QScintilla API file...") -- f = open("PyQt4.api", "w") -- -- for m in pyqt_modules: -- api = open(m + ".api") -- -- for l in api: -- f.write("PyQt4." + l) -- -- api.close() -- os.remove(m + ".api") -- -- f.close() -- - def _qpy_directories(self, mname, lib_name): - """Return a 3-tuple of the directories containing the header files, the - directory containing the library, and the name of the support library -@@ -740,6 +725,9 @@ - return libs, libdirs - - def module_installs(self): -+ if "QtCore" not in pyqt_modules: -+ return [] -+ - return [os.path.join(src_dir, "__init__.py"), "pyqtconfig.py"] - - def qpy_libs(self): -@@ -875,80 +863,82 @@ - makefile.generate() - tool.append("elementtree") - -- # Create the pyuic4 wrapper. Use the GUI version on MacOS (so that -- # previews work properly and normal console use will work anyway), but -- # not on Windows (so that normal console use will work). -- sipconfig.inform("Creating pyuic4 wrapper...") -+ if "QtCore" in pyqt_modules: -+ # Create the pyuic4 wrapper. Use the GUI version on MacOS (so that -+ # previews work properly and normal console use will work anyway), but -+ # not on Windows (so that normal console use will work). -+ sipconfig.inform("Creating pyuic4 wrapper...") - -- if sys.platform == 'darwin': -- gui = True -+ if sys.platform == 'darwin': -+ gui = True - -- if opts.use_arch is None: -- use_arch = '' -+ if opts.use_arch is None: -+ use_arch = '' -+ else: -+ use_arch = ' '.join(opts.use_arch) - else: -- use_arch = ' '.join(opts.use_arch) -- else: -- gui = False -- use_arch = '' -+ gui = False -+ use_arch = '' - -- # The pyuic directory may not exist if we are building away from the -- # source directory. -- try: -- os.mkdir("pyuic") -- except OSError: -- pass -+ # The pyuic directory may not exist if we are building away from the -+ # source directory. -+ try: -+ os.mkdir("pyuic") -+ except OSError: -+ pass - -- uicdir=os.path.join(pyqt_modroot, "uic") -- wrapper = sipconfig.create_wrapper(os.path.join(uicdir, "pyuic.py"), os.path.join("pyuic", "pyuic4"), gui, use_arch) -+ uicdir=os.path.join(pyqt_modroot, "uic") -+ wrapper = sipconfig.create_wrapper(os.path.join(uicdir, "pyuic.py"), os.path.join("pyuic", "pyuic4"), gui, use_arch) - -- sipconfig.inform("Creating pyuic4 Makefile...") -+ sipconfig.inform("Creating pyuic4 Makefile...") - -- makefile = sipconfig.PythonModuleMakefile( -- configuration=sipcfg, -- dstdir=uicdir, -- srcdir=os.path.join(src_dir, "pyuic", "uic"), -- dir="pyuic", -- installs=[[os.path.basename(wrapper), opts.pyqtbindir]] -- ) -+ makefile = sipconfig.PythonModuleMakefile( -+ configuration=sipcfg, -+ dstdir=uicdir, -+ srcdir=os.path.join(src_dir, "pyuic", "uic"), -+ dir="pyuic", -+ installs=[[os.path.basename(wrapper), opts.pyqtbindir]] -+ ) - -- makefile.generate() -- tool.append("pyuic") -+ makefile.generate() -+ tool.append("pyuic") - -- sipconfig.inform("Creating pylupdate4 Makefile...") -+ if "QtXml" in pyqt_modules: -+ sipconfig.inform("Creating pylupdate4 Makefile...") - -- cxxflags_app = sipcfg.build_macros().get("CXXFLAGS_APP", "") -+ cxxflags_app = sipcfg.build_macros().get("CXXFLAGS_APP", "") - -- makefile = sipconfig.ProgramMakefile( -- configuration=sipcfg, -- build_file=os.path.join(src_dir, "pylupdate", "pylupdate.sbf"), -- dir="pylupdate", -- install_dir=opts.pyqtbindir, -- console=1, -- qt=["QtCore", "QtXml"], -- debug=opts.debug, -- warnings=1, -- universal=sipcfg.universal, -- arch=sipcfg.arch, -- deployment_target=sipcfg.deployment_target -- ) -- -- makefile.extra_include_dirs.append(os.path.join(src_dir, "pylupdate")) -- -- if cxxflags_app != "": -- makefile.extra_cxxflags.append(cxxflags_app) -- -- makefile.generate() -- tool.append("pylupdate") -- -- sipconfig.inform("Creating pyrcc4 Makefile...") -+ makefile = sipconfig.ProgramMakefile( -+ configuration=sipcfg, -+ build_file=os.path.join(src_dir, "pylupdate", "pylupdate.sbf"), -+ dir="pylupdate", -+ install_dir=opts.pyqtbindir, -+ console=1, -+ qt=["QtCore", "QtXml"], -+ debug=opts.debug, -+ warnings=1, -+ universal=sipcfg.universal, -+ arch=sipcfg.arch, -+ deployment_target=sipcfg.deployment_target -+ ) -+ -+ makefile.extra_include_dirs.append(os.path.join(src_dir, "pylupdate")) -+ -+ if cxxflags_app != "": -+ makefile.extra_cxxflags.append(cxxflags_app) -+ -+ makefile.generate() -+ tool.append("pylupdate") - -- makefile = pyrccMakefile() -+ sipconfig.inform("Creating pyrcc4 Makefile...") - -- if cxxflags_app != "": -- makefile.extra_cxxflags.append(cxxflags_app) -+ makefile = pyrccMakefile() - -- makefile.generate() -- tool.append("pyrcc") -+ if cxxflags_app != "": -+ makefile.extra_cxxflags.append(cxxflags_app) -+ -+ makefile.generate() -+ tool.append("pyrcc") - - if opts.designer_plugin and "QtDesigner" in pyqt_modules: - py_major = sipcfg.py_version >> 16 -@@ -2301,9 +2285,9 @@ - installs=[(pyqt.module_installs(), pyqt_modroot)] - - if opts.api: -- installs.append(("PyQt4.api", os.path.join(opts.qscidir, "api", "python"))) -+ installs.append(("%s.api" % pyqt_modules[-1], os.path.join(opts.qscidir, "api", "python"))) - -- xtra_modules = ["Qt"] -+ xtra_modules = [] - - if opts.bigqt: - xtra_modules.append("_qt") diff --git a/devel/py-qt4-core/files/patch-sip_QtCore_qlist.sip b/devel/py-qt4-core/files/patch-sip_QtCore_qlist.sip deleted file mode 100644 index 8d78e6fc9872..000000000000 --- a/devel/py-qt4-core/files/patch-sip_QtCore_qlist.sip +++ /dev/null @@ -1,238 +0,0 @@ -Corrects a configure test, and adds explicate double handling -to qlist.sip on architectures where qreal != double - -Obtained from: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch - ---- sip/QtCore/qlist.sip.orig 2015-06-11 17:28:22 UTC -+++ sip/QtCore/qlist.sip -@@ -748,6 +748,230 @@ template<qreal, TYPE> - 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 - // QList<qreal> is implemented as a Python list of floats. - %MappedType QList<qreal> /DocType="list-of-float"/ - { |