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.

Pick-to: 6.3 6.2
Change-Id: I673a06685b44a5f0f5518ae51bc45956432739a4
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
This commit is contained in:
Samuli Piippo 2022-05-17 10:33:39 +00:00
parent ec7e50bbaf
commit 7b0817669a
13 changed files with 104 additions and 45 deletions

View File

@ -36,10 +36,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
-----------

View File

@ -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"

View File

@ -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"

View File

@ -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)} \
"

View File

@ -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 \
"

View File

@ -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 \
"

View File

@ -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)} \
"

View File

@ -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 \

View File

@ -0,0 +1,12 @@
DESCRIPTION = "Qt6 commercial addon modules"
LICENSE = "MIT"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
RDEPENDS:${PN} += " \
qmlcompilerplus \
"

View File

@ -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)} \
"

View File

@ -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"

View File

@ -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}"

View File

@ -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