diff mbox series

[1/1] package/qt6/qt6shadertools: new package

Message ID 20230808172231.1114696-1-jesse.vangavere@scioteq.com
State Changes Requested
Headers show
Series [1/1] package/qt6/qt6shadertools: new package | expand

Commit Message

Jesse Van Gavere Aug. 8, 2023, 5:22 p.m. UTC
Signed-off-by: Jesse Van Gavere <jesse.vangavere@scioteq.com>
---
 package/qt6/Config.in                         |  1 +
 package/qt6/qt6shadertools/Config.in          | 11 +++++
 .../qt6/qt6shadertools/qt6shadertools.hash    | 13 +++++
 package/qt6/qt6shadertools/qt6shadertools.mk  | 47 +++++++++++++++++++
 4 files changed, 72 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

Comments

Thomas Petazzoni Aug. 26, 2023, 7:49 p.m. UTC | #1
Hello Jesse,

On Tue,  8 Aug 2023 19:22:31 +0200
Jesse Van Gavere <jesseevg@gmail.com> wrote:

> Signed-off-by: Jesse Van Gavere <jesse.vangavere@scioteq.com>
> ---
>  package/qt6/Config.in                         |  1 +
>  package/qt6/qt6shadertools/Config.in          | 11 +++++
>  .../qt6/qt6shadertools/qt6shadertools.hash    | 13 +++++
>  package/qt6/qt6shadertools/qt6shadertools.mk  | 47 +++++++++++++++++++
>  4 files changed, 72 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

Thanks Jesse for your patch. It builds fine... but it doesn't install
anything. Indeed, it looks like qt6shadertools doesn't not
build/install anything when qt6base is not built with GUI support:

Skipping the build as the condition "TARGET Qt::Gui" is not met.

For the target package, it would be easy to fix. But for the host
qt6base package, the story is a bit different. Does qt6shadertools
really need GUI support in host-qt6base? If so, how did you test that
as nothing in Buildroot right now allows to enable GUI support in
host-qt6base?

Could you have a look into this, and send a v2?

Thanks a lot!

Thomas
Jesse Van Gavere Aug. 26, 2023, 8:04 p.m. UTC | #2
Hello Thomas,

Op za 26 aug. 2023 21:49 schreef Thomas Petazzoni <
thomas.petazzoni@bootlin.com>:

> Hello Jesse,
>
> On Tue,  8 Aug 2023 19:22:31 +0200
> Jesse Van Gavere <jesseevg@gmail.com> wrote:
>
> > Signed-off-by: Jesse Van Gavere <jesse.vangavere@scioteq.com>
> > ---
> >  package/qt6/Config.in                         |  1 +
> >  package/qt6/qt6shadertools/Config.in          | 11 +++++
> >  .../qt6/qt6shadertools/qt6shadertools.hash    | 13 +++++
> >  package/qt6/qt6shadertools/qt6shadertools.mk  | 47 +++++++++++++++++++
> >  4 files changed, 72 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
>
> Thanks Jesse for your patch. It builds fine... but it doesn't install
> anything. Indeed, it looks like qt6shadertools doesn't not
> build/install anything when qt6base is not built with GUI support:
>
> Skipping the build as the condition "TARGET Qt::Gui" is not met.
>
You're right, forgot that dependency, I'll add it

>
> For the target package, it would be easy to fix. But for the host
> qt6base package, the story is a bit different. Does qt6shadertools
> really need GUI support in host-qt6base? If so, how did you test that
> as nothing in Buildroot right now allows to enable GUI support in
> host-qt6base?
>
Yeah another oversight, I probably built it with GUI temporarily in and
forgot about it, the host package is necessary though as this will install
qsb which is a requirement for the follow-up qt declarative package I want
to add (at least for QtQuick support) and I'm not aware of a mechanism that
allows for conditional host package builds, if it's available though I'll
take a look, otherwise I'll always do the host build jit for that case, but
I'll at least check for adding the host GUI support, a slight casualty of
Qt their new host/target split

>
> Could you have a look into this, and send a v2?
>
> Thanks a lot!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
Thomas Petazzoni Aug. 31, 2023, 9:54 p.m. UTC | #3
Hello Jesse,

On Sat, 26 Aug 2023 22:04:19 +0200
Jesse Van Gavere <jesseevg@gmail.com> wrote:

> > For the target package, it would be easy to fix. But for the host
> > qt6base package, the story is a bit different. Does qt6shadertools
> > really need GUI support in host-qt6base? If so, how did you test that
> > as nothing in Buildroot right now allows to enable GUI support in
> > host-qt6base?
> >  
> Yeah another oversight, I probably built it with GUI temporarily in and
> forgot about it, the host package is necessary though as this will install
> qsb which is a requirement for the follow-up qt declarative package I want
> to add (at least for QtQuick support)

If qsb is only needed for the follow-up qt declarative package, then it
should only be built as a dependency of this, and not as a dependency
of the target qt6shadertools.

> and I'm not aware of a mechanism that
> allows for conditional host package builds, if it's available though I'll
> take a look, otherwise I'll always do the host build jit for that case, but
> I'll at least check for adding the host GUI support, a slight casualty of
> Qt their new host/target split

See package/python3/Config.in.host. Packages that need bzip2 support or
SSL support in host-python3 can select BR2_PACKAGE_HOST_PYTHON3_BZIP2
or BR2_PACKAGE_HOST_PYTHON3_SSL.

So you will need a package/qt6/qt6base/Config.in.host with a
BR2_PACKAGE_HOST_QT6BASE_GUI, and tweak qt6base.mk to build
host-qt6base with GUI support if BR2_PACKAGE_HOST_QT6BASE_GUI=y. Of
course one question will be: which display backend you will enable...

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/qt6/Config.in b/package/qt6/Config.in
index 3788caa6a3..335b0f4f39 100644
--- a/package/qt6/Config.in
+++ b/package/qt6/Config.in
@@ -46,6 +46,7 @@  if BR2_PACKAGE_QT6
 source "package/qt6/qt6base/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..7b081fa330
--- /dev/null
+++ b/package/qt6/qt6shadertools/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_QT6SHADERTOOLS
+	bool "qt6shadertools"
+	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..803a083518
--- /dev/null
+++ b/package/qt6/qt6shadertools/qt6shadertools.hash
@@ -0,0 +1,13 @@ 
+# Hash from: https://download.qt.io/official_releases/qt/6.4/6.4.3/submodules/qtshadertools-everywhere-src-6.4.3.tar.xz.sha256
+sha256  c648b74ce3e769a20bd62792a589c540bceacfedf2f38fc7273d2c39782768f8  qtshadertools-everywhere-src-6.4.3.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
+sha256  c7d81f456bf5488fec8b2d249eec6b02e70bbdc353c373cd5a077e898345e943  src/3rdparty/SPIRV-Cross/KHRONOS-LICENSE.txt
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  src/3rdparty/SPIRV-Cross/LICENSE
+sha256  5b1050253c0b933016f0538bce3354bb062e42b4d59d1082c0d0f9eca9b439c7  src/3rdparty/glslang/LICENSE.txt
diff --git a/package/qt6/qt6shadertools/qt6shadertools.mk b/package/qt6/qt6shadertools/qt6shadertools.mk
new file mode 100644
index 0000000000..c088359546
--- /dev/null
+++ b/package/qt6/qt6shadertools/qt6shadertools.mk
@@ -0,0 +1,47 @@ 
+################################################################################
+#
+# 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 = \
+	GPL-3.0-only WITH Qt-GPL-exception-1.0, \
+	GPL-2.0-only or LGPL-3.0-only, \
+	GFDL-1.3-no-invariants-only, \
+	Apache-2.0 or MIT, \
+	BSD-3-Clause, \
+	BSD-2-Clause, \
+	Apache-2.0, \
+	GPL-3.0-or-later WITH Bison-Exception-2.2
+
+QT6SHADERTOOLS_LICENSE_FILES = \
+	LICENSES/BSD-3-Clause.txt \
+	LICENSES/GFDL-1.3-no-invariants-only.txt \
+	LICENSES/GPL-2.0-only.txt \
+	LICENSES/GPL-3.0-only.txt \
+	LICENSES/LGPL-3.0-only.txt \
+	LICENSES/Qt-GPL-exception-1.0.txt \
+	src/3rdparty/SPIRV-Cross/KHRONOS-LICENSE.txt \
+	src/3rdparty/SPIRV-Cross/LICENSE \
+	src/3rdparty/glslang/LICENSE.txt
+
+QT6SHADERTOOLS_CONF_OPTS = \
+	-DBUILD_WITH_PCH=OFF \
+	-DQT_BUILD_EXAMPLES=OFF \
+	-DQT_BUILD_TESTS=OFF
+
+QT6SHADERTOOLS_DEPENDENCIES = \
+	host-pkgconf \
+	qt6base \
+	host-qt6shadertools
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))