diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-08-01 11:51:02 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-08-07 12:21:23 +0200 |
| commit | 878a0c84727a3f709400a93289bef7025432a946 (patch) | |
| tree | d005d8384da1480ce5dc6a8c9f339e01fadaf846 /meta-oe/recipes-devtools/python | |
| parent | 910feab3e7cae1a74562c930be032566824968eb (diff) | |
| download | meta-openembedded-878a0c84727a3f709400a93289bef7025432a946.tar.gz | |
python-pyqt: import from oe-classic
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/python')
6 files changed, 444 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/assistantclient-fix.patch b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/assistantclient-fix.patch new file mode 100644 index 0000000000..15f83d23b0 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/assistantclient-fix.patch | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | Index: PyQt-x11-gpl-4.8.3/sip/QtAssistant/qassistantclient.sip | ||
| 2 | =================================================================== | ||
| 3 | --- PyQt-x11-gpl-4.8.3.orig/sip/QtAssistant/qassistantclient.sip | ||
| 4 | +++ PyQt-x11-gpl-4.8.3/sip/QtAssistant/qassistantclient.sip | ||
| 5 | @@ -33,7 +33,7 @@ | ||
| 6 | class QAssistantClient : QObject | ||
| 7 | { | ||
| 8 | %TypeHeaderCode | ||
| 9 | -#include <qassistantclient.h> | ||
| 10 | +#include <QtAssistant/qassistantclient.h> | ||
| 11 | %End | ||
| 12 | |||
| 13 | %ConvertToSubClassCode | ||
diff --git a/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/fix_qthelp_ftbfs.diff b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/fix_qthelp_ftbfs.diff new file mode 100644 index 0000000000..e7a68829ad --- /dev/null +++ b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/fix_qthelp_ftbfs.diff | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | Description: Fix QtHelp FTBFS with ld --no-add-needed. | ||
| 2 | Author: Felix Geyer <debfx-pkg@fobos.de> | ||
| 3 | |||
| 4 | --- python-qt4-4.8.1.orig/configure.py | ||
| 5 | +++ python-qt4-4.8.1/configure.py | ||
| 6 | @@ -364,7 +364,8 @@ class ConfigurePyQt4: | ||
| 7 | pyqt_modules.append("QtCore") | ||
| 8 | |||
| 9 | check_module("QtGui", "qwidget.h", "new QWidget()") | ||
| 10 | - check_module("QtHelp", "qhelpengine.h", "new QHelpEngine(\"foo\")") | ||
| 11 | + check_module("QtHelp", "qhelpengine.h", "new QHelpEngine(\"foo\")", | ||
| 12 | + extra_libs=["QtCore"]) | ||
| 13 | check_module("QtMultimedia", "QAudioDeviceInfo", | ||
| 14 | "new QAudioDeviceInfo()") | ||
| 15 | check_module("QtNetwork", "qhostaddress.h", "new QHostAddress()") | ||
diff --git a/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/fix_the_QAssitant_ftbfs.diff b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/fix_the_QAssitant_ftbfs.diff new file mode 100644 index 0000000000..96e3062471 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/fix_the_QAssitant_ftbfs.diff | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From aa85ab2be6be7cb3c4df68139a8271fc4c8c11c8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca@synchrotron-soleil.fr> | ||
| 3 | Date: Tue, 1 Mar 2011 21:49:23 +0100 | ||
| 4 | Subject: [PATCH] * fix the QAssitant ftbfs | ||
| 5 | |||
| 6 | --- | ||
| 7 | configure.py | 4 ++-- | ||
| 8 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
| 9 | |||
| 10 | diff --git a/configure.py b/configure.py | ||
| 11 | index 7ed9582..185ec9f 100644 | ||
| 12 | --- a/configure.py | ||
| 13 | +++ b/configure.py | ||
| 14 | @@ -354,10 +354,10 @@ class ConfigurePyQt4: | ||
| 15 | |||
| 16 | if opts.mwg_ssl_dir: | ||
| 17 | ass_lib_dirs = [os.path.join(opts.mwg_ssl_dir, "lib")] | ||
| 18 | - ass_libs = ["ssleay32", "libeay32"] | ||
| 19 | + ass_libs = ["ssleay32", "libeay32", "QtCore"] | ||
| 20 | else: | ||
| 21 | ass_lib_dirs = None | ||
| 22 | - ass_libs = None | ||
| 23 | + ass_libs = ["QtCore"] | ||
| 24 | |||
| 25 | # Note that the order in which we check is important for the | ||
| 26 | # consolidated module - a module's dependencies must be checked first. | ||
| 27 | -- | ||
| 28 | 1.7.4.1 | ||
| 29 | |||
diff --git a/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/pyqt-generated.patch b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/pyqt-generated.patch new file mode 100644 index 0000000000..0af5549535 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/pyqt-generated.patch | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | diff -uNr PyQt-x11-gpl-4.8.4.orig/QtGui/sipQtGuiQSystemTrayIcon.cpp PyQt-x11-gpl-4.8.4/QtGui/sipQtGuiQSystemTrayIcon.cpp | ||
| 2 | --- PyQt-x11-gpl-4.8.4.orig/QtGui/sipQtGuiQSystemTrayIcon.cpp 2012-08-01 16:37:34.000000000 +0200 | ||
| 3 | +++ PyQt-x11-gpl-4.8.4/QtGui/sipQtGuiQSystemTrayIcon.cpp 2012-08-01 17:05:45.000000000 +0200 | ||
| 4 | @@ -957,8 +957,6 @@ | ||
| 5 | qtgui_untrack(sipCpp); | ||
| 6 | #line 959 "QtGui/sipQtGuiQSystemTrayIcon.cpp" | ||
| 7 | |||
| 8 | - QSystemTrayIcon *sipCpp = reinterpret_cast<QSystemTrayIcon *>(sipCppV); | ||
| 9 | - | ||
| 10 | if (QThread::currentThread() == sipCpp->thread()) | ||
| 11 | delete sipCpp; | ||
| 12 | else | ||
| 13 | diff -uNr PyQt-x11-gpl-4.8.4.orig/QtGui/sipQtGuiQGraphicsScene.cpp PyQt-x11-gpl-4.8.4/QtGui/sipQtGuiQGraphicsScene.cpp | ||
| 14 | --- PyQt-x11-gpl-4.8.4.orig/QtGui/sipQtGuiQGraphicsScene.cpp 2012-08-01 16:37:35.000000000 +0200 | ||
| 15 | +++ PyQt-x11-gpl-4.8.4/QtGui/sipQtGuiQGraphicsScene.cpp 2012-08-01 17:26:58.000000000 +0200 | ||
| 16 | @@ -4016,8 +4016,6 @@ | ||
| 17 | qtgui_untrack(sipCpp); | ||
| 18 | #line 4018 "QtGui/sipQtGuiQGraphicsScene.cpp" | ||
| 19 | |||
| 20 | - QGraphicsScene *sipCpp = reinterpret_cast<QGraphicsScene *>(sipCppV); | ||
| 21 | - | ||
| 22 | if (QThread::currentThread() == sipCpp->thread()) | ||
| 23 | delete sipCpp; | ||
| 24 | else | ||
diff --git a/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/qreal_float_support.diff b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/qreal_float_support.diff new file mode 100644 index 0000000000..abdf70fab0 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python-pyqt-4.8.4/qreal_float_support.diff | |||
| @@ -0,0 +1,248 @@ | |||
| 1 | ## 03_qreal_float_support.dpatch by Michael Casadevall <sonicmctails@gmail.com> | ||
| 2 | Index: python-qt4-4.8.3/configure.py | ||
| 3 | =================================================================== | ||
| 4 | --- python-qt4-4.8.3.orig/configure.py 2011-02-24 10:33:30.000000000 +0200 | ||
| 5 | +++ python-qt4-4.8.3/configure.py 2011-02-24 10:33:18.000000000 +0200 | ||
| 6 | @@ -2004,8 +2004,9 @@ | ||
| 7 | out << "PyQt_NoOpenGLES\\n"; | ||
| 8 | #endif | ||
| 9 | |||
| 10 | - if (sizeof (qreal) != sizeof (double)) | ||
| 11 | +#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) | ||
| 12 | out << "PyQt_qreal_double\\n"; | ||
| 13 | +#endif | ||
| 14 | |||
| 15 | return 0; | ||
| 16 | } | ||
| 17 | Index: python-qt4-4.8.3/sip/QtCore/qlist.sip | ||
| 18 | =================================================================== | ||
| 19 | --- python-qt4-4.8.3.orig/sip/QtCore/qlist.sip 2011-02-24 10:33:27.000000000 +0200 | ||
| 20 | +++ python-qt4-4.8.3/sip/QtCore/qlist.sip 2011-02-24 10:33:18.000000000 +0200 | ||
| 21 | @@ -811,3 +811,227 @@ | ||
| 22 | return sipGetState(sipTransferObj); | ||
| 23 | %End | ||
| 24 | }; | ||
| 25 | + | ||
| 26 | +// If we're on an architecture where qreal != double, then we need to also | ||
| 27 | +// explicately handle doubles. On architectures where qreal == double, they | ||
| 28 | +// will automaticially be cast upwards | ||
| 29 | + | ||
| 30 | +%If (!PyQt_qreal_double) | ||
| 31 | + | ||
| 32 | +%If (Qt_4_3_0 -) | ||
| 33 | +// QList<QPair<double, double> > is implemented as a Python list of 2-element tuples. | ||
| 34 | +%MappedType QList<QPair<double, double> > | ||
| 35 | +{ | ||
| 36 | +%TypeHeaderCode | ||
| 37 | +#include <qlist.h> | ||
| 38 | +#include <qpair.h> | ||
| 39 | +%End | ||
| 40 | + | ||
| 41 | +%ConvertFromTypeCode | ||
| 42 | + // Create the list. | ||
| 43 | + PyObject *l; | ||
| 44 | + | ||
| 45 | + if ((l = PyList_New(sipCpp->size())) == NULL) | ||
| 46 | + return NULL; | ||
| 47 | + | ||
| 48 | + // Set the list elements. | ||
| 49 | + for (int i = 0; i < sipCpp->size(); ++i) | ||
| 50 | + { | ||
| 51 | + const QPair<double, double> &p = sipCpp->at(i); | ||
| 52 | + PyObject *pobj; | ||
| 53 | + | ||
| 54 | + if ((pobj = Py_BuildValue((char *)"dd", p.first, p.second)) == NULL) | ||
| 55 | + { | ||
| 56 | + Py_DECREF(l); | ||
| 57 | + | ||
| 58 | + return NULL; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + PyList_SET_ITEM(l, i, pobj); | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + return l; | ||
| 65 | +%End | ||
| 66 | + | ||
| 67 | +%ConvertToTypeCode | ||
| 68 | + SIP_SSIZE_T len; | ||
| 69 | + | ||
| 70 | + // Check the type if that is all that is required. | ||
| 71 | + if (sipIsErr == NULL) | ||
| 72 | + { | ||
| 73 | + if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0) | ||
| 74 | + return 0; | ||
| 75 | + | ||
| 76 | + for (SIP_SSIZE_T i = 0; i < len; ++i) | ||
| 77 | + { | ||
| 78 | + PyObject *tup = PySequence_ITEM(sipPy, i); | ||
| 79 | + | ||
| 80 | + if (!PySequence_Check(tup) || PySequence_Size(tup) != 2) | ||
| 81 | + return 0; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + return 1; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + QList<QPair<double, double> > *ql = new QList<QPair<double, double> >; | ||
| 88 | + len = PySequence_Size(sipPy); | ||
| 89 | + | ||
| 90 | + for (SIP_SSIZE_T i = 0; i < len; ++i) | ||
| 91 | + { | ||
| 92 | + PyObject *tup = PySequence_ITEM(sipPy, i); | ||
| 93 | + | ||
| 94 | + double first = PyFloat_AsDouble(PySequence_ITEM(tup, 0)); | ||
| 95 | + double second = PyFloat_AsDouble(PySequence_ITEM(tup, 1)); | ||
| 96 | + | ||
| 97 | + ql->append(QPair<double, double>(first, second)); | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + *sipCppPtr = ql; | ||
| 101 | + | ||
| 102 | + return sipGetState(sipTransferObj); | ||
| 103 | +%End | ||
| 104 | +}; | ||
| 105 | +%End | ||
| 106 | +%If (Qt_4_3_0 -) | ||
| 107 | +// QList<QPair<double, TYPE> > is implemented as a Python list of 2-element tuples. | ||
| 108 | +template<double, TYPE> | ||
| 109 | +%MappedType QList<QPair<double, TYPE> > | ||
| 110 | +{ | ||
| 111 | +%TypeHeaderCode | ||
| 112 | +#include <qlist.h> | ||
| 113 | +#include <qpair.h> | ||
| 114 | +%End | ||
| 115 | + | ||
| 116 | +%ConvertFromTypeCode | ||
| 117 | + // Create the list. | ||
| 118 | + PyObject *l; | ||
| 119 | + | ||
| 120 | + if ((l = PyList_New(sipCpp->size())) == NULL) | ||
| 121 | + return NULL; | ||
| 122 | + | ||
| 123 | + // Set the list elements. | ||
| 124 | + for (int i = 0; i < sipCpp->size(); ++i) | ||
| 125 | + { | ||
| 126 | + const QPair<double, TYPE> &p = sipCpp->at(i); | ||
| 127 | + TYPE *t = new TYPE(p.second); | ||
| 128 | + PyObject *pobj; | ||
| 129 | + | ||
| 130 | + if ((pobj = sipBuildResult(NULL, "(dB)", p.first, t, sipClass_TYPE, sipTransferObj)) == NULL) | ||
| 131 | + { | ||
| 132 | + Py_DECREF(l); | ||
| 133 | + delete t; | ||
| 134 | + | ||
| 135 | + return NULL; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + PyList_SET_ITEM(l, i, pobj); | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + return l; | ||
| 142 | +%End | ||
| 143 | + | ||
| 144 | +%ConvertToTypeCode | ||
| 145 | + SIP_SSIZE_T len; | ||
| 146 | + | ||
| 147 | + // Check the type if that is all that is required. | ||
| 148 | + if (sipIsErr == NULL) | ||
| 149 | + { | ||
| 150 | + if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0) | ||
| 151 | + return 0; | ||
| 152 | + | ||
| 153 | + for (SIP_SSIZE_T i = 0; i < len; ++i) | ||
| 154 | + { | ||
| 155 | + PyObject *tup = PySequence_ITEM(sipPy, i); | ||
| 156 | + | ||
| 157 | + if (!PySequence_Check(tup) || PySequence_Size(tup) != 2) | ||
| 158 | + return 0; | ||
| 159 | + | ||
| 160 | + if (!sipCanConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, SIP_NOT_NONE)) | ||
| 161 | + return 0; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + return 1; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + QList<QPair<double, TYPE> > *ql = new QList<QPair<double, TYPE> >; | ||
| 168 | + len = PySequence_Size(sipPy); | ||
| 169 | + | ||
| 170 | + for (SIP_SSIZE_T i = 0; i < len; ++i) | ||
| 171 | + { | ||
| 172 | + PyObject *tup = PySequence_ITEM(sipPy, i); | ||
| 173 | + double d; | ||
| 174 | + int state; | ||
| 175 | + | ||
| 176 | + d = PyFloat_AsDouble(PySequence_ITEM(tup, 0)); | ||
| 177 | + TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); | ||
| 178 | + | ||
| 179 | + if (*sipIsErr) | ||
| 180 | + { | ||
| 181 | + sipReleaseInstance(t, sipClass_TYPE, state); | ||
| 182 | + | ||
| 183 | + delete ql; | ||
| 184 | + return 0; | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + ql->append(QPair<double, TYPE>(d, *t)); | ||
| 188 | + | ||
| 189 | + sipReleaseInstance(t, sipClass_TYPE, state); | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + *sipCppPtr = ql; | ||
| 193 | + | ||
| 194 | + return sipGetState(sipTransferObj); | ||
| 195 | +%End | ||
| 196 | +}; | ||
| 197 | +%End | ||
| 198 | + | ||
| 199 | +// QList<double> is implemented as a Python list of doubles. | ||
| 200 | +%MappedType QList<double> | ||
| 201 | +{ | ||
| 202 | +%TypeHeaderCode | ||
| 203 | +#include <qlist.h> | ||
| 204 | +%End | ||
| 205 | + | ||
| 206 | +%ConvertFromTypeCode | ||
| 207 | + // Create the list. | ||
| 208 | + PyObject *l; | ||
| 209 | + | ||
| 210 | + if ((l = PyList_New(sipCpp->size())) == NULL) | ||
| 211 | + return NULL; | ||
| 212 | + | ||
| 213 | + // Set the list elements. | ||
| 214 | + for (int i = 0; i < sipCpp->size(); ++i) | ||
| 215 | + { | ||
| 216 | + PyObject *pobj; | ||
| 217 | + | ||
| 218 | + if ((pobj = PyFloat_FromDouble(sipCpp->value(i))) == NULL) | ||
| 219 | + { | ||
| 220 | + Py_DECREF(l); | ||
| 221 | + | ||
| 222 | + return NULL; | ||
| 223 | + } | ||
| 224 | + | ||
| 225 | + PyList_SET_ITEM(l, i, pobj); | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + return l; | ||
| 229 | +%End | ||
| 230 | + | ||
| 231 | +%ConvertToTypeCode | ||
| 232 | + // Check the type if that is all that is required. | ||
| 233 | + if (sipIsErr == NULL) | ||
| 234 | + return (PySequence_Check(sipPy) && PySequence_Size(sipPy) >= 0); | ||
| 235 | + | ||
| 236 | + QList<double> *ql = new QList<double>; | ||
| 237 | + SIP_SSIZE_T len = PySequence_Size(sipPy); | ||
| 238 | + | ||
| 239 | + for (SIP_SSIZE_T i = 0; i < len; ++i) | ||
| 240 | + ql->append(PyFloat_AsDouble(PySequence_ITEM(sipPy, i))); | ||
| 241 | + | ||
| 242 | + *sipCppPtr = ql; | ||
| 243 | + | ||
| 244 | + return sipGetState(sipTransferObj); | ||
| 245 | +%End | ||
| 246 | +}; | ||
| 247 | + | ||
| 248 | +%End | ||
diff --git a/meta-oe/recipes-devtools/python/python-pyqt_4.8.4.bb b/meta-oe/recipes-devtools/python/python-pyqt_4.8.4.bb new file mode 100644 index 0000000000..8bae09eef5 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python-pyqt_4.8.4.bb | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | DESCRIPTION = "Python Qt4 Bindings" | ||
| 2 | HOMEPAGE = "http://riverbankcomputing.co.uk" | ||
| 3 | AUTHOR = "Phil Thomson @ riverbank.co.uk" | ||
| 4 | SECTION = "devel/python" | ||
| 5 | LICENSE = "GPLv2 & GPLv3 & GPL_EXCEPTION" | ||
| 6 | LIC_FILES_CHKSUM = "\ | ||
| 7 | file://GPL_EXCEPTION.TXT;md5=b73b0be471db679533dc94781c14af58 \ | ||
| 8 | file://GPL_EXCEPTION_ADDENDUM.TXT;md5=c1e04ec2aa0911061005a801abf81e40 \ | ||
| 9 | file://OPENSOURCE-NOTICE.TXT;md5=6ad9123620cc04a22c394753ad4767d7 \ | ||
| 10 | file://LICENSE-MERGED-GPL2-GPL3;md5=53ced8933428255115039368cdca0aef \ | ||
| 11 | file://LICENSE.GPL2;md5=59bccd9d4dcaae9e668798337b91a022 \ | ||
| 12 | file://LICENSE.GPL3;md5=da83bb3624af9ff4808aa9ffc49fc582 \ | ||
| 13 | " | ||
| 14 | |||
| 15 | DEPENDS = "sip-native python-sip" | ||
| 16 | RDEPENDS_${PN} = "python-core" | ||
| 17 | SRCNAME = "pyqt" | ||
| 18 | |||
| 19 | PYQT_OE_VERSION = "Qt_4_7_1" | ||
| 20 | |||
| 21 | SRC_URI = "\ | ||
| 22 | http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-${PV}.tar.gz \ | ||
| 23 | \ | ||
| 24 | file://fix_qthelp_ftbfs.diff \ | ||
| 25 | file://fix_the_QAssitant_ftbfs.diff \ | ||
| 26 | file://assistantclient-fix.patch \ | ||
| 27 | file://pyqt-generated.patch;apply=no \ | ||
| 28 | " | ||
| 29 | SRC_URI[md5sum] = "97c5dc1042feb5b3fe20baabad055af1" | ||
| 30 | SRC_URI[sha256sum] = "fcfa3ecc0b4fad6d93227751b36a6f81ea104ee19dd26905f52de59f060b3e98" | ||
| 31 | S = "${WORKDIR}/PyQt-x11-gpl-${PV}" | ||
| 32 | |||
| 33 | # arm and mips machines need some extra patches | ||
| 34 | SRC_URI_append_arm = "\ | ||
| 35 | file://qreal_float_support.diff \ | ||
| 36 | " | ||
| 37 | |||
| 38 | SRC_URI_append_mipsel = "\ | ||
| 39 | file://qreal_float_support.diff \ | ||
| 40 | " | ||
| 41 | |||
| 42 | inherit qt4x11 sip distutils-base | ||
| 43 | |||
| 44 | PARALLEL_MAKE = "" | ||
| 45 | |||
| 46 | QMAKE_PROFILES = "pyqt.pro" | ||
| 47 | # NOTE: has to match with MIN(qt version we have in OE, last known Qt version by SIP/PyQt) | ||
| 48 | EXTRA_SIPTAGS = "-tWS_X11 -t${PYQT_OE_VERSION} -xVendorID -xPyQt_SessionManager -xPyQt_Accessibility" | ||
| 49 | EXTRA_OEMAKE = " MAKEFLAGS= " | ||
| 50 | |||
| 51 | # arm and mips need extra params for the qreal issue | ||
| 52 | EXTRA_SIPTAGS_append_arm = " -x PyQt_qreal_double" | ||
| 53 | EXTRA_SIPTAGS_append_mipsel = " -x PyQt_qreal_double" | ||
| 54 | |||
| 55 | SIP_MODULES = "QtCore QtDeclarative QtGui QtNetwork QtSql QtSvg QtXml QtWebKit" | ||
| 56 | MAKE_MODULES = "qpy ${SIP_MODULES}" | ||
| 57 | |||
| 58 | EXTRA_QMAKEVARS_POST += "\ | ||
| 59 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/Qt \ | ||
| 60 | INCLUDEPATH+=${STAGING_INCDIR}/${PYTHON_DIR} \ | ||
| 61 | INCLUDEPATH+=../qpy/QtCore \ | ||
| 62 | INCLUDEPATH+=../qpy/QtGui \ | ||
| 63 | INCLUDEPATH+=../qpy/QtDeclarative \ | ||
| 64 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtCore \ | ||
| 65 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtGui \ | ||
| 66 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtDeclarative \ | ||
| 67 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtWebKit \ | ||
| 68 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtNetwork \ | ||
| 69 | " | ||
| 70 | FIX_QREAL = "\ | ||
| 71 | " | ||
| 72 | |||
| 73 | do_generate_prepend() { | ||
| 74 | for i in ${FIX_QREAL}; do | ||
| 75 | sed -i -e s,qreal,float,g sip/$i | ||
| 76 | done | ||
| 77 | } | ||
| 78 | |||
| 79 | do_configure_prepend() { | ||
| 80 | printf "TEMPLATE=subdirs\nSUBDIRS=${MAKE_MODULES}\n" >pyqt.pro | ||
| 81 | printf "TEMPLATE=subdirs\nSUBDIRS=QtCore QtDeclarative QtGui\n" >qpy/qpy.pro | ||
| 82 | ln -sf ./qpycore.pro qpy/QtCore/QtCore.pro | ||
| 83 | ln -sf ./qpydeclarative.pro qpy/QtDeclarative/QtDeclarative.pro | ||
| 84 | ln -sf ./qpygui.pro qpy/QtGui/QtGui.pro | ||
| 85 | echo "INCLUDEPATH+=${S}/QtCore" >>qpy/QtCore/QtCore.pro | ||
| 86 | echo "INCLUDEPATH+=${S}/QtGui" >>qpy/QtGui/QtGui.pro | ||
| 87 | echo "INCLUDEPATH+=${S}/QtDeclarative" >>qpy/QtDeclarative/QtDeclarative.pro | ||
| 88 | echo "LIBS+=-L../qpy/QtGui/ -lqpygui" >>QtGui/QtGui.pro | ||
| 89 | echo "LIBS+=-L../qpy/QtCore/ -lqpycore" >>QtCore/QtCore.pro | ||
| 90 | echo "LIBS+=-L../qpy/QtDeclarative/ -lqpydeclarative" >>QtDeclarative/QtDeclarative.pro | ||
| 91 | # hack for broken generated code (duplicated sipCpp declaration). | ||
| 92 | patch -p1 < ${WORKDIR}/pyqt-generated.patch | ||
| 93 | } | ||
| 94 | |||
| 95 | do_install() { | ||
| 96 | install -d ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4 | ||
| 97 | for module in ${SIP_MODULES} | ||
| 98 | do | ||
| 99 | echo "from PyQt4.${module} import *\n" >> ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4/Qt.py | ||
| 100 | install -m 0755 ${module}/lib${module}.so ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4/${module}.so | ||
| 101 | done | ||
| 102 | cp -pPR elementtree ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4/ | ||
| 103 | cp __init__.py ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4/ | ||
| 104 | |||
| 105 | install -d ${STAGING_SIPDIR}/qt/ | ||
| 106 | install -d ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages | ||
| 107 | for module in ${SIP_MODULES} | ||
| 108 | do | ||
| 109 | install -m 0644 ${S}/sip/${module}/*.sip ${STAGING_SIPDIR}/qt/ | ||
| 110 | install -m 0755 ${module}/lib${module}.so ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/${module}.so | ||
| 111 | done | ||
| 112 | } | ||
| 113 | |||
| 114 | FILES_${PN} = "${libdir}/${PYTHON_DIR}/site-packages" | ||
| 115 | |||
