From patchwork Sat Aug 18 21:02:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 959269 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41tCF64lLmz9s7X for ; Sun, 19 Aug 2018 07:02:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 88743867E6; Sat, 18 Aug 2018 21:02:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mu9h44jY5CjR; Sat, 18 Aug 2018 21:02:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B3E3387CC4; Sat, 18 Aug 2018 21:02:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 841011C2578 for ; Sat, 18 Aug 2018 21:02:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 81AD087CC4 for ; Sat, 18 Aug 2018 21:02:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MeMLszAl+MZe for ; Sat, 18 Aug 2018 21:02:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by hemlock.osuosl.org (Postfix) with ESMTP id 8B21686734 for ; Sat, 18 Aug 2018 21:02:12 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id C27B420DDC; Sat, 18 Aug 2018 23:02:10 +0200 (CEST) Received: from localhost (132.230.147.77.rev.sfr.net [77.147.230.132]) by mail.bootlin.com (Postfix) with ESMTPSA id 5ADB4207C8; Sat, 18 Aug 2018 23:02:10 +0200 (CEST) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Sat, 18 Aug 2018 23:02:08 +0200 Message-Id: <20180818210208.23097-1-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.14.4 Subject: [Buildroot] [PATCH] python-pyqt5: add Qt 5.11 compatibility patch X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , =?utf-8?q?Manuel_V?= =?utf-8?b?w7ZnZWxl?= MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 --- ...0004-drop-qttest-qtestmouse-waitforevents.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/python-pyqt5/0004-drop-qttest-qtestmouse-waitforevents.patch 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 + +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);