mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
29
package/python-pyqt5/0001-configure-skip-qtdetail.patch
Normal file
29
package/python-pyqt5/0001-configure-skip-qtdetail.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
Do not run qtdetail
|
||||
|
||||
qtdetail is a tool that generates qtdetail.out. Since this program is
|
||||
cross-compiled, it's not possible to run it on the host.
|
||||
|
||||
Consequently, python-pyqt5.mk generates the qtdetail.out file before
|
||||
calling configure.py.
|
||||
|
||||
Therefore, this patch makes sure that the pre-generated qtdetail.out
|
||||
file is kept, and that qtdetail is not executed.
|
||||
|
||||
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
||||
Signed-off-by: Sergey Kostanbaev <sergey.kostanbaev@gmail.com>
|
||||
---
|
||||
Index: PyQt5_gpl-5.7/configure.py
|
||||
===================================================================
|
||||
--- PyQt5_gpl-5.7.orig/configure.py
|
||||
+++ PyQt5_gpl-5.7/configure.py
|
||||
@@ -672,10 +672,6 @@ int main(int argc, char **argv)
|
||||
if cmd is None:
|
||||
error("Failed to determine the detail of your Qt installation. Try again using the --verbose flag to see more detail about the problem.")
|
||||
|
||||
- # Create the output file, first making sure it doesn't exist.
|
||||
- remove_file(out_file)
|
||||
- run_command(cmd, verbose)
|
||||
-
|
||||
if not os.access(out_file, os.F_OK):
|
||||
error("%s failed to create %s. Make sure your Qt installation is correct." % (cmd, out_file))
|
||||
|
28
package/python-pyqt5/0002-fix-qt-5.6.2.patch
Normal file
28
package/python-pyqt5/0002-fix-qt-5.6.2.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
Fix the build with Qt 5.6.{2,3}
|
||||
|
||||
Building PyQt 5.7 with versions of Qt older than Qt 5.7 is supposed to
|
||||
work, but currently fails in practice. In fact, this is due to the
|
||||
fact that the %Timeline variable in QtCoremod.sip didn't contain the
|
||||
5.6.{2,3} Qt versions, so if this version was used, PyQt was assuming it
|
||||
was the later version 5.7, and therefore started enabling APIs only
|
||||
available in Qt 5.7, causing build failures when building against Qt
|
||||
5.6.{2,3}.
|
||||
|
||||
Adding Qt_5_6_2 and Qt_5_6_3 to the timeline fixes this problem. This
|
||||
fix was suggested by Phil Thompson <phil@riverbankcomputing.com>.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: PyQt5_gpl-5.7/sip/QtCore/QtCoremod.sip
|
||||
===================================================================
|
||||
--- PyQt5_gpl-5.7.orig/sip/QtCore/QtCoremod.sip 2016-07-25 15:55:37.000000000 +0200
|
||||
+++ PyQt5_gpl-5.7/sip/QtCore/QtCoremod.sip 2016-10-26 15:45:43.577153825 +0200
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
%Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", version=1)
|
||||
|
||||
-%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_7_0}
|
||||
+%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_6_2 Qt_5_6_3 Qt_5_7_0}
|
||||
|
||||
%Platforms {WS_X11 WS_WIN WS_MACX}
|
||||
|
@@ -0,0 +1,27 @@
|
||||
From bb7cbdede46f72468bbb1b9bbefd43a1dbad21c0 Mon Sep 17 00:00:00 2001
|
||||
From: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
|
||||
Date: Mon, 30 Jan 2017 18:28:15 +0100
|
||||
Subject: [PATCH] remove WindowOkButtonHint and WindowCancelButtonHint from
|
||||
qnamespace.sip as they are removed from qt5.8
|
||||
|
||||
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
|
||||
---
|
||||
sip/QtCore/qnamespace.sip | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/sip/QtCore/qnamespace.sip b/sip/QtCore/qnamespace.sip
|
||||
index 2db83b7..559f410 100644
|
||||
--- a/sip/QtCore/qnamespace.sip
|
||||
+++ b/sip/QtCore/qnamespace.sip
|
||||
@@ -209,8 +209,6 @@ namespace Qt
|
||||
WindowContextHelpButtonHint,
|
||||
WindowShadeButtonHint,
|
||||
WindowStaysOnTopHint,
|
||||
- WindowOkButtonHint,
|
||||
- WindowCancelButtonHint,
|
||||
WindowStaysOnBottomHint,
|
||||
WindowCloseButtonHint,
|
||||
MacWindowToolBarButtonHint,
|
||||
--
|
||||
2.7.4
|
||||
|
@@ -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);
|
11
package/python-pyqt5/Config.in
Normal file
11
package/python-pyqt5/Config.in
Normal file
@@ -0,0 +1,11 @@
|
||||
comment "python-pyqt5 needs Qt5"
|
||||
depends on !BR2_PACKAGE_QT5
|
||||
|
||||
config BR2_PACKAGE_PYTHON_PYQT5
|
||||
bool "python-pyqt5"
|
||||
depends on BR2_PACKAGE_QT5
|
||||
select BR2_PACKAGE_PYTHON_SIP
|
||||
help
|
||||
Python bindings for Qt 5
|
||||
|
||||
http://www.riverbankcomputing.com/software/pyqt/
|
3
package/python-pyqt5/python-pyqt5.hash
Normal file
3
package/python-pyqt5/python-pyqt5.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# md5 from http://http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.7, sha256 locally computed
|
||||
md5 e3dc21f31fd714659f0688e1eb31bacf PyQt5_gpl-5.7.tar.gz
|
||||
sha256 892693ba5f79989abb2061dad2d5c4e6f127e9dd3240f73f8220c7152cd35b05 PyQt5_gpl-5.7.tar.gz
|
79
package/python-pyqt5/python-pyqt5.mk
Normal file
79
package/python-pyqt5/python-pyqt5.mk
Normal file
@@ -0,0 +1,79 @@
|
||||
################################################################################
|
||||
#
|
||||
# python-pyqt5
|
||||
#
|
||||
################################################################################
|
||||
|
||||
PYTHON_PYQT5_VERSION = 5.7
|
||||
PYTHON_PYQT5_SOURCE = PyQt5_gpl-$(PYTHON_PYQT5_VERSION).tar.gz
|
||||
PYTHON_PYQT5_SITE = http://downloads.sourceforge.net/project/pyqt/PyQt5/PyQt-$(PYTHON_PYQT5_VERSION)
|
||||
PYTHON_PYQT5_LICENSE = GPL-3.0
|
||||
PYTHON_PYQT5_LICENSE_FILES = LICENSE
|
||||
|
||||
PYTHON_PYQT5_DEPENDENCIES = python-sip host-python-sip qt5base
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PYTHON),y)
|
||||
PYTHON_PYQT5_PYTHON_DIR = python$(PYTHON_VERSION_MAJOR)
|
||||
PYTHON_PYQT5_RM_PORT_BASE = port_v3
|
||||
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
PYTHON_PYQT5_PYTHON_DIR = python$(PYTHON3_VERSION_MAJOR)
|
||||
PYTHON_PYQT5_RM_PORT_BASE = port_v2
|
||||
endif
|
||||
|
||||
PYTHON_PYQT5_QTDETAIL_LICENSE = Open Source
|
||||
|
||||
PYTHON_PYQT5_QTDETAIL_TYPE = shared
|
||||
|
||||
# Turn off features that aren't available in current qt configuration
|
||||
PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += $(if $(BR2_PACKAGE_QT5BASE_OPENGL),,PyQt_OpenGL)
|
||||
PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += $(if $(BR2_PACKAGE_QT5BASE_OPENGL_DESKTOP),,PyQt_Desktop_OpenGL)
|
||||
PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES += $(if $(BR2_PACKAGE_QT5BASE_OPENSSL),,PyQt_SSL)
|
||||
|
||||
define PYTHON_PYQT5_QTDETAIL
|
||||
echo $(1) >> $(2)/qtdetail.out
|
||||
endef
|
||||
|
||||
# Since we can't run generate qtdetail.out by running qtdetail on target device
|
||||
# we must generate the configuration.
|
||||
define PYTHON_PYQT5_GENERATE_QTDETAIL
|
||||
$(RM) -f $(1)/qtdetail.out
|
||||
$(call PYTHON_PYQT5_QTDETAIL,$(PYTHON_PYQT5_QTDETAIL_LICENSE),$(1))
|
||||
$(call PYTHON_PYQT5_QTDETAIL,$(PYTHON_PYQT5_QTDETAIL_TYPE),$(1))
|
||||
$(foreach f,$(PYTHON_PYQT5_QTDETAIL_DISABLE_FEATURES),
|
||||
$(call PYTHON_PYQT5_QTDETAIL,$(f),$(1)) \
|
||||
)
|
||||
endef
|
||||
|
||||
PYTHON_PYQT5_CONF_OPTS = \
|
||||
--bindir $(TARGET_DIR)/usr/bin \
|
||||
--destdir $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages \
|
||||
--qmake $(HOST_DIR)/bin/qmake \
|
||||
--sysroot $(STAGING_DIR)/usr \
|
||||
-w --confirm-license \
|
||||
--no-designer-plugin \
|
||||
--no-docstrings \
|
||||
--no-sip-files
|
||||
|
||||
define PYTHON_PYQT5_CONFIGURE_CMDS
|
||||
$(call PYTHON_PYQT5_GENERATE_QTDETAIL,$(@D))
|
||||
(cd $(@D); \
|
||||
$(TARGET_MAKE_ENV) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
$(HOST_DIR)/bin/python configure.py \
|
||||
$(PYTHON_PYQT5_CONF_OPTS) \
|
||||
)
|
||||
endef
|
||||
|
||||
define PYTHON_PYQT5_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
# __init__.py is needed to import PyQt5
|
||||
# __init__.pyc is needed if BR2_PACKAGE_PYTHON_PYC_ONLY is set
|
||||
define PYTHON_PYQT5_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install
|
||||
touch $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages/PyQt5/__init__.py
|
||||
$(RM) -rf $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages/PyQt5/uic/$(PYTHON_PYQT5_RM_PORT_BASE)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
Reference in New Issue
Block a user