From bc210937b8b4e2988671ef560eabce8d2b2bfeb3 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 17 May 2022 10:33:39 +0000 Subject: [PATCH] Update handling of commercial modules Add new packagegroup for all commercial-only Qt addon modules and add new variable QT_COMMERCIAL_MODULES which can be used to control if the modules are included in the build. The same variable also turns on the use of Qt QML Compiler. Use common include file for the commercial modules. Change-Id: I673a06685b44a5f0f5518ae51bc45956432739a4 Reviewed-by: Nicholas Bennett Reviewed-by: Mikko Gronoff (cherry picked from commit 7b0817669a356a268d0b87d2ade4de5f817c7f01) Reviewed-by: Qt Cherry-pick Bot --- README.md | 15 +++++--- coin/test-configs.inc | 4 +-- conf/layer.conf | 2 ++ ...-packagegroup-qt6-toolchain-host-addons.bb | 31 +++++++++++++++++ ...kagegroup-qt6-toolchain-host-commercial.bb | 11 ++++++ ...kagegroup-qt6-toolchain-host-essentials.bb | 18 ++++++++++ ...tivesdk-packagegroup-qt6-toolchain-host.bb | 34 ++++--------------- .../packagegroups/packagegroup-qt6-addons.bb | 1 - .../packagegroup-qt6-commercial-modules.bb | 12 +++++++ .../packagegroups/packagegroup-qt6-modules.bb | 1 + recipes-qt/qt6/qmlcompilerplus_git.bb | 10 +----- recipes-qt/qt6/qt6-commercial.inc | 8 +++++ recipes-qt/qt6/qt6.inc | 2 +- 13 files changed, 104 insertions(+), 45 deletions(-) create mode 100644 recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-addons.bb create mode 100644 recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-commercial.bb create mode 100644 recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-essentials.bb create mode 100644 recipes-qt/packagegroups/packagegroup-qt6-commercial-modules.bb create mode 100644 recipes-qt/qt6/qt6-commercial.inc diff --git a/README.md b/README.md index 7d1d6c5..e82a2ec 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,17 @@ Qt is dual-licensed under commercial and open source licenses. The license can be selected using the `QT_EDITION` variable. `commercial` and `opensource` are valid values. The default value is `opensource`. -For commercial Qt users, the layer provides LTS (Long Term Support) releases -for selected Qt versions. These are available in branches named `lts-6.x`. -The LTS versions can only be built and used if you have a commercial Qt license -and you have set up SSH access to Qt Gerrit (see links below). +For commercial Qt users, the layer provides additional support with LTS +(Long Term Support) releases for selected Qt versions and additional +Qt modules licensed as commercial-only. + +The LTS releases are available in branches named `lts-6.x`. The source code +for the LTS releases and the commercial Qt modules are only available for +commercial Qt license holders. They can only be built and used if you have +a commercial Qt license and you have set up SSH access to Qt Gerrit (see links below). + +The commercial Qt modules are included in the build if the `QT_COMMERCIAL_MODULES` +variable is set to `1` and you are using a commercial edition of Qt. QtWebEngine ----------- diff --git a/coin/test-configs.inc b/coin/test-configs.inc index 4ecdc49..71136b8 100644 --- a/coin/test-configs.inc +++ b/coin/test-configs.inc @@ -13,8 +13,8 @@ INHERIT += "rm_work" # default to commercial Qt QT_EDITION = "commercial" -# enable Qt QML Compiler -ENABLE_QMLCOMPILER = "1" +# include commercial addons and enable Qt QML Compiler +QT_COMMERCIAL_MODULES = "1" # fast compression of SDK tar package SDK_XZ_COMPRESSION_LEVEL = "-1" diff --git a/conf/layer.conf b/conf/layer.conf index a9a82e1..43fb05f 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -40,6 +40,8 @@ QT_GIT ?= "git://code.qt.io" QT_GIT_PROTOCOL ?= "git" QT_EDITION ?= "opensource" +QT_COMMERCIAL_MODULES ?= "0" + # License mapping back to old license files SPDXLICENSEMAP[GPL-3.0-only] = "GPL-3.0" SPDXLICENSEMAP[LGPL-3.0-only] = "LGPL-3.0" diff --git a/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-addons.bb b/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-addons.bb new file mode 100644 index 0000000..299368d --- /dev/null +++ b/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-addons.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "Qt6 development host addon packages" +LICENSE = "MIT" + +# disable sanity check for allarch packagegroup +PACKAGE_ARCH = "" + +inherit packagegroup nativesdk + +PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" + +RDEPENDS:${PN} += " \ + nativesdk-qtapplicationmanager-dev \ + nativesdk-qtapplicationmanager-tools \ + nativesdk-qtquick3d-dev \ + nativesdk-qtquick3d-tools \ + nativesdk-qtremoteobjects-dev \ + nativesdk-qtremoteobjects-tools \ + nativesdk-qtscxml-dev \ + nativesdk-qtscxml-tools \ + nativesdk-qtshadertools-dev \ + nativesdk-qtshadertools-tools \ + nativesdk-qtwayland-dev \ + nativesdk-qtwayland-tools \ + ${FORLINUXHOST} \ +" + +FORLINUXHOST:mingw32 = "" +FORLINUXHOST = " \ + ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'nativesdk-qtinterfaceframework-dev nativesdk-qtinterfaceframework-tools', '', d)} \ +" + diff --git a/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-commercial.bb b/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-commercial.bb new file mode 100644 index 0000000..fb301e0 --- /dev/null +++ b/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-commercial.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "Qt6 development host commercial packages" +LICENSE = "MIT" + +inherit packagegroup nativesdk + +PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" + +RDEPENDS:${PN} += " \ + nativesdk-qmlcompilerplus-dev \ + nativesdk-qmlcompilerplus-tools \ +" diff --git a/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-essentials.bb b/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-essentials.bb new file mode 100644 index 0000000..c055089 --- /dev/null +++ b/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host-essentials.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Qt6 development host essential packages" +LICENSE = "MIT" + +# disable sanity check for allarch packagegroup +#PACKAGE_ARCH = "" + +inherit packagegroup nativesdk + +PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" + +RDEPENDS:${PN} += " \ + nativesdk-qtbase-dev \ + nativesdk-qtbase-tools \ + nativesdk-qtdeclarative-dev \ + nativesdk-qtdeclarative-tools \ + nativesdk-qttools-dev \ + nativesdk-qttools-tools \ +" diff --git a/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host.bb b/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host.bb index af535f6..800e5b8 100644 --- a/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host.bb +++ b/recipes-qt/packagegroups/nativesdk-packagegroup-qt6-toolchain-host.bb @@ -1,43 +1,21 @@ DESCRIPTION = "Qt6 development host packages" LICENSE = "MIT" -# disable sanity check for allarch packagegroup -PACKAGE_ARCH = "" - inherit packagegroup nativesdk PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" RDEPENDS:${PN} += " \ nativesdk-make \ - nativesdk-cmake \ - nativesdk-ninja \ - nativesdk-perl-modules \ - ${@bb.utils.contains('ENABLE_QMLCOMPILER', '1', 'nativesdk-qmlcompilerplus-dev nativesdk-qmlcompilerplus-tools', '', d)} \ - nativesdk-qtapplicationmanager-dev \ - nativesdk-qtapplicationmanager-tools \ - nativesdk-qtbase-dev \ - nativesdk-qtbase-tools \ - nativesdk-qtdeclarative-dev \ - nativesdk-qtdeclarative-tools \ - ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'nativesdk-qtinterfaceframework-dev nativesdk-qtinterfaceframework-tools', '', d)} \ - nativesdk-qtquick3d-dev \ - nativesdk-qtquick3d-tools \ - nativesdk-qtremoteobjects-dev \ - nativesdk-qtremoteobjects-tools \ - nativesdk-qtscxml-dev \ - nativesdk-qtscxml-tools \ - nativesdk-qtshadertools-dev \ - nativesdk-qtshadertools-tools \ - nativesdk-qttools-dev \ - nativesdk-qttools-tools \ - nativesdk-qtwayland-dev \ - nativesdk-qtwayland-tools \ + nativesdk-packagegroup-qt6-toolchain-host-essentials \ + nativesdk-packagegroup-qt6-toolchain-host-addons \ + ${@bb.utils.contains('QT_COMMERCIAL_MODULES', '1', 'nativesdk-packagegroup-qt6-toolchain-host-commercial', '', d)} \ + ${FORLINUXHOST} \ " -RDEPENDS:${PN}:remove:mingw32 = " \ +FORLINUXHOST:mingw32 = "" +FORLINUXHOST = " \ nativesdk-cmake \ nativesdk-ninja \ nativesdk-perl-modules \ - ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'nativesdk-qtinterfaceframework-dev nativesdk-qtinterfaceframework-tools', '', d)} \ " diff --git a/recipes-qt/packagegroups/packagegroup-qt6-addons.bb b/recipes-qt/packagegroups/packagegroup-qt6-addons.bb index d25a6bf..64f334a 100644 --- a/recipes-qt/packagegroups/packagegroup-qt6-addons.bb +++ b/recipes-qt/packagegroups/packagegroup-qt6-addons.bb @@ -8,7 +8,6 @@ inherit packagegroup PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" RDEPENDS:${PN} += " \ - ${@bb.utils.contains('ENABLE_QMLCOMPILER', '1', 'qmlcompilerplus', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qt3d', '', d)} \ qt5compat \ qtapplicationmanager \ diff --git a/recipes-qt/packagegroups/packagegroup-qt6-commercial-modules.bb b/recipes-qt/packagegroups/packagegroup-qt6-commercial-modules.bb new file mode 100644 index 0000000..0962f0c --- /dev/null +++ b/recipes-qt/packagegroups/packagegroup-qt6-commercial-modules.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "Qt6 commercial addon modules" +LICENSE = "MIT" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" + +RDEPENDS:${PN} += " \ + qmlcompilerplus \ +" diff --git a/recipes-qt/packagegroups/packagegroup-qt6-modules.bb b/recipes-qt/packagegroups/packagegroup-qt6-modules.bb index da1c79e..780de1d 100644 --- a/recipes-qt/packagegroups/packagegroup-qt6-modules.bb +++ b/recipes-qt/packagegroups/packagegroup-qt6-modules.bb @@ -10,4 +10,5 @@ PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1" RDEPENDS:${PN} += " \ packagegroup-qt6-essentials \ packagegroup-qt6-addons \ + ${@bb.utils.contains('QT_COMMERCIAL_MODULES', '1', 'packagegroup-qt6-commercial-modules', '', d)} \ " diff --git a/recipes-qt/qt6/qmlcompilerplus_git.bb b/recipes-qt/qt6/qmlcompilerplus_git.bb index a329e2d..ee9f78b 100644 --- a/recipes-qt/qt6/qmlcompilerplus_git.bb +++ b/recipes-qt/qt6/qmlcompilerplus_git.bb @@ -7,15 +7,7 @@ inherit qt6-cmake include recipes-qt/qt6/qt6-git.inc include recipes-qt/qt6/qt6.inc - -python() { - if d.getVar('QT_EDITION') != 'commercial': - raise bb.parse.SkipRecipe('Available only with Commercial Qt') -} - -QT_GIT = "git://codereview.qt-project.org" -QT_GIT_PROTOCOL = "ssh" -QT_MODULE = "tqtc-qmlcompilerplus" +include recipes-qt/qt6/qt6-commercial.inc DEPENDS += "qtbase qtdeclarative qtdeclarative-native" diff --git a/recipes-qt/qt6/qt6-commercial.inc b/recipes-qt/qt6/qt6-commercial.inc new file mode 100644 index 0000000..640757d --- /dev/null +++ b/recipes-qt/qt6/qt6-commercial.inc @@ -0,0 +1,8 @@ +python() { + if d.getVar('QT_EDITION') != 'commercial': + raise bb.parse.SkipRecipe('Available only with Commercial Qt') +} + +QT_GIT = "git://codereview.qt-project.org" +QT_GIT_PROTOCOL = "ssh" +QT_MODULE = "tqtc-${BPN}" diff --git a/recipes-qt/qt6/qt6.inc b/recipes-qt/qt6/qt6.inc index e6a1c10..b3610ea 100644 --- a/recipes-qt/qt6/qt6.inc +++ b/recipes-qt/qt6/qt6.inc @@ -21,7 +21,7 @@ python __anonymous() { d.setVar("PACKAGE_ARCH", tarch) } -ENABLE_QMLCOMPILER ?= '0' +ENABLE_QMLCOMPILER ?= "${QT_COMMERCIAL_MODULES}" python __anonymous() { if (d.getVar('QT_EDITION', True) != 'commercial' or d.getVar('ENABLE_QMLCOMPILER', True) == '0' or