From fb21821c4d52a2da2d9d1342832d9e7b1b7d6bf2 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 5 May 2025 09:15:30 +0000 Subject: [PATCH] pyside6: support clang from oe-core Clang recipes have been moved from meta-clang layer to oe-core in whinlatter. Add support for using pyside6 without meta-clang layer, but with the clang recipes from oe-core. Pick-to: 6.8 Change-Id: I62b74f34bbcbe37060117681034614168b43690d Reviewed-by: Mikko Gronoff --- conf/layer.conf | 3 +++ recipes-python/pyside6/python3-pyside6.inc | 4 ++-- recipes-qt/packagegroups/packagegroup-qt6-addons.bb | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/layer.conf b/conf/layer.conf index cf81231..8cbccc4 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -55,5 +55,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 index 370bf1b..b8d8c8c 100644 --- a/recipes-python/pyside6/python3-pyside6.inc +++ b/recipes-python/pyside6/python3-pyside6.inc @@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = " \ " python() { - if 'clang-layer' not in d.getVar('BBFILE_COLLECTIONS').split(): - raise bb.parse.SkipRecipe('Requires meta-clang to be present.') + if not bb.utils.to_boolean(d.getVar('CAN_USE_PYSIDE6')): + raise bb.parse.SkipRecipe('clang is not available.') } inherit setuptools3 diff --git a/recipes-qt/packagegroups/packagegroup-qt6-addons.bb b/recipes-qt/packagegroups/packagegroup-qt6-addons.bb index eb39269..1e53e49 100644 --- a/recipes-qt/packagegroups/packagegroup-qt6-addons.bb +++ b/recipes-qt/packagegroups/packagegroup-qt6-addons.bb @@ -8,7 +8,7 @@ inherit packagegroup PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" RDEPENDS:${PN} += " \ - ${@bb.utils.contains('BBFILE_COLLECTIONS', 'clang-layer', 'python3-pyside6', '', d)} \ + ${@'python3-pyside6' if bb.utils.to_boolean(d.getVar('CAN_USE_PYSIDE6')) else ''} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qt3d', '', d)} \ qt5compat \ qtapplicationmanager \