aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-08-18 23:02:08 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-08-19 21:50:34 +0200
commitdf5bf982de4b038d0af18a09d98ce34d94c3ae95 (patch)
treea276077d7f9c173db88d458e895c46aa9b89a575
parent052d3cbb0ea6aec7123b8595780d6f819dc7c925 (diff)
downloadbuildroot-df5bf982de4b038d0af18a09d98ce34d94c3ae95.tar.gz
buildroot-df5bf982de4b038d0af18a09d98ce34d94c3ae95.tar.bz2
python-pyqt5: add Qt 5.11 compatibility patch
This commit adds a patch to python-pyqt5 to make it build properly against Qt 5.11. PyQt5 is using a dual-licensing model, and the commercial company behind it (RiverBank) only provides release tarballs, and no public Git repository, so we cannot see the individual changes they make. By diffing the PyQt5 5.10 and 5.11 releases, we could see that they opted for dropping entirely support for the waitForEvents() method, rather than keeping it for Qt < 5.11. We take the same approach in the below patch, since this is anyway what will happen when we will bump to PyQt5 5.11. The patch is not Git-formatted, because there is no upstream Git repository for this project. Fixes: http://autobuild.buildroot.net/results/1f1e92374fe71a1d4343243db5f530c33db06698/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/python-pyqt5/0004-drop-qttest-qtestmouse-waitforevents.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/python-pyqt5/0004-drop-qttest-qtestmouse-waitforevents.patch b/package/python-pyqt5/0004-drop-qttest-qtestmouse-waitforevents.patch
new file mode 100644
index 0000000000..352be9aee0
--- /dev/null
+++ b/package/python-pyqt5/0004-drop-qttest-qtestmouse-waitforevents.patch
@@ -0,0 +1,32 @@
+Drop waitForEvents() method from qtestmouse
+
+This method was dropped in Qt 5.11:
+
+ https://github.com/qt/qtbase/commit/75e583b3fcbdbbb999633eb5f2267720dd695cfa
+
+However, Python PyQt5 still generates a wrapper for it, causing a
+build failure. The upstream PyQt5 maintainers have not kept
+waitForEvents() support for older Qt versions, and instead entirely
+dropped it unconditionally. This can be verified by diffing PyQt 5.10
+and PyQt 5.11. We take the same approach, and drop waitForEvents()
+unconditionally, even when PyQt5 is built against the older Qt 5.6.
+
+Fedora is using a similar solution:
+https://src.fedoraproject.org/rpms/python-qt5/c/47fb7fdc5d16582772f9c3fc8a6a674a41a7f605?branch=master.
+
+This patch can be dropped when PyQt5 is bumped to its 5.11 version.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+
+Index: b/sip/QtTest/qtestmouse.sip
+===================================================================
+--- a/sip/QtTest/qtestmouse.sip
++++ b/sip/QtTest/qtestmouse.sip
+@@ -41,7 +41,6 @@
+ void mousePress(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay = -1);
+ void mouseRelease(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay = -1);
+ void mouseEvent(QTest::MouseAction action, QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier, QPoint pos, int delay = -1);
+- void waitForEvents() /ReleaseGIL/;
+ void mouseEvent(QTest::MouseAction action, QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers modifier, QPoint pos, int delay = -1);
+ void mousePress(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers modifier = Qt::KeyboardModifiers(), QPoint pos = QPoint(), int delay = -1);
+ void mouseRelease(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers modifier = Qt::KeyboardModifiers(), QPoint pos = QPoint(), int delay = -1);