[Mod] First commit

This commit is contained in:
2022-10-31 22:18:58 +08:00
commit 1c8a3d9709
13090 changed files with 526733 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From 7ed5e15f2de747e383ba7eee66b646a7a66e6654 Mon Sep 17 00:00:00 2001
From: Sergey Kostanbaev <sergey.kostanbaev@gmail.com>
Date: Wed, 29 Dec 2021 12:30:12 -0800
Subject: [PATCH] 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>
Signed-off-by: Adam Duskett <aduskett@gmail.com>
Refresh for 5.15.6
diff --git a/configure.py b/configure.py
index daa0f94..32f5b21 100644
--- a/configure.py
+++ b/configure.py
@@ -2455,10 +2455,6 @@ def run_test_program(mname, test, verbose):
out_file = 'cfgtest_' + mname + '.out'
- # Create the output file, first making sure it doesn't exist.
- remove_file(out_file)
- run_command(test + ' ' + out_file, verbose)
-
if not os.access(out_file, os.F_OK):
error("%s failed to create %s. Make sure your Qt installation is correct." % (test, out_file))
--
2.33.1

View File

@ -0,0 +1,29 @@
From d004e17cd92f660cb386d91e14729a03cab087d4 Mon Sep 17 00:00:00 2001
From: Adam Duskett <aduskett@gmail.com>
Date: Sun, 22 May 2022 13:23:27 -0700
Subject: [PATCH] fix QtCoremod.sip syntax error
Fixes PyQt5/bindings/QtCore/QtCoremod.sip:23: syntax error from the
python-sip-4 package.
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
sip/QtCore/QtCoremod.sip | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sip/QtCore/QtCoremod.sip b/sip/QtCore/QtCoremod.sip
index b525bc5..1e2b8ba 100644
--- a/sip/QtCore/QtCoremod.sip
+++ b/sip/QtCore/QtCoremod.sip
@@ -20,7 +20,7 @@
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-%Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True, py_ssize_t_clean=True)
+%Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True)
%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_6_4 Qt_5_6_5 Qt_5_6_6 Qt_5_6_7 Qt_5_6_8 Qt_5_6_9 Qt_5_7_0 Qt_5_7_1 Qt_5_8_0 Qt_5_8_1 Qt_5_9_0 Qt_5_9_1 Qt_5_9_2 Qt_5_9_3 Qt_5_9_4 Qt_5_9_5 Qt_5_9_6 Qt_5_9_7 Qt_5_9_8 Qt_5_9_9 Qt_5_10_0 Qt_5_10_1 Qt_5_11_0 Qt_5_11_1 Qt_5_11_2 Qt_5_11_3 Qt_5_12_0 Qt_5_12_1 Qt_5_12_2 Qt_5_12_3 Qt_5_12_4 Qt_5_13_0 Qt_5_14_0 Qt_5_15_0}
--
2.36.1

View File

@ -0,0 +1,12 @@
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
select BR2_PACKAGE_QT5BASE_GUI
help
Python bindings for Qt 5
http://www.riverbankcomputing.com/software/pyqt/

View File

@ -0,0 +1,6 @@
# From https://pypi.org/pypi/PyQt5/json
md5 0c7fca60aa6ee13c235f68576d9c7bed PyQt5-5.15.6.tar.gz
# Locally calculated
sha256 80343bcab95ffba619f2ed2467fd828ffeb0a251ad7225be5fc06dcc333af452 PyQt5-5.15.6.tar.gz
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSE

View File

@ -0,0 +1,180 @@
################################################################################
#
# python-pyqt5
#
################################################################################
PYTHON_PYQT5_VERSION = 5.15.6
PYTHON_PYQT5_SOURCE = PyQt5-$(PYTHON_PYQT5_VERSION).tar.gz
PYTHON_PYQT5_SITE = https://files.pythonhosted.org/packages/3b/27/fd81188a35f37be9b3b4c2db1654d9439d1418823916fe702ac3658c9c41
PYTHON_PYQT5_LICENSE = GPL-3.0
PYTHON_PYQT5_LICENSE_FILES = LICENSE
PYTHON_PYQT5_DEPENDENCIES = python-sip host-python-sip qt5base
PYTHON_PYQT5_MODULES = \
QtCore QtGui \
$(if $(BR2_PACKAGE_QT5BASE_DBUS),QtDBus) \
$(if $(BR2_PACKAGE_QT5BASE_NETWORK),QtNetwork) \
$(if $(BR2_PACKAGE_QT5BASE_OPENGL_LIB),QtOpenGL) \
$(if $(BR2_PACKAGE_QT5BASE_PRINTSUPPORT),QtPrintSupport) \
$(if $(BR2_PACKAGE_QT5BASE_XML),QtXml)
ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y)
PYTHON_PYQT5_MODULES += QtWidgets
# QtSql needs QtWidgets
ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y)
PYTHON_PYQT5_MODULES += QtSql
endif
# QtTest needs QtWidgets
ifeq ($(BR2_PACKAGE_QT5BASE_TEST),y)
PYTHON_PYQT5_MODULES += QtTest
endif
# QtSvg needs QtWidgets
ifeq ($(BR2_PACKAGE_QT5SVG),y)
PYTHON_PYQT5_DEPENDENCIES += qt5svg
PYTHON_PYQT5_MODULES += QtSvg
endif
endif
ifeq ($(BR2_PACKAGE_QT5CONNECTIVITY),y)
PYTHON_PYQT5_DEPENDENCIES += qt5connectivity
PYTHON_PYQT5_MODULES += QtBluetooth QtNfc
endif
ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
PYTHON_PYQT5_DEPENDENCIES += qt5declarative
PYTHON_PYQT5_MODULES += QtQml
# QtQuick module needs opengl
ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK)$(BR2_PACKAGE_QT5BASE_OPENGL_LIB),yy)
PYTHON_PYQT5_MODULES += \
QtQuick \
$(if $(BR2_PACKAGE_QT5BASE_WIDGETS),QtQuickWidgets)
endif
endif
ifeq ($(BR2_PACKAGE_QT5ENGINIO),y)
PYTHON_PYQT5_DEPENDENCIES += qt5enginio
PYTHON_PYQT5_MODULES += Enginio
endif
ifeq ($(BR2_PACKAGE_QT5LOCATION),y)
PYTHON_PYQT5_DEPENDENCIES += qt5location
PYTHON_PYQT5_MODULES += QtPositioning
ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
PYTHON_PYQT5_MODULES += QtLocation
endif
endif
ifeq ($(BR2_PACKAGE_QT5MULTIMEDIA),y)
PYTHON_PYQT5_DEPENDENCIES += qt5multimedia
PYTHON_PYQT5_MODULES += \
QtMultimedia \
$(if $(BR2_PACKAGE_QT5BASE_WIDGETS),QtMultimediaWidgets)
endif
ifeq ($(BR2_PACKAGE_QT5SENSORS),y)
PYTHON_PYQT5_DEPENDENCIES += qt5sensors
PYTHON_PYQT5_MODULES += QtSensors
endif
ifeq ($(BR2_PACKAGE_QT5SERIALPORT),y)
PYTHON_PYQT5_DEPENDENCIES += qt5serialport
PYTHON_PYQT5_MODULES += QtSerialPort
endif
ifeq ($(BR2_PACKAGE_QT5WEBCHANNEL),y)
PYTHON_PYQT5_DEPENDENCIES += qt5webchannel
PYTHON_PYQT5_MODULES += QtWebChannel
endif
ifeq ($(BR2_PACKAGE_QT5WEBKIT),y)
PYTHON_PYQT5_DEPENDENCIES += qt5webkit
PYTHON_PYQT5_MODULES += \
QtWebKit \
$(if $(BR2_PACKAGE_QT5BASE_WIDGETS),QtWebKitWidgets)
endif
ifeq ($(BR2_PACKAGE_QT5WEBSOCKETS),y)
PYTHON_PYQT5_DEPENDENCIES += qt5websockets
PYTHON_PYQT5_MODULES += QtWebSockets
endif
ifeq ($(BR2_PACKAGE_QT5X11EXTRAS),y)
PYTHON_PYQT5_DEPENDENCIES += qt5x11extras
PYTHON_PYQT5_MODULES += QtX11Extras
endif
ifeq ($(BR2_PACKAGE_QT5XMLPATTERNS),y)
PYTHON_PYQT5_DEPENDENCIES += qt5xmlpatterns
PYTHON_PYQT5_MODULES += QtXmlPatterns
endif
PYTHON_PYQT5_QTCORE_LICENSE = Open Source
PYTHON_PYQT5_QTCORE_TYPE = shared
# Turn off features that aren't available in current qt configuration
PYTHON_PYQT5_QTCORE_DISABLE_FEATURES += $(if $(BR2_PACKAGE_QT5BASE_OPENGL),,PyQt_OpenGL)
PYTHON_PYQT5_QTCORE_DISABLE_FEATURES += $(if $(BR2_PACKAGE_QT5BASE_OPENGL_DESKTOP),,PyQt_Desktop_OpenGL)
PYTHON_PYQT5_QTCORE_DISABLE_FEATURES += $(if $(BR2_PACKAGE_OPENSSL),,PyQt_SSL)
define PYTHON_PYQT5_QTCORE
echo $(1) >> $(2)/cfgtest_QtCore.out
endef
# Since we can't run generate cfgtest_QtCore.out by running qtdetail on target device
# we must generate the configuration.
define PYTHON_PYQT5_GENERATE_QTCORE
$(RM) -f $(1)/cfgtest_QtCore.out
$(call PYTHON_PYQT5_QTCORE,$(PYTHON_PYQT5_QTCORE_LICENSE),$(1))
$(call PYTHON_PYQT5_QTCORE,$(PYTHON_PYQT5_QTCORE_TYPE),$(1))
$(foreach f,$(PYTHON_PYQT5_QTCORE_DISABLE_FEATURES),
$(call PYTHON_PYQT5_QTCORE,$(f),$(1)) \
)
endef
# The file "qt.conf" can be used to override the hard-coded paths that are
# compiled into the Qt library. We need it to make "qmake" relocatable and
# tweak the per-package install pathes
PYTHON_PYQT5_PRE_CONFIGURE_HOOKS += QT5_QT_CONF_FIXUP
PYTHON_PYQT5_CONF_OPTS = \
--bindir $(TARGET_DIR)/usr/bin \
--destdir $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
--qmake $(HOST_DIR)/bin/qmake \
--sysroot $(STAGING_DIR)/usr \
-w --confirm-license \
--no-designer-plugin \
--no-docstrings \
--no-sip-files \
--assume-shared \
$(foreach module,$(PYTHON_PYQT5_MODULES),--enable=$(module))
define PYTHON_PYQT5_CONFIGURE_CMDS
$(call PYTHON_PYQT5_GENERATE_QTCORE,$(@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
# Parallel install is not supported.
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) install
touch $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/PyQt5/__init__.py
$(RM) -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/PyQt5/uic/port_v2
endef
$(eval $(generic-package))