Skip to contentSkip to conversation

package/pkg-qmake: adding FOO_SYNC_HEADERS

PATCH New Angelo Compagnucci 2 participants 8 messages Nov 24, 2020 – Dec 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/4 package/pkg-qmake: adding FOO_SYNC_HEADERS

Some qmake based packages need to call the syncqt.pl script before building to have a properly populated "include" directory inside the package build tree.
This script is automatically executed by qmake when a source tree is from a git clone: buildroot purges the .git directory hence the script never runs.

---
Changelog
v1 -> v2:
* Fixed hash file (suggested by Peter)
v2 -> v3:
* Moved to use FOO_INCLUDE_FIXUP
v3 -> v4:
* Renamed FOO_INCLUDE_FIXUP to FOO_SYNC_HEADERS

 docs/manual/adding-packages-qmake.txt | 4 ++++
 package/pkg-qmake.mk                  | 5 +++++
 2 files changed, 9 insertions(+)
docs/manual/adding-packages-qmake.txt +4 -0
index e1621e914e..c7e6ff354a 100644
@@ -79,3 +79,7 @@ also be defined.
 * +LIBFOO_INSTALL_TARGET_OPTS+, to specify additional targets to pass
   to the +make+ command during the target installation step. By default,
   +install+.
+
+* +LIBFOO_SYNC_HEADERS+, to run syncqt.pl before qmake. Some packages
+  need this to have a properly populated include directory before
+  running the build.
package/pkg-qmake.mk +5 -0
index 27727119d7..24bf0f7940 100644
@@ -44,6 +44,10 @@ ifneq ($(1),qt5base)
 $(2)_DEPENDENCIES 		+= qt5base
 endif
 
+ifdef $(2)_SYNC_HEADERS
+$(2)_DEPENDENCIES 		+= host-perl
+endif
+
 #
 # Configure step. Only define it if not already defined by the package
 # .mk file.
@@ -52,6 +56,7 @@ ifndef $(2)_CONFIGURE_CMDS
 define $(2)_CONFIGURE_CMDS
 	$$(QT5_QT_CONF_FIXUP)
 	cd $$($(2)_BUILDDIR) && \
+	$$(if $$($(2)_SYNC_HEADERS), $(HOST_DIR)/bin/syncqt.pl -version $(QT5_VERSION) &&) \
 	$$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS)
 endef
 endif
Signature · 1 line
2.25.1
#1 lore raw

PATCH v4 2/4 package/qt5/qt5coap: new package

The Qt CoAP module implements the client side of CoAP defined by RFC 7252.

---
Changelog
v1 -> v2:
* Fixed hash file (suggested by Peter)
v2 -> v3:
* Moved to use FOO_INCLUDE_FIXUP
v3 -> v4:
* Renamed FOO_INCLUDE_FIXUP to FOO_SYNC_HEADERS

 DEVELOPERS                       |  1 +
 package/qt5/Config.in            |  1 +
 package/qt5/qt5coap/Config.in    | 11 +++++++++++
 package/qt5/qt5coap/qt5coap.hash |  6 ++++++
 package/qt5/qt5coap/qt5coap.mk   | 14 ++++++++++++++
 5 files changed, 33 insertions(+)
 create mode 100644 package/qt5/qt5coap/Config.in
 create mode 100644 package/qt5/qt5coap/qt5coap.hash
 create mode 100644 package/qt5/qt5coap/qt5coap.mk
DEVELOPERS +1 -0
index 9ab1e125f4..3f5fa20ebc 100644
@@ -169,6 +169,7 @@ F:	package/python-pillow/
 F:	package/python-pydal/
 F:	package/python-spidev/
 F:	package/python-web2py/
+F:	package/qt5/qt5coap/
 F:	package/sam-ba/
 F:	package/sshguard/
 F:	package/sunwait/
package/qt5/Config.in +1 -0
index fc0e68e8b7..9431f4980d 100644
@@ -40,6 +40,7 @@ if BR2_PACKAGE_QT5
 source "package/qt5/qt53d/Config.in"
 source "package/qt5/qt5base/Config.in"
 source "package/qt5/qt5charts/Config.in"
+source "package/qt5/qt5coap/Config.in"
 source "package/qt5/qt5connectivity/Config.in"
 source "package/qt5/qt5declarative/Config.in"
 source "package/qt5/qt5enginio/Config.in"
package/qt5/qt5coap/Config.in new file +11 -0
new file mode 100644
index 0000000000..b5bed342a9
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_QT5COAP
+	bool "qt5coap"
+	help
+	  Qt is a cross-platform application and UI framework for
+	  developers using C++.
+
+	  CoAP is a protocol for IoT devices, and machine to machine
+	  communication. The Qt CoAP module implements the client side
+	  of CoAP defined by RFC 7252.
+
+	  https://doc.qt.io/QtCoAP/qtcoap-index.html
package/qt5/qt5coap/qt5coap.hash new file +6 -0
new file mode 100644
index 0000000000..29d9595ce5
@@ -0,0 +1,6 @@
+# Hash locally calculated
+sha256  f2addd89e94fb3945fc6ee6db795b0736cd3396760b31e04c01cd02558c53e07  qt5coap-5.15.1.tar.gz
+
+# Hashes for license files:
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
+sha256  f827ad079686ba92cc94811e35492d0e8966f704008b6da9eeda0b659fb58a8d  LICENSE.FDL
package/qt5/qt5coap/qt5coap.mk new file +14 -0
new file mode 100644
index 0000000000..7be3f6ea9d
@@ -0,0 +1,14 @@
+################################################################################
+#
+# qt5coap
+#
+################################################################################
+
+QT5COAP_VERSION = $(QT5_VERSION)
+QT5COAP_SITE = $(call github,qt,qtcoap,v$(QT5_VERSION))
+QT5COAP_INSTALL_STAGING = YES
+QT5COAP_LICENSE = GPL-3.0, GFDL-1.3
+QT5COAP_LICENSE_FILES = LICENSE.GPL3 LICENSE.FDL
+QT5COAP_SYNC_HEADERS = YES
+
+$(eval $(qmake-package))
Signature · 1 line
2.25.1
#2 lore raw

PATCH v4 2/4 package/qt5/qt5coap: new package

Quoted 4 lines · On Tue, 24 Nov 2020 07:59:15 +0100 Angelo Compagnucci…

The Qt CoAP module implements the client side of CoAP defined by RFC 7252.

Quoted 8 lines

---
Changelog
v1 -> v2:
* Fixed hash file (suggested by Peter)
v2 -> v3:
* Moved to use FOO_INCLUDE_FIXUP
v3 -> v4:
* Renamed FOO_INCLUDE_FIXUP to FOO_SYNC_HEADERS

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH v4 3/4 package/qt5/qt5mqtt: new package

In reply to Angelo Compagnucci

The Qt MQTT module provides a standard compliant implementation of the MQTT protocol specification.

---
Changelog
v1 -> v2:
* Fixed hash file (suggested by Peter)
v2 -> v3:
* Moved to use FOO_INCLUDE_FIXUP
v3 -> v4:
* Renamed FOO_INCLUDE_FIXUP to FOO_SYNC_HEADERS

 DEVELOPERS                       |  1 +
 package/qt5/Config.in            |  1 +
 package/qt5/qt5mqtt/Config.in    | 12 ++++++++++++
 package/qt5/qt5mqtt/qt5mqtt.hash |  6 ++++++
 package/qt5/qt5mqtt/qt5mqtt.mk   | 14 ++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/qt5/qt5mqtt/Config.in
 create mode 100644 package/qt5/qt5mqtt/qt5mqtt.hash
 create mode 100644 package/qt5/qt5mqtt/qt5mqtt.mk
DEVELOPERS +1 -0
index 3f5fa20ebc..d45e584709 100644
@@ -170,6 +170,7 @@ F:	package/python-pydal/
 F:	package/python-spidev/
 F:	package/python-web2py/
 F:	package/qt5/qt5coap/
+F:	package/qt5/qt5mqtt/
 F:	package/sam-ba/
 F:	package/sshguard/
 F:	package/sunwait/
package/qt5/Config.in +1 -0
index 9431f4980d..c15d27ba7c 100644
@@ -48,6 +48,7 @@ source "package/qt5/qt5graphicaleffects/Config.in"
 source "package/qt5/qt5imageformats/Config.in"
 source "package/qt5/qt5location/Config.in"
 source "package/qt5/qt5lottie/Config.in"
+source "package/qt5/qt5mqtt/Config.in"
 source "package/qt5/qt5multimedia/Config.in"
 source "package/qt5/qt5quickcontrols/Config.in"
 source "package/qt5/qt5quickcontrols2/Config.in"
package/qt5/qt5mqtt/Config.in new file +12 -0
new file mode 100644
index 0000000000..509b18089d
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_QT5MQTT
+	bool "qt5mqtt"
+	help
+	  Qt is a cross-platform application and UI framework for
+	  developers using C++.
+
+	  The Qt MQTT module provides a standard compliant implementation
+	  of the MQTT protocol specification. It enables applications to
+	  act as telemetry displays and devices to publish telemetry data.
+	  The supported versions are MQTT 3.1, MQTT 3.1.1, and MQTT 5.0.
+
+	  https://doc.qt.io/QtMQTT/index.html
package/qt5/qt5mqtt/qt5mqtt.hash new file +6 -0
new file mode 100644
index 0000000000..ddf2aa4fc0
@@ -0,0 +1,6 @@
+# Hash locally calculated
+sha256  603f81095ec837cb28b93189fd26dbbae32ecaedd80f6dd88c85050b51e18008  qt5mqtt-5.15.1.tar.gz
+
+# Hashes for license files:
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
+sha256  0dbe024961f6ab5c52689cbd036c977975d0d0f6a67ff97762d96cb819dd5652  LICENSE.GPL3-EXCEPT
package/qt5/qt5mqtt/qt5mqtt.mk new file +14 -0
new file mode 100644
index 0000000000..91b52b46ba
@@ -0,0 +1,14 @@
+################################################################################
+#
+# qt5mqtt
+#
+################################################################################
+
+QT5MQTT_VERSION = $(QT5_VERSION)
+QT5MQTT_SITE = $(call github,qt,qtmqtt,v$(QT5_VERSION))
+QT5MQTT_INSTALL_STAGING = YES
+QT5MQTT_LICENSE = GPL-3.0 with exception
+QT5MQTT_LICENSE_FILES = LICENSE.GPL3 LICENSE.GPL3-EXCEPT
+QT5MQTT_SYNC_HEADERS = YES
+
+$(eval $(qmake-package))
Signature · 1 line
2.25.1
#4 lore raw

PATCH v4 3/4 package/qt5/qt5mqtt: new package

Quoted 4 lines · On Tue, 24 Nov 2020 07:59:16 +0100 Angelo Compagnucci…

The Qt MQTT module provides a standard compliant implementation of the MQTT protocol specification.

Quoted 8 lines

---
Changelog
v1 -> v2:
* Fixed hash file (suggested by Peter)
v2 -> v3:
* Moved to use FOO_INCLUDE_FIXUP
v3 -> v4:
* Renamed FOO_INCLUDE_FIXUP to FOO_SYNC_HEADERS

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH v4 4/4 package/qt5/qt5knx: new package

In reply to Angelo Compagnucci

The Qt KNX module implements the client side of a connection between a client and a KNXnet/IP server.

---
Changelog
v1 -> v2:
* Fixed hash file (suggested by Peter)
v2 -> v3:
* Moved to use FOO_INCLUDE_FIXUP
v3 -> v4:
* Renamed FOO_INCLUDE_FIXUP to FOO_SYNC_HEADERS

 DEVELOPERS                     |  1 +
 package/qt5/Config.in          |  1 +
 package/qt5/qt5knx/Config.in   | 12 ++++++++++++
 package/qt5/qt5knx/qt5knx.hash |  6 ++++++
 package/qt5/qt5knx/qt5knx.mk   | 14 ++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/qt5/qt5knx/Config.in
 create mode 100644 package/qt5/qt5knx/qt5knx.hash
 create mode 100644 package/qt5/qt5knx/qt5knx.mk
DEVELOPERS +1 -0
index d45e584709..9fadedb4de 100644
@@ -170,6 +170,7 @@ F:	package/python-pydal/
 F:	package/python-spidev/
 F:	package/python-web2py/
 F:	package/qt5/qt5coap/
+F:	package/qt5/qt5knx/
 F:	package/qt5/qt5mqtt/
 F:	package/sam-ba/
 F:	package/sshguard/
package/qt5/Config.in +1 -0
index c15d27ba7c..6714c6271d 100644
@@ -46,6 +46,7 @@ source "package/qt5/qt5declarative/Config.in"
 source "package/qt5/qt5enginio/Config.in"
 source "package/qt5/qt5graphicaleffects/Config.in"
 source "package/qt5/qt5imageformats/Config.in"
+source "package/qt5/qt5knx/Config.in"
 source "package/qt5/qt5location/Config.in"
 source "package/qt5/qt5lottie/Config.in"
 source "package/qt5/qt5mqtt/Config.in"
package/qt5/qt5knx/Config.in new file +12 -0
new file mode 100644
index 0000000000..991e93c8cb
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_QT5KNX
+	bool "qt5knx"
+	help
+	  Qt is a cross-platform application and UI framework for
+	  developers using C++.
+
+	  The Qt KNX module implements the client side of a connection
+	  between a client and a KNXnet/IP server. This connection
+	  can be used to send messages to the KNX bus and to control
+	  the functionalities of the KNX devices.
+
+	  https://doc.qt.io/QtKNX/index.html
package/qt5/qt5knx/qt5knx.hash new file +6 -0
new file mode 100644
index 0000000000..05abe706af
@@ -0,0 +1,6 @@
+# Hash locally calculated
+sha256  8ee0df130fad39ef6b9a0bef390b648d3ad6539ffca33e22fb569e889d0bd043  qt5knx-5.15.1.tar.gz
+
+# Hashes for license files:
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  LICENSE.GPL3
+sha256  f827ad079686ba92cc94811e35492d0e8966f704008b6da9eeda0b659fb58a8d  LICENSE.FDL
package/qt5/qt5knx/qt5knx.mk new file +14 -0
new file mode 100644
index 0000000000..acd9e19339
@@ -0,0 +1,14 @@
+################################################################################
+#
+# qt5knx
+#
+################################################################################
+
+QT5KNX_VERSION = $(QT5_VERSION)
+QT5KNX_SITE = $(call github,qt,qtknx,v$(QT5_VERSION))
+QT5KNX_INSTALL_STAGING = YES
+QT5KNX_LICENSE = GPL-3.0 with exception
+QT5KNX_LICENSE_FILES = LICENSE.GPL3 LICENSE.GPL3-EXCEPT
+QT5KNX_SYNC_HEADERS = YES
+
+$(eval $(qmake-package))
Signature · 1 line
2.25.1
#6 lore raw

PATCH v4 4/4 package/qt5/qt5knx: new package

Quoted 4 lines · On Tue, 24 Nov 2020 07:59:17 +0100 Angelo Compagnucci…

The Qt KNX module implements the client side of a connection between a client and a KNXnet/IP server.

Quoted 8 lines

---
Changelog
v1 -> v2:
* Fixed hash file (suggested by Peter)
v2 -> v3:
* Moved to use FOO_INCLUDE_FIXUP
v3 -> v4:
* Renamed FOO_INCLUDE_FIXUP to FOO_SYNC_HEADERS

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH v4 1/4 package/pkg-qmake: adding FOO_SYNC_HEADERS

In reply to Angelo Compagnucci
Quoted 8 lines · On Tue, 24 Nov 2020 07:59:14 +0100 Angelo Compagnucci…

Some qmake based packages need to call the syncqt.pl script before building to have a properly populated "include" directory inside the package build tree.
This script is automatically executed by qmake when a source tree is from a git clone: buildroot purges the .git directory hence the script never runs.

Thanks! I have applied this, but after doing some changes. First, I renamed the variable to <pkg>_SYNC_QT_HEADERS.

Quoted 1 line

+ifdef $(2)_SYNC_HEADERS

Changed to ifeq (..., YES). Indeed, with an ifdef, even setting SYNC_HEADERS = NO would have triggered the thing, which would have not been expected.

package/pkg-qmake.mk ifndef $(2)_CONFIGURE_CMDS · line 59

Quoted 11 lines

+$(2)_DEPENDENCIES += host-perl

package/pkg-qmake.mk +3 -0
+endif
+
 #
 # Configure step. Only define it if not already defined by the package
 # .mk file.
@@ -52,6 +56,7 @@ ifndef $(2)_CONFIGURE_CMDS
 define $(2)_CONFIGURE_CMDS
 	$$(QT5_QT_CONF_FIXUP)
 	cd $$($(2)_BUILDDIR) && \
+	$$(if $$($(2)_SYNC_HEADERS), $(HOST_DIR)/bin/syncqt.pl -version $(QT5_VERSION) &&) \

I moved this out into a pre-configure hook, following the model that we use for running autoreconf on autotools packages.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com