qt5: install missing examples
cover qt5: install missing examples
Hi,
The following modules do not install theirs examples to the target directory; theirs examples are available in the staging directory.
- qt5canvas3d (in canvas3d directory)
- qt5location (in location and positioning directories)
- qt5quickcontrols (in quickcontrols directory)
- qt5script (in script directory)
- qt5wayland (in wayland directory)
- qt5svg (in svg directory)
- qt5serialbus (in serialbus directory)
- qt5serialport (in serialport directory)
- qt5sensors (in sensors directory)
This patch serie copies the examples of that modules from the staging directory to the target directory when is set BR2_PACKAGE_QT5BASE_EXAMPLES.
Regards,
Ga?l PORTAY (9):
qt5canvas3d: install examples to target
qt5location: install examples to target
qt5quickcontrols: install examples to target
qt5script: install examples to target
qt5wayland: install examples to target
qt5svg: install examples to target
qt5serialbus: install examples to target
qt5serialport: install examples to target
qt5sensors: install examples to target
package/qt5/qt5canvas3d/qt5canvas3d.mk | 7 +++++++ package/qt5/qt5location/qt5location.mk | 7 +++++++ package/qt5/qt5quickcontrols/qt5quickcontrols.mk | 7 +++++++ package/qt5/qt5script/qt5script.mk | 13 ++++++++++++- package/qt5/qt5sensors/qt5sensors.mk | 7 +++++++ package/qt5/qt5serialbus/qt5serialbus.mk | 7 +++++++ package/qt5/qt5serialport/qt5serialport.mk | 13 ++++++++++++- package/qt5/qt5svg/qt5svg.mk | 13 ++++++++++++- package/qt5/qt5wayland/qt5wayland.mk | 7 +++++++ 9 files changed, 78 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/9 qt5canvas3d: install examples to target
When BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples `canvas3d' from the staging directory to the target.
--- package/qt5/qt5canvas3d/qt5canvas3d.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/qt5/qt5canvas3d/qt5canvas3d.mk +7 -0
@@ -26,8 +26,15 @@ define QT5CANVAS3D_INSTALL_STAGING_CMDS $(QT5_LA_PRL_FILES_FIXUP) endef +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5CANVAS3D_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/canvas3d $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + define QT5CANVAS3D_INSTALL_TARGET_CMDS cp -dpfr $(STAGING_DIR)/usr/qml/QtCanvas3D $(TARGET_DIR)/usr/qml/ + $(QT5CANVAS3D_INSTALL_TARGET_EXAMPLES) endef $(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 2/9 qt5location: install examples to target
In reply to Gaël PORTAYWhen BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples location' and positioning' from the staging directory to the target.
--- package/qt5/qt5location/qt5location.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/qt5/qt5location/qt5location.mk +7 -0
@@ -44,6 +44,12 @@ define QT5LOCATION_INSTALL_TARGET_LOCATION cp -dpf $(STAGING_DIR)/usr/lib/libQt5Location.so.* $(TARGET_DIR)/usr/lib cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/geoservices $(TARGET_DIR)/usr/lib/qt/plugins/ endef +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5LOCATION_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/location $(TARGET_DIR)/usr/lib/qt/examples/ + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/positioning $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif endif define QT5LOCATION_INSTALL_TARGET_POSITION
@@ -55,6 +61,7 @@ define QT5LOCATION_INSTALL_TARGET_CMDS $(QT5LOCATION_INSTALL_TARGET_POSITION) $(QT5LOCATION_INSTALL_TARGET_LOCATION) $(QT5LOCATION_INSTALL_TARGET_QMLS) + $(QT5LOCATION_INSTALL_TARGET_EXAMPLES) endef $(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 3/9 qt5quickcontrols: install examples to target
In reply to Gaël PORTAYWhen BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples `quickcontrols' from the staging directory to the target.
--- package/qt5/qt5quickcontrols/qt5quickcontrols.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/qt5/qt5quickcontrols/qt5quickcontrols.mk +7 -0
@@ -25,6 +25,12 @@ define QT5QUICKCONTROLS_INSTALL_STAGING_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install endef +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5QUICKCONTROLS_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/quickcontrols $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK)$(BR2_PACKAGE_QT5BASE_WIDGETS),yy) define QT5QUICKCONTROLS_INSTALL_TARGET_PRIVATEWIDGETS cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/PrivateWidgets $(TARGET_DIR)/usr/qml/QtQuick
@@ -43,6 +49,7 @@ define QT5QUICKCONTROLS_INSTALL_TARGET_CMDS cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Extras $(TARGET_DIR)/usr/qml/QtQuick $(QT5QUICKCONTROLS_INSTALL_TARGET_PRIVATEWIDGETS) $(QT5QUICKCONTROLS_INSTALL_TARGET_LAYOUTS) + $(QT5QUICKCONTROLS_INSTALL_TARGET_EXAMPLES) endef $(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 4/9 qt5script: install examples to target
In reply to Gaël PORTAYWhen BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples `script' from the staging directory to the target.
--- package/qt5/qt5script/qt5script.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
package/qt5/qt5script/qt5script.mk +12 -1
@@ -41,9 +41,20 @@ define QT5SCRIPT_INSTALL_STAGING_CMDS endef ifeq ($(BR2_STATIC_LIBS),) -define QT5SCRIPT_INSTALL_TARGET_CMDS +define QT5SCRIPT_INSTALL_TARGET_LIBS cp -dpf $(STAGING_DIR)/usr/lib/libQt5Script*.so.* $(TARGET_DIR)/usr/lib endef endif +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5SCRIPT_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/script $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + +define QT5SCRIPT_INSTALL_TARGET_CMDS + $(QT5SCRIPT_INSTALL_TARGET_LIBS) + $(QT5SCRIPT_INSTALL_TARGET_EXAMPLES) +endef + $(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 5/9 qt5wayland: install examples to target
In reply to Gaël PORTAYWhen BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples `wayland' from the staging directory to the target.
--- package/qt5/qt5wayland/qt5wayland.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/qt5/qt5wayland/qt5wayland.mk +7 -0
@@ -51,11 +51,18 @@ endef endif endif +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5WAYLAND_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/wayland $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + define QT5WAYLAND_INSTALL_TARGET_CMDS cp -dpf $(STAGING_DIR)/usr/lib/libQt5WaylandClient.so* $(TARGET_DIR)/usr/lib cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/wayland* $(TARGET_DIR)/usr/lib/qt/plugins cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/platforms/libqwayland* $(TARGET_DIR)/usr/lib/qt/plugins/platforms $(QT5WAYLAND_INSTALL_COMPOSITOR) + $(QT5WAYLAND_INSTALL_TARGET_EXAMPLES) endef $(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 6/9 qt5svg: install examples to target
In reply to Gaël PORTAYWhen BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples `svg' from the staging directory to the target.
--- package/qt5/qt5svg/qt5svg.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
package/qt5/qt5svg/qt5svg.mk +12 -1
@@ -37,12 +37,23 @@ define QT5SVG_INSTALL_ICONENGINES endef endif +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5SVG_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/svg $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + ifeq ($(BR2_STATIC_LIBS),) -define QT5SVG_INSTALL_TARGET_CMDS +define QT5SVG_INSTALL_TARGET_LIBS cp -dpf $(STAGING_DIR)/usr/lib/libQt5Svg*.so.* $(TARGET_DIR)/usr/lib cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/imageformats/libqsvg.so $(TARGET_DIR)/usr/lib/qt/plugins/imageformats/ $(QT5SVG_INSTALL_ICONENGINES) endef endif +define QT5SVG_INSTALL_TARGET_CMDS + $(QT5SVG_INSTALL_TARGET_LIBS) + $(QT5SVG_INSTALL_TARGET_EXAMPLES) +endef + $(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 7/9 qt5serialbus: install examples to target
In reply to Gaël PORTAYWhen BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples `serialbus' from the staging directory to the target.
--- package/qt5/qt5serialbus/qt5serialbus.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/qt5/qt5serialbus/qt5serialbus.mk +7 -0
@@ -36,8 +36,15 @@ define QT5SERIALBUS_INSTALL_TARGET_LIBS endef endif +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5SERIALBUS_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/serialbus $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + define QT5SERIALBUS_INSTALL_TARGET_CMDS $(QT5SERIALBUS_INSTALL_TARGET_LIBS) + $(QT5SERIALBUS_INSTALL_TARGET_EXAMPLES) $(INSTALL) -m 0755 -D $(@D)/bin/canbusutil \ $(TARGET_DIR)/usr/bin/canbusutil endef
Signature · 1 line
2.17.1
PATCH 8/9 qt5serialport: install examples to target
In reply to Gaël PORTAYWhen BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples `serialport' from the staging directory to the target.
--- package/qt5/qt5serialport/qt5serialport.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
package/qt5/qt5serialport/qt5serialport.mk +12 -1
@@ -32,9 +32,20 @@ define QT5SERIALPORT_INSTALL_STAGING_CMDS endef ifeq ($(BR2_STATIC_LIBS),) -define QT5SERIALPORT_INSTALL_TARGET_CMDS +define QT5SERIALPORT_INSTALL_TARGET_LIBS cp -dpf $(STAGING_DIR)/usr/lib/libQt5SerialPort.so.* $(TARGET_DIR)/usr/lib endef endif +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5SERIALPORT_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/serialport $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + +define QT5SERIALPORT_INSTALL_TARGET_CMDS + $(QT5SERIALPORT_INSTALL_TARGET_LIBS) + $(QT5SERIALPORT_INSTALL_TARGET_EXAMPLES) +endef + $(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 9/9 qt5sensors: install examples to target
In reply to Gaël PORTAYWhen BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module are installed in the staging directory but they are not shipped to the target.
This commit copies the examples `sensors' from the staging directory to the target.
--- package/qt5/qt5sensors/qt5sensors.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/qt5/qt5sensors/qt5sensors.mk +7 -0
@@ -48,9 +48,16 @@ define QT5SENSORS_INSTALL_TARGET_QMLS endef endif +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5SENSORS_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/sensors $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + define QT5SENSORS_INSTALL_TARGET_CMDS $(QT5SENSORS_INSTALL_TARGET_LIBS) $(QT5SENSORS_INSTALL_TARGET_QMLS) + $(QT5SENSORS_INSTALL_TARGET_EXAMPLES) endef $(eval $(generic-package))
Signature · 1 line
2.17.1
cover qt5: install missing examples
In reply to Gaël PORTAYHello Ga?l,
Quoted 11 lines · Ga?l PORTAY
Regards,
Ga?l PORTAY (9):
qt5canvas3d: install examples to target
qt5location: install examples to target
qt5quickcontrols: install examples to target
qt5script: install examples to target
qt5wayland: install examples to target
qt5svg: install examples to target
qt5serialbus: install examples to target
qt5serialport: install examples to target
qt5sensors: install examples to target
Thanks, I've applied all your patches.
However, I am not super happy with how we install Qt5 packages right now. What we do is:
- Staging installation: "make install", with no DESTDIR or anything similar
- Target installation: manual copy.
Ideally, I'd prefer if we could do:
- Staging installation: make DESTDIR=$(STAGING_DIR) install
- Target installation: make DESTDIR=$(TARGET_DIR) install
Unfortunately, this doesn't work as-is, because the $(STAGING_DIR) location is hardcoded at Qt configure time, so it doesn't work immediately to do separate installation for staging and target. I know Arnout briefly looked into this during the last Buildroot hackathon.
However, it would be nice if someone could have a deeper look into this. It would greatly help to simplify our Qt5 packages.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
cover qt5: install missing examples
Hello Thomas,
Quoted 16 lines · Thomas Petazzoni
Hello Ga?l,
Quoted 11 lines · Ga?l PORTAY
Regards,
Ga?l PORTAY (9):
qt5canvas3d: install examples to target
qt5location: install examples to target
qt5quickcontrols: install examples to target
qt5script: install examples to target
qt5wayland: install examples to target
qt5svg: install examples to target
qt5serialbus: install examples to target
qt5serialport: install examples to target
qt5sensors: install examples to target
Quoted 2 lines
Thanks, I've applied all your patches.
Thanks!
Quoted 3 lines
However, I am not super happy with how we install Qt5 packages right now. What we do is:
I am not happy too; and I was already thinking about improving that.
Quoted 7 lines
- Staging installation: "make install", with no DESTDIR or anything similar
- Target installation: manual copy.
Ideally, I'd prefer if we could do:
Quoted 8 lines
- Staging installation: make DESTDIR=$(STAGING_DIR) install
- Target installation: make DESTDIR=$(TARGET_DIR) installUnfortunately, this doesn't work as-is, because the $(STAGING_DIR) location is hardcoded at Qt configure time, so it doesn't work immediately to do separate installation for staging and target. I know Arnout briefly looked into this during the last Buildroot hackathon.
There is INSTALL_ROOT variable which looks to be equivalent to DESTDIR.
Also, I was thinking about a qmake-package or a qt5module-package.
Quoted 3 lines
However, it would be nice if someone could have a deeper look into this. It would greatly help to simplify our Qt5 packages.
I have free time and I will have a look to this in the next days.
Quoted 7 lines
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
Regards,
Ga?l
cover qt5: install missing examples
Hello Ga?l,
Quoted 5 lines · Ga?l PORTAY
Quoted 3 lines
However, I am not super happy with how we install Qt5 packages right now. What we do is:
I am not happy too; and I was already thinking about improving that.
Great.
Quoted 10 lines
Quoted 10 lines
- Staging installation: "make install", with no DESTDIR or anything similar
- Target installation: manual copy.
Ideally, I'd prefer if we could do:
- Staging installation: make DESTDIR=$(STAGING_DIR) install
- Target installation: make DESTDIR=$(TARGET_DIR) install
Quoted 6 lines
Quoted 4 lines
Unfortunately, this doesn't work as-is, because the $(STAGING_DIR) location is hardcoded at Qt configure time, so it doesn't work immediately to do separate installation for staging and target. I know Arnout briefly looked into this during the last Buildroot hackathon.
There is
INSTALL_ROOTvariable which looks to be equivalent to DESTDIR.
Yes, but no. The problem is that with the way things are currently setup, if you set INSTALL_ROOT to /foo/bar and STAGING_DIR is /home/thomas/buildroot/output/staging, then Qt5 stuff will be installed in:
/foo/bar/home/thomas/buildroot/output/staging
Which is obviously wrong. And I believe the fact that it does this is due to:
-sysroot $(STAGING_DIR) \
when configuring Qt5. Some research is needed to see if a better solution is possible :-)
Quoted 1 line
Also, I was thinking about a qmake-package or a qt5module-package.
A qmake-package infrastructure might make sense. But beware of Qt4/Qt5 compatibility. But to me, fixing the first problem is much more important/useful.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
cover qt5: install missing examples
Thomas,
Quoted 11 lines · Thomas Petazzoni
Quoted 3 lines
(...)
There is
INSTALL_ROOTvariable which looks to be equivalent to DESTDIR.Yes, but no. The problem is that with the way things are currently setup, if you set
INSTALL_ROOTto /foo/bar andSTAGING_DIRis/home/thomas/buildroot/output/staging, then Qt5 stuff will be installed in:/foo/bar/home/thomas/buildroot/output/staging
Quoted 8 lines
Which is obviously wrong. And I believe the fact that it does this is due to:
-sysroot $(STAGING_DIR) \when configuring Qt5. Some research is needed to see if a better solution is possible :-)
I will have a look to that. I have started a fresh build with few modifications on pathes.
I think it is because of the prefix in qt.conf.in which is sed to $(HOST_DIR).
[Paths] Prefix=@@HOST_DIR@@ ... Libraries=/usr/lib ... Binaries=/usr/bin ...
I will see.
Quoted 6 lines
Quoted 1 line
Also, I was thinking about a qmake-package or a qt5module-package.
A qmake-package infrastructure might make sense. But beware of Qt4/Qt5 compatibility. But to me, fixing the first problem is much more important/useful.
For sure... My first run is to rewrite all <qt5modules>_INSTALL_TARGET (if possible) using:
$(MAKE) -C ... install INSTALL_ROOT=$(TARGET_DIR)
Quoted 7 lines
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
cover qt5: install missing examples
In reply to Thomas PetazzoniOn 17-06-18 22:48, Thomas Petazzoni wrote:
[snip]
Quoted 2 lines
But beware of Qt4/Qt5
compatibility.
I think we just decided to kill Qt4, so no problem there :-)
Regards,
Arnout
[snip]
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF