From a069f7e5b210a629a4cf209ffeb07d2f8c186b3b Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 24 Apr 2025 12:27:13 +0000 Subject: [PATCH] pyside6: include PySide6 recipes for Qt 6.9.1 Bring all pyside changes from 6.8 branch. Change-Id: I1cd88142421b6b8ff493aad110c50b22bd921f66 Reviewed-by: Mikko Gronoff --- coin/module_config.yaml | 11 +-- coin/test-python.inc | 2 + recipes-python/pyside6/python3-pyside6.inc | 35 +++++++++ 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 + 7 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 coin/test-python.inc 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/coin/module_config.yaml b/coin/module_config.yaml index 1675b53..1858d07 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -34,7 +34,7 @@ target1: &target1 variableValue: master.xml - type: EnvironmentVariable variableName: TEST_CONFIGS - variableValue: ci configs wayland + variableValue: ci configs wayland python enable_if: condition: property property: target.arch @@ -50,7 +50,7 @@ target2: &target2 variableValue: walnascar.xml - type: EnvironmentVariable variableName: TEST_CONFIGS - variableValue: ci configs + variableValue: ci configs python enable_if: condition: property property: target.arch @@ -66,7 +66,7 @@ target3: &target3 variableValue: scarthgap.xml - type: EnvironmentVariable variableName: TEST_CONFIGS - variableValue: ci configs mingw + variableValue: ci configs mingw python enable_if: condition: property property: target.arch @@ -82,7 +82,7 @@ target4: &target4 variableValue: styhead.xml - type: EnvironmentVariable variableName: TEST_CONFIGS - variableValue: ci configs wayland no-webengine + variableValue: ci configs wayland no-webengine python enable_if: condition: property property: target.arch @@ -98,7 +98,7 @@ target5: &target5 variableValue: kirkstone.xml - type: EnvironmentVariable variableName: TEST_CONFIGS - variableValue: ci configs wayland static no-webengine + variableValue: ci configs wayland static no-webengine python enable_if: condition: property property: target.arch @@ -149,6 +149,7 @@ instructions: bitbake-layers add-layer ../meta-openembedded/meta-python bitbake-layers add-layer ../meta-openembedded/meta-multimedia bitbake-layers add-layer ../meta-mingw + bitbake-layers add-layer ../meta-clang bitbake-layers add-layer ${SOURCE_DIR} for conf in ${TEST_CONFIGS}; do diff --git a/coin/test-python.inc b/coin/test-python.inc new file mode 100644 index 0000000..4797f7b --- /dev/null +++ b/coin/test-python.inc @@ -0,0 +1,2 @@ +RDEPENDS:${PN}:append:pn-packagegroup-qt6-addons = " python3-pyside6" + diff --git a/recipes-python/pyside6/python3-pyside6.inc b/recipes-python/pyside6/python3-pyside6.inc new file mode 100644 index 0000000..370bf1b --- /dev/null +++ b/recipes-python/pyside6/python3-pyside6.inc @@ -0,0 +1,35 @@ +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 'clang-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): + raise bb.parse.SkipRecipe('Requires meta-clang to be present.') +} + +inherit setuptools3 +inherit qt6-cmake + +require recipes-qt/qt6/qt6-git.inc + +QT_GIT_PROJECT = "pyside" +QT_MODULE = "pyside-setup" + +FILESEXTRAPATHS:prepend := "${THISDIR}/pyside6:" + +S = "${WORKDIR}/git" + +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..eb39269 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} += " \ + ${@bb.utils.contains('BBFILE_COLLECTIONS', 'clang-layer', 'python3-pyside6', '', d)} \ ${@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 32b7095..19106e4 100644 --- a/recipes-qt/qt6/qt6-git.inc +++ b/recipes-qt/qt6/qt6-git.inc @@ -22,6 +22,7 @@ SRCREV_tqtc-qmlcompilerplus = "00c367232150f1080687672db1e4af9c6642dc80" SRCREV_tqtc-qtinsighttracker = "944a86f172dfde51d0fdecd67b7e2a89b1b81255" SRCREV_tqtc-qtvncserver = "e44e6b5ddf54c239747d2f4d082f79e9ce8bde91" SRCREV_qt3d = "6a47efd5c39727747699c38cc4e380914ec326b9" +SRCREV_pyside-setup = "6d8aeadd355acceb880d20245ec92b0f8ec6c8a7" SRCREV_qt3d-assimp = "647f94648c0ae24b9c6684383a9dbbc0e2fc23b7" SRCREV_qt5compat = "26687803e3bd95577212a6fe27ae2a87b516c95c" SRCREV_qtbase = "e7247e9acda04186f4647bc1d93cb1501737813c"