From a42f47294e1d715ca454438f7fbafd588ae82b84 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 9 Oct 2025 11:41:30 +0000 Subject: [PATCH] pyside6: include PySide6 recipes for Qt 6.10.1 Bring all pyside changes from 6.9 branch. Task-number: QTBUG-141036 Change-Id: I310622450504c782b52b4770b94e5ee66a8c2280 Reviewed-by: Ari Parkkila --- conf/layer.conf | 3 + recipes-python/pyside6/python3-pyside6.inc | 33 +++++++++ recipes-python/pyside6/python3-pyside6_git.bb | 71 +++++++++++++++++++ .../pyside6/python3-shiboken6_git.bb | 16 +++++ .../packagegroups/packagegroup-qt6-addons.bb | 1 + recipes-qt/qt6/qt6-git.inc | 1 + 6 files changed, 125 insertions(+) create mode 100644 recipes-python/pyside6/python3-pyside6.inc create mode 100644 recipes-python/pyside6/python3-pyside6_git.bb create mode 100644 recipes-python/pyside6/python3-shiboken6_git.bb diff --git a/conf/layer.conf b/conf/layer.conf index e122605..e1fc166 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -53,5 +53,8 @@ QT_COMMERCIAL_GIT_PROTOCOL ?= "ssh" QT_COMMERCIAL_MODULES ?= "0" +CAN_USE_PYSIDE6 = "${@True if 'clang-layer' in d.getVar('BBFILE_COLLECTIONS').split() or \ + os.path.exists(os.path.join(d.getVar('COREBASE'),'meta/recipes-devtools/clang')) else False}" + # License mapping back to old license files SPDXLICENSEMAP[GFDL-1.3-no-invariants-only] = "GFDL-1.3" diff --git a/recipes-python/pyside6/python3-pyside6.inc b/recipes-python/pyside6/python3-pyside6.inc new file mode 100644 index 0000000..22d6720 --- /dev/null +++ b/recipes-python/pyside6/python3-pyside6.inc @@ -0,0 +1,33 @@ +LICENSE = "The-Qt-Company-Commercial | (GPL-3.0-only & Qt-GPL-exception-1.0) & (LGPL-3.0-only | GPL-2.0-only | GPL-3.0-only)" +LIC_FILES_CHKSUM = " \ + file://LICENSES/BSD-3-Clause.txt;md5=cb40fa7520502d8c7a3aea47cae1316c \ + file://LICENSES/GFDL-1.3-no-invariants-only.txt;md5=a22d0be1ce2284b67950a4d1673dd1b0 \ + file://LICENSES/GPL-2.0-only.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSES/GPL-3.0-only.txt;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSES/LGPL-3.0-only.txt;md5=e6a600fd5e1d9cbde2d983680233ad02 \ + file://LICENSES/LicenseRef-Qt-Commercial.txt;md5=40a1036f91cefc0e3fabad241fb5f187 \ + file://LICENSES/Qt-GPL-exception-1.0.txt;md5=9a13522cd91a88fba784baf16ea66af8 \ +" + +python() { + if not bb.utils.to_boolean(d.getVar('CAN_USE_PYSIDE6')): + raise bb.parse.SkipRecipe('clang is not available.') +} + +inherit setuptools3 +inherit qt6-cmake + +require recipes-qt/qt6/qt6-git.inc + +QT_GIT_PROJECT = "pyside" +QT_MODULE = "pyside-setup" + +FILESEXTRAPATHS:prepend := "${THISDIR}/pyside6:" + +EXTRA_OECMAKE += "\ + -DBUILD_TESTS=FALSE \ + -DQFP_PYTHON_SITE_PACKAGES=${PYTHON_SITEPACKAGES_DIR} \ +" +EXTRA_OECMAKE:append:class-target = " -DQFP_SHIBOKEN_HOST_PATH=${STAGING_EXECPREFIXDIR} -DQFP_PYTHON_HOST_PATH=${PYTHON}" + +INSANE_SKIP:${PN} += "already-stripped" diff --git a/recipes-python/pyside6/python3-pyside6_git.bb b/recipes-python/pyside6/python3-pyside6_git.bb new file mode 100644 index 0000000..b9ec7d8 --- /dev/null +++ b/recipes-python/pyside6/python3-pyside6_git.bb @@ -0,0 +1,71 @@ +require python3-pyside6.inc + +DEPENDS += "\ + python3-shiboken6 \ + python3-shiboken6-native \ + ${PYSIDE_QT_MODULES} \ +" +PYSIDE_QT_MODULES ?= "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qt3d', '', d)} \ + qtbase \ + qtcharts \ + qtconnectivity \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qtdatavis3d', '', d)} \ + qtdeclarative \ + qtdeclarative-native \ + qtgraphs \ + ${@bb.utils.contains('QT_COMMERCIAL_MODULES', '1', 'qthttpserver', '', d)} \ + qtlocation \ + qtmultimedia \ + qtnetworkauth \ + qtpositioning \ + qtquick3d \ + qtquick3d-native \ + qtremoteobjects \ + qtremoteobjects-native \ + qtscxml \ + qtscxml-native \ + qtsensors \ + qtserialbus \ + qtserialport \ + qtspeech \ + qtsvg \ + qttools \ + qtwebchannel \ + ${@bb.utils.contains('DISTRO_FEATURES', 'webengine', 'qtwebengine', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'webengine', 'qtpdf', '', d)} \ + qtwebsockets \ +" + +OECMAKE_SOURCEPATH = "${S}/sources/pyside6" + +export LLVM_INSTALL_DIR = "${STAGING_DIR_NATIVE}${exec_prefix}" + +PYSIDE_COMPILER = "${HOST_SYS}-g++" +PYSIDE_COMPILER:toolchain-clang = "${HOST_SYS}-clang++" +# Workaround big.LITTLE architecture args not supported by clang +PYSIDE_COMPILER_FLAGS = "${@d.getVar('HOST_CC_ARCH') \ + .replace('cortex-a15.cortex','cortex') \ + .replace('cortex-a17.cortex','cortex') \ + .replace('cortex-a57.cortex','cortex') \ + .replace('cortex-a72.cortex','cortex') \ + .replace('cortex-a73.cortex','cortex') \ + .replace('cortex-a75.cortex','cortex') \ + .replace('cortex-a76.cortex','cortex')} \ +" + +EXTRA_OECMAKE += "\ + -DSTANDALONE=ON \ + -DPYSIDE_TREAT_QT_INCLUDE_DIRS_AS_NON_SYSTEM=ON \ + -DSHIBOKEN_GENERATOR_EXTRA_FLAGS='\ + --clang-options=--sysroot=${STAGING_DIR_TARGET},--target=${HOST_SYS},${@d.getVar('PYSIDE_COMPILER_FLAGS').replace(' ',',')} \ + --compiler-path=${PYSIDE_COMPILER} \ + ' \ +" + +FILES:${PN} += "\ + ${QT6_INSTALL_PLUGINSDIR}/designer \ +" +FILES:${PN}-dev += "\ + ${datadir}/PySide6 \ +" diff --git a/recipes-python/pyside6/python3-shiboken6_git.bb b/recipes-python/pyside6/python3-shiboken6_git.bb new file mode 100644 index 0000000..2b40ceb --- /dev/null +++ b/recipes-python/pyside6/python3-shiboken6_git.bb @@ -0,0 +1,16 @@ +require python3-pyside6.inc + +DEPENDS += "qtbase clang-native python3-shiboken6-native" + +OECMAKE_SOURCEPATH = "${S}/sources/shiboken6" + +EXTRA_OECMAKE += "-DSHIBOKEN_BUILD_LIBS=ON" + +do_install:append() { + # shiboken6.pc in package python3-shiboken6-dev contains reference to TMPDIR [buildpaths] + sed -i ${D}${QT6_INSTALL_LIBDIR}/pkgconfig/shiboken6.pc \ + -e '/^python_/d' \ + -e 's|${RECIPE_SYSROOT}||' +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-qt/packagegroups/packagegroup-qt6-addons.bb b/recipes-qt/packagegroups/packagegroup-qt6-addons.bb index 8deaf8c..1e53e49 100644 --- a/recipes-qt/packagegroups/packagegroup-qt6-addons.bb +++ b/recipes-qt/packagegroups/packagegroup-qt6-addons.bb @@ -8,6 +8,7 @@ inherit packagegroup PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" RDEPENDS:${PN} += " \ + ${@'python3-pyside6' if bb.utils.to_boolean(d.getVar('CAN_USE_PYSIDE6')) else ''} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qt3d', '', d)} \ qt5compat \ qtapplicationmanager \ diff --git a/recipes-qt/qt6/qt6-git.inc b/recipes-qt/qt6/qt6-git.inc index c0d5ac0..5522831 100644 --- a/recipes-qt/qt6/qt6-git.inc +++ b/recipes-qt/qt6/qt6-git.inc @@ -19,6 +19,7 @@ PV = "${QT_VERSION}" SRCREV = "${SRCREV_${QT_MODULE}}" +SRCREV_pyside-setup = "761295bb806a814f92e6f03916230b96439a2f67" SRCREV_tqtc-qmlcompilerplus = "610a89e69b64a2be869e62375a159e918e50b664" SRCREV_tqtc-qtinsighttracker = "abd565816e33fff3a283bc3a9c1f3cf6fcb8f9f4" SRCREV_tqtc-qtvncserver = "f84a1de59d0c739f6ebd45d033c398572d416ff8"