diff mbox series

[1/1] package/qt6/qt6serialport: add package

Message ID 20220824094900.3639681-1-jesseevg@gmail.com
State Accepted
Headers show
Series [1/1] package/qt6/qt6serialport: add package | expand

Commit Message

Jesse Van Gavere Aug. 24, 2022, 9:49 a.m. UTC
Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
---
 package/qt6/Config.in                        |  1 +
 package/qt6/qt6serialport/Config.in          | 11 ++++++
 package/qt6/qt6serialport/qt6serialport.hash |  9 +++++
 package/qt6/qt6serialport/qt6serialport.mk   | 41 ++++++++++++++++++++
 4 files changed, 62 insertions(+)
 create mode 100644 package/qt6/qt6serialport/Config.in
 create mode 100644 package/qt6/qt6serialport/qt6serialport.hash
 create mode 100644 package/qt6/qt6serialport/qt6serialport.mk

Comments

Thomas Petazzoni Aug. 24, 2022, 10:38 a.m. UTC | #1
Hello,

On Wed, 24 Aug 2022 11:49:00 +0200
Jesse Van Gavere <jesseevg@gmail.com> wrote:

> Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>

Wow, great, someone interested in Qt6! I've applied your patch to our
next branch, with some changes. See below.

> ---
>  package/qt6/Config.in                        |  1 +
>  package/qt6/qt6serialport/Config.in          | 11 ++++++
>  package/qt6/qt6serialport/qt6serialport.hash |  9 +++++
>  package/qt6/qt6serialport/qt6serialport.mk   | 41 ++++++++++++++++++++
>  4 files changed, 62 insertions(+)

You forgot to add an entry to the DEVELOPERS file for this new package,
so I've added that. This way you will receive e-mail notifications if
we have build failures on qt6serialport, or if new versions become
available upstream.

> diff --git a/package/qt6/qt6serialport/qt6serialport.mk b/package/qt6/qt6serialport/qt6serialport.mk
> new file mode 100644
> index 0000000000..5bfae1ca0c
> --- /dev/null
> +++ b/package/qt6/qt6serialport/qt6serialport.mk
> @@ -0,0 +1,41 @@
> +################################################################################
> +#
> +# qt6serialport
> +#
> +################################################################################
> +
> +QT6SERIALPORT_VERSION = $(QT6_VERSION)
> +QT6SERIALPORT_SITE = $(QT6_SITE)
> +QT6SERIALPORT_SOURCE = qtserialport-$(QT6_SOURCE_TARBALL_PREFIX)-$(QT6SERIALPORT_VERSION).tar.xz
> +QT6SERIALPORT_INSTALL_STAGING = YES
> +QT6SERIALPORT_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)

                                                                      ^^^ missing space her

> +QT6SERIALPORT_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
> +QT6SERIALPORT_CONF_OPTS += \

+= was not needed here, a simple = was enough.

> +        -GNinja \

This option was intended with spaces instead of one tab.

> +	-DQT_HOST_PATH=$(HOST_DIR) \
> +	-DBUILD_SHARED_LIBS=ON \

This option is not needed, it's passed by the cmake-package infrastructure already.

> +	-DBUILD_WITH_PCH=OFF \
> +	-DQT_BUILD_EXAMPLES=OFF \
> +	-DQT_BUILD_TESTS=OFF

> +
> +QT6SERIALPORT_DEPENDENCIES = \
> +        host-pkgconf \
> +        host-ninja \

These options were intended with spaces instead of one tab.

> +	qt6base
> +
> +QT6SERIALPORT_INSTALL_STAGING = YES

This was already present earlier in your .mk file.

Again, thanks for this contribution!

Best regards,

Thomas
Jesse Van Gavere Aug. 24, 2022, 11:27 a.m. UTC | #2
Hello,

Yes very interested, I actually started work on this before Samuel had
committed a first base package so I've been reworking a little what I got
to conform more to what's already there, I've been getting all our internal
code up to date to work with Qt6 so I've got a more fleshed out qt6base
package from my struggles getting that working along with the
qt6declarative package, I'll submit those qt6base changes later once I got
the chance to rework a little taking your comments into account so you can
have a look (because it does have some quirk in GUI/fontconfig I had to
temporarily solve with patches and forced dependencies) and once that's
done I'll submit the declarative package, my hope is that I can also then
add some of the more straightforward modules from qt6 we also had in qt5.

Best regards,
Jesse

Op wo 24 aug. 2022 om 12:38 schreef Thomas Petazzoni <
thomas.petazzoni@bootlin.com>:

> Hello,
>
> On Wed, 24 Aug 2022 11:49:00 +0200
> Jesse Van Gavere <jesseevg@gmail.com> wrote:
>
> > Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
>
> Wow, great, someone interested in Qt6! I've applied your patch to our
> next branch, with some changes. See below.
>
> > ---
> >  package/qt6/Config.in                        |  1 +
> >  package/qt6/qt6serialport/Config.in          | 11 ++++++
> >  package/qt6/qt6serialport/qt6serialport.hash |  9 +++++
> >  package/qt6/qt6serialport/qt6serialport.mk   | 41 ++++++++++++++++++++
> >  4 files changed, 62 insertions(+)
>
> You forgot to add an entry to the DEVELOPERS file for this new package,
> so I've added that. This way you will receive e-mail notifications if
> we have build failures on qt6serialport, or if new versions become
> available upstream.
>
> > diff --git a/package/qt6/qt6serialport/qt6serialport.mk
> b/package/qt6/qt6serialport/qt6serialport.mk
> > new file mode 100644
> > index 0000000000..5bfae1ca0c
> > --- /dev/null
> > +++ b/package/qt6/qt6serialport/qt6serialport.mk
> > @@ -0,0 +1,41 @@
> >
> +################################################################################
> > +#
> > +# qt6serialport
> > +#
> >
> +################################################################################
> > +
> > +QT6SERIALPORT_VERSION = $(QT6_VERSION)
> > +QT6SERIALPORT_SITE = $(QT6_SITE)
> > +QT6SERIALPORT_SOURCE =
> qtserialport-$(QT6_SOURCE_TARBALL_PREFIX)-$(QT6SERIALPORT_VERSION).tar.xz
> > +QT6SERIALPORT_INSTALL_STAGING = YES
> > +QT6SERIALPORT_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with
> exception(tools), GFDL-1.3 (docs)
>
>                                                                       ^^^
> missing space her
>
> > +QT6SERIALPORT_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3
> LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
> > +QT6SERIALPORT_CONF_OPTS += \
>
> += was not needed here, a simple = was enough.
>
> > +        -GNinja \
>
> This option was intended with spaces instead of one tab.
>
> > +     -DQT_HOST_PATH=$(HOST_DIR) \
> > +     -DBUILD_SHARED_LIBS=ON \
>
> This option is not needed, it's passed by the cmake-package infrastructure
> already.
>
> > +     -DBUILD_WITH_PCH=OFF \
> > +     -DQT_BUILD_EXAMPLES=OFF \
> > +     -DQT_BUILD_TESTS=OFF
>
> > +
> > +QT6SERIALPORT_DEPENDENCIES = \
> > +        host-pkgconf \
> > +        host-ninja \
>
> These options were intended with spaces instead of one tab.
>
> > +     qt6base
> > +
> > +QT6SERIALPORT_INSTALL_STAGING = YES
>
> This was already present earlier in your .mk file.
>
> Again, thanks for this contribution!
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>
Thomas Petazzoni Aug. 24, 2022, 11:31 a.m. UTC | #3
Hello Jesse,

On Wed, 24 Aug 2022 13:27:21 +0200
Jesse Van Gavere <jesseevg@gmail.com> wrote:

> Yes very interested, I actually started work on this before Samuel had

FYI, Samuel was heavily involved in qt5 support, but he is no longer
active in the Buildroot community. The qt6base package was initially
started by Peter Seiderer, and then picked up by me recently.

> committed a first base package so I've been reworking a little what I got
> to conform more to what's already there, I've been getting all our internal
> code up to date to work with Qt6 so I've got a more fleshed out qt6base
> package from my struggles getting that working along with the
> qt6declarative package, I'll submit those qt6base changes later once I got
> the chance to rework a little taking your comments into account so you can
> have a look (because it does have some quirk in GUI/fontconfig I had to
> temporarily solve with patches and forced dependencies) and once that's
> done I'll submit the declarative package, my hope is that I can also then
> add some of the more straightforward modules from qt6 we also had in qt5.

Sounds good! Looking forward to your patches. I indeed suspect that
some aspects of the GUI support will be tricky.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/qt6/Config.in b/package/qt6/Config.in
index 86394f49ba..4b2b9a1174 100644
--- a/package/qt6/Config.in
+++ b/package/qt6/Config.in
@@ -39,5 +39,6 @@  menuconfig BR2_PACKAGE_QT6
 if BR2_PACKAGE_QT6
 
 source "package/qt6/qt6base/Config.in"
+source "package/qt6/qt6serialport/Config.in"
 
 endif
diff --git a/package/qt6/qt6serialport/Config.in b/package/qt6/qt6serialport/Config.in
new file mode 100644
index 0000000000..f1fd844f56
--- /dev/null
+++ b/package/qt6/qt6serialport/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_QT6SERIALPORT
+	bool "qt6serialport"
+	help
+	  Qt is a cross-platform application and UI framework for
+	  developers using C++.
+
+	  Qt Serial Port provides the basic functionality, which
+	  includes configuring, I/O operations, getting and setting
+	  the control signals of the RS-232 pinouts.
+
+	  https://doc.qt.io/qt-6/qserialport.html
diff --git a/package/qt6/qt6serialport/qt6serialport.hash b/package/qt6/qt6serialport/qt6serialport.hash
new file mode 100644
index 0000000000..9780eb86fe
--- /dev/null
+++ b/package/qt6/qt6serialport/qt6serialport.hash
@@ -0,0 +1,9 @@ 
+# Hash from: https://download.qt.io/official_releases/qt/6.3/6.3.1/submodules/qtserialport-everywhere-src-6.3.1.tar.xz.sha256
+sha256  4eb6d80e65799dd2e0318df4dfba14173c1929e861718cda9bedca24253b616e  qtserialport-everywhere-src-6.3.1.tar.xz
+
+# Hashes for license files:
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL2
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
+sha256  0dbe024961f6ab5c52689cbd036c977975d0d0f6a67ff97762d96cb819dd5652  LICENSE.GPL3-EXCEPT
+sha256  da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768  LICENSE.LGPL3
+sha256  ed8742a95cb9db653a09b050e27ccff5e67ba69c14aa2c3137f2a4e1892f6c0d  LICENSE.FDL
diff --git a/package/qt6/qt6serialport/qt6serialport.mk b/package/qt6/qt6serialport/qt6serialport.mk
new file mode 100644
index 0000000000..5bfae1ca0c
--- /dev/null
+++ b/package/qt6/qt6serialport/qt6serialport.mk
@@ -0,0 +1,41 @@ 
+################################################################################
+#
+# qt6serialport
+#
+################################################################################
+
+QT6SERIALPORT_VERSION = $(QT6_VERSION)
+QT6SERIALPORT_SITE = $(QT6_SITE)
+QT6SERIALPORT_SOURCE = qtserialport-$(QT6_SOURCE_TARBALL_PREFIX)-$(QT6SERIALPORT_VERSION).tar.xz
+QT6SERIALPORT_INSTALL_STAGING = YES
+QT6SERIALPORT_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
+QT6SERIALPORT_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
+QT6SERIALPORT_CONF_OPTS += \
+        -GNinja \
+	-DQT_HOST_PATH=$(HOST_DIR) \
+	-DBUILD_SHARED_LIBS=ON \
+	-DBUILD_WITH_PCH=OFF \
+	-DQT_BUILD_EXAMPLES=OFF \
+	-DQT_BUILD_TESTS=OFF
+
+QT6SERIALPORT_DEPENDENCIES = \
+        host-pkgconf \
+        host-ninja \
+	qt6base
+
+QT6SERIALPORT_INSTALL_STAGING = YES
+QT6SERIALPORT_SUPPORTS_IN_SOURCE_BUILD = NO
+
+define QT6SERIALPORT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(BR2_CMAKE) --build $(QT6SERIALPORT_BUILDDIR)
+endef
+
+define QT6SERIALPORT_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT6SERIALPORT_BUILDDIR) --prefix $(STAGING_DIR)/usr
+endef
+
+define QT6SERIALPORT_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(BR2_CMAKE) --install $(QT6SERIALPORT_BUILDDIR) --prefix $(TARGET_DIR)/usr
+endef
+
+$(eval $(cmake-package))