From f697bb2f2501e507877952f6c5a816ba8452be69 Mon Sep 17 00:00:00 2001 From: Roy Kollen Svendsen Date: Tue, 25 Jun 2024 23:18:30 +0200 Subject: [PATCH] package/qt6/qt6shadertools: new package The Qt6::Gui module is needed when building the 'Qt Shader Baker' (qsb) host tool. Qsb is needed for converting the Qt6 Vulkan GLSL source code to platform specific shader languages which is then later copied to target. For more details take a look at: https://doc.qt.io/qt-6/qtshadertools-overview.html and https://doc.qt.io/qt-6/qshaderbaker.html We need host-qt6base with Gui support when building host-qt6shadertools, otherwise the build is skipped and no qsb host tool is generated: Skipping the build as the condition "TARGET Qt::Gui" is not met. qt6shadertools fail to build if qsb is not available: Failed to find the host tool "Qt6::qsb". It is part of the Qt6ShaderToolsTools package, but the package could not be found. Make sure you have built and installed the host ShaderTools module, which will ensure the creation of the Qt6ShaderToolsTools package. Signed-off-by: Roy Kollen Svendsen Signed-off-by: Thomas Petazzoni --- package/qt6/Config.in | 1 + package/qt6/qt6shadertools/Config.in | 17 ++++++++ .../qt6/qt6shadertools/qt6shadertools.hash | 10 +++++ package/qt6/qt6shadertools/qt6shadertools.mk | 42 +++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 package/qt6/qt6shadertools/Config.in create mode 100644 package/qt6/qt6shadertools/qt6shadertools.hash create mode 100644 package/qt6/qt6shadertools/qt6shadertools.mk diff --git a/package/qt6/Config.in b/package/qt6/Config.in index 276a0217ab..b7e95a6885 100644 --- a/package/qt6/Config.in +++ b/package/qt6/Config.in @@ -47,6 +47,7 @@ source "package/qt6/qt6base/Config.in" source "package/qt6/qt6core5compat/Config.in" source "package/qt6/qt6serialbus/Config.in" source "package/qt6/qt6serialport/Config.in" +source "package/qt6/qt6shadertools/Config.in" source "package/qt6/qt6svg/Config.in" endif diff --git a/package/qt6/qt6shadertools/Config.in b/package/qt6/qt6shadertools/Config.in new file mode 100644 index 0000000000..7f207c1541 --- /dev/null +++ b/package/qt6/qt6shadertools/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QT6SHADERTOOLS + bool "qt6shadertools" + # We need host-qt6base with Gui support when building + # host-qt6shadertools (itself a dependency of target + # qt6shadertools), otherwise the build is skipped and no qsb + # host tool is generated. + select BR2_PACKAGE_HOST_QT6BASE_GUI + select BR2_PACKAGE_QT6BASE_GUI + help + Qt is a cross-platform application and UI framework for + developers using C++. + + The Qt Shader Tools module builds on the SPIR-V Open + Source Ecosystem as described at the Khronos SPIR-V web + site. + + https://doc.qt.io/qt-6/qtshadertools-index.html diff --git a/package/qt6/qt6shadertools/qt6shadertools.hash b/package/qt6/qt6shadertools/qt6shadertools.hash new file mode 100644 index 0000000000..9cb423c90f --- /dev/null +++ b/package/qt6/qt6shadertools/qt6shadertools.hash @@ -0,0 +1,10 @@ +# Hash from: https://download.qt.io/official_releases/qt/6.7/6.7.2/submodules/qtshadertools-everywhere-src-6.7.2.tar.xz.sha256 +sha256 edfa34c0ac8c00fcaa949df1d8e7a77d89dadd6386e683ce6c3e3b117e2f7cc1 qtshadertools-everywhere-src-6.7.2.tar.xz + +# Hashes for license files: +sha256 9f0490f18656c6f2435bd14f603ef0c96434d1825615363dce43abb42ed1dcce LICENSES/BSD-3-Clause.txt +sha256 110535522396708cea37c72a802c5e7e81391139f5f7985631c93ef242b206a4 LICENSES/GFDL-1.3-no-invariants-only.txt +sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSES/GPL-2.0-only.txt +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSES/GPL-3.0-only.txt +sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768 LICENSES/LGPL-3.0-only.txt +sha256 40678d338ce53cd93f8b22b281a2ecbcaa3ee65ce60b25ffb0c462b0530846b2 LICENSES/Qt-GPL-exception-1.0.txt diff --git a/package/qt6/qt6shadertools/qt6shadertools.mk b/package/qt6/qt6shadertools/qt6shadertools.mk new file mode 100644 index 0000000000..660dc5a78d --- /dev/null +++ b/package/qt6/qt6shadertools/qt6shadertools.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# qt6shadertools +# +################################################################################ + +QT6SHADERTOOLS_VERSION = $(QT6_VERSION) +QT6SHADERTOOLS_SITE = $(QT6_SITE) +QT6SHADERTOOLS_SOURCE = qtshadertools-$(QT6_SOURCE_TARBALL_PREFIX)-$(QT6SHADERTOOLS_VERSION).tar.xz +QT6SHADERTOOLS_INSTALL_STAGING = YES +QT6SHADERTOOLS_SUPPORTS_IN_SOURCE_BUILD = NO + +QT6SHADERTOOLS_CMAKE_BACKEND = ninja + +QT6SHADERTOOLS_LICENSE = \ + Apache-2.0 or MIT (SPIRV-Cross), \ + GPL-2.0 or LGPL-3.0 or GPL-3.0, \ + GPL-3.0 (tests), GFDL-1.3 no invariants (docs), \ + GPL-3.0 WITH Qt-GPL-exception-1.0 (tools) + +QT6SHADERTOOLS_LICENSE_FILES = \ + LICENSES/GPL-2.0-only.txt \ + LICENSES/GPL-3.0-only.txt \ + LICENSES/LGPL-3.0-only.txt \ + LICENSES/GFDL-1.3-no-invariants-only.txt \ + LICENSES/Qt-GPL-exception-1.0.txt + +QT6SHADERTOOLS_CONF_OPTS = \ + -DBUILD_WITH_PCH=OFF \ + -DQT_BUILD_EXAMPLES=OFF \ + -DQT_BUILD_TESTS=OFF + +QT6SHADERTOOLS_DEPENDENCIES = \ + host-pkgconf \ + qt6base \ + host-qt6shadertools + +HOST_QT6SHADERTOOLS_DEPENDENCIES = \ + host-qt6base + +$(eval $(cmake-package)) +$(eval $(host-cmake-package))