Skip to contentSkip to conversation

ppsh compatible Qt5 configuration

PATCH Superseded Andreas Naumann 5 participants 10 messages Mar 9, 2019 – Mar 11, 2019

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover ppsh compatible Qt5 configuration

Hi Thomas,

you were asking for ideas on "Making the Qt5 packaging compatible with per-package folder". Lately I had some time to look into it and came up with the following patches. Basically they use a custom qt.conf to manipulate qmakes builtin pathes. Details are in the commit-messages.

I did a compile test with almost all qt5 modules available, as well as other buildroot provided qt5 applications. At the moment I dont have equipment for runtime tests. As far as I could see the install procedure now works as expected, no more failures.
Unfortunately webengine and webkit-example failed sometime during the build but it seems that these were unrelated issues.

In pyqt5, where I did not integrate the qt.conf fixup because the path to qmake is just a configure option, the install pathes were correct nonetheless. Maybe their .pro files detect/set/fix them some other way. However, the pyqt5 configure step did not pickup most of the qt5-modules because they are not set as a dependency. But this is another story.

regards,
Andreas

Andreas Naumann (2):
qt5base: Fix inconsistencies when overriding qmake properties
qt5: Prepare qmake for per-package infrastructure

 package/python-sip/python-sip.mk                |  3 ++-
 package/qt5/qt5.mk                              |  9 ++++++++-
 package/qt5/qt53d/qt53d.mk                      |  3 ++-
 package/qt5/qt5base/qt.conf.in                  | 17 +++--------------
 package/qt5/qt5canvas3d/qt5canvas3d.mk          |  3 ++-
 package/qt5/qt5charts/qt5charts.mk              |  3 ++-
 package/qt5/qt5connectivity/qt5connectivity.mk  |  3 ++-
 package/qt5/qt5declarative/qt5declarative.mk    |  3 ++-
 package/qt5/qt5enginio/qt5enginio.mk            |  3 ++-
 .../qt5graphicaleffects/qt5graphicaleffects.mk  |  3 ++-
 package/qt5/qt5imageformats/qt5imageformats.mk  |  3 ++-
 package/qt5/qt5location/qt5location.mk          |  3 ++-
 package/qt5/qt5multimedia/qt5multimedia.mk      |  3 ++-
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk    |  3 ++-
 .../qt5/qt5quickcontrols2/qt5quickcontrols2.mk  |  3 ++-
 package/qt5/qt5script/qt5script.mk              |  3 ++-
 package/qt5/qt5scxml/qt5scxml.mk                |  3 ++-
 package/qt5/qt5sensors/qt5sensors.mk            |  3 ++-
 package/qt5/qt5serialbus/qt5serialbus.mk        |  3 ++-
 package/qt5/qt5serialport/qt5serialport.mk      |  3 ++-
 package/qt5/qt5svg/qt5svg.mk                    |  3 ++-
 package/qt5/qt5tools/qt5tools.mk                |  3 ++-
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk    |  3 ++-
 package/qt5/qt5wayland/qt5wayland.mk            |  3 ++-
 package/qt5/qt5webchannel/qt5webchannel.mk      |  3 ++-
 package/qt5/qt5webengine/qt5webengine.mk        |  3 ++-
 .../qt5webkit-examples/qt5webkit-examples.mk    |  3 ++-
 package/qt5/qt5webkit/qt5webkit.mk              |  3 ++-
 package/qt5/qt5websockets/qt5websockets.mk      |  3 ++-
 package/qt5/qt5x11extras/qt5x11extras.mk        |  3 ++-
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk    |  3 ++-
 package/qt5cinex/qt5cinex.mk                    |  3 ++-
 package/qwt/qwt.mk                              |  1 +
 33 files changed, 72 insertions(+), 45 deletions(-)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/2 qt5base: Fix inconsistencies when overriding qmake properties

When querying the qmake properties with our custom qt.conf present, I noticed that they were different from the built-in ones (without qt.conf). Most notably QT_INSTALL_PREFIX was a concatenated string of two absolute pathes (hostdir + sysroot).

This is due to Prefix being set to our HOST_DIR and HostPrefix not being set at all. I guess this was also the root cause of the initial problem with qt.conf.in, because once Prefix and HostPrefix were set to their correct values, re-setting all the other default pathes became obsolete. (However, since our pathes for Headers, Plugins and Examples are non-default, they still have to be explicitely set.)

There is one additional exception to this: Omitting 'Settings' leads to the CONFIGURATION path being plain /usr, whereas the default without qt.conf is /usr/etc/xdg. Thus 'Settings' is now also explicitely set, in order to keep behaviour with/without qt.conf as similar as possible.

---
 package/qt5/qt5base/qt.conf.in | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)
package/qt5/qt5base/qt.conf.in +3 -14
index 9a0b9cd53b..46ebe61614 100644
@@ -1,19 +1,8 @@
 [Paths]
-Prefix=@@HOST_DIR@@
+Prefix=/usr
+HostPrefix=@@HOST_DIR@@
 Sysroot=@@STAGING_DIR@@
 Headers=/usr/include/qt5
-Libraries=/usr/lib
-LibraryExecutables=/usr/libexec
-Binaries=/usr/bin
 Plugins=/usr/lib/qt/plugins
 Examples=/usr/lib/qt/examples
-Qml2Imports=/usr/qml
-Imports=/usr/imports
-Translations=/usr/translations
-Examples=/usr/lib/qt/examples
-Demos=/usr/lib/qt/examples
-Tests=/usr/tests
-Settings=/usr
-Documentation=/usr/doc
-ArchData=/usr
-Data=/usr
+Settings=/usr/etc/xdg
Signature · 1 line
2.21.0
#2 lore raw

PATCH 2/2 qt5: Prepare qmake for per-package infrastructure

In reply to Andreas Naumann

Qmake configured packages will, by default, use the absolute HostPrefix/Sysroot pathes set during configuration/building of qt5base for their install destinations.
For the per-package host/staging infrastructure, this causes non-qt5base packages to litter the qt5base folders. In addition, buildroots target-install step subsequently fails because the respective files are missing from the proper locations of the package itself.

Fortunately, qmake's built-in pathes can be overridden by either placing a custom qt.conf next to the qmake binary or running qmake with the -qtconf parameter.
The former variant is already used to facilitate SDK relocation. So for per- package path manipulation we can reuse the existing qt.conf. But rather than in place, a modified copy is created in the package's build folder. While this makes it necessary to change all calls to qmake (for which a variable already exists), it avoids headaches when finally merging the per-package host folders.

Finally, QT5_QMAKE was extended and is now used consistently, together with the qt.conf fixup, in all respective packages.

---
 package/python-sip/python-sip.mk                       | 3 ++-
 package/qt5/qt5.mk                                     | 9 ++++++++-
 package/qt5/qt53d/qt53d.mk                             | 3 ++-
 package/qt5/qt5canvas3d/qt5canvas3d.mk                 | 3 ++-
 package/qt5/qt5charts/qt5charts.mk                     | 3 ++-
 package/qt5/qt5connectivity/qt5connectivity.mk         | 3 ++-
 package/qt5/qt5declarative/qt5declarative.mk           | 3 ++-
 package/qt5/qt5enginio/qt5enginio.mk                   | 3 ++-
 package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk | 3 ++-
 package/qt5/qt5imageformats/qt5imageformats.mk         | 3 ++-
 package/qt5/qt5location/qt5location.mk                 | 3 ++-
 package/qt5/qt5multimedia/qt5multimedia.mk             | 3 ++-
 package/qt5/qt5quickcontrols/qt5quickcontrols.mk       | 3 ++-
 package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk     | 3 ++-
 package/qt5/qt5script/qt5script.mk                     | 3 ++-
 package/qt5/qt5scxml/qt5scxml.mk                       | 3 ++-
 package/qt5/qt5sensors/qt5sensors.mk                   | 3 ++-
 package/qt5/qt5serialbus/qt5serialbus.mk               | 3 ++-
 package/qt5/qt5serialport/qt5serialport.mk             | 3 ++-
 package/qt5/qt5svg/qt5svg.mk                           | 3 ++-
 package/qt5/qt5tools/qt5tools.mk                       | 3 ++-
 package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk   | 3 ++-
 package/qt5/qt5wayland/qt5wayland.mk                   | 3 ++-
 package/qt5/qt5webchannel/qt5webchannel.mk             | 3 ++-
 package/qt5/qt5webengine/qt5webengine.mk               | 3 ++-
 package/qt5/qt5webkit-examples/qt5webkit-examples.mk   | 3 ++-
 package/qt5/qt5webkit/qt5webkit.mk                     | 3 ++-
 package/qt5/qt5websockets/qt5websockets.mk             | 3 ++-
 package/qt5/qt5x11extras/qt5x11extras.mk               | 3 ++-
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk           | 3 ++-
 package/qt5cinex/qt5cinex.mk                           | 3 ++-
 package/qwt/qwt.mk                                     | 1 +
 32 files changed, 69 insertions(+), 31 deletions(-)
package/python-sip/python-sip.mk +2 -1
index 69019f5f19..98c3c736d4 100644
@@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
 endef
 
 define PYTHON_SIP_CONFIGURE_CMDS
+	$(QT5_QTCONF_FIXUP)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
 			--bindir $(TARGET_DIR)/usr/bin \
@@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
 			--sipdir $(TARGET_DIR)/usr/share/sip \
 			--sysroot $(STAGING_DIR)/usr \
 			--use-qmake && \
-		$(HOST_DIR)/bin/qmake)
+		$(QT5_QMAKE))
 endef
 
 define PYTHON_SIP_BUILD_CMDS
package/qt5/qt5.mk +8 -1
index d8012a913d..e03660a8f9 100644
@@ -32,5 +32,12 @@ define QT5_LA_PRL_FILES_FIXUP
 	done
 endef
 
+
+define QT5_QTCONF_FIXUP
+	sed -e "s#^HostPrefix.*#HostPrefix=$(HOST_DIR)#g" \
+	    -e "s#^Sysroot.*#Sysroot=$(STAGING_DIR)#g" $(HOST_DIR)/bin/qt.conf \
+	    > $(@D)/qt.conf
+endef
+
 # Variable for other Qt applications to use
-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ -qtconf $(@D)/qt.conf
package/qt5/qt53d/qt53d.mk +2 -1
index 48a931d60b..06db38ba82 100644
@@ -18,7 +18,8 @@ QT53D_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0
 QT53D_LICENSE_FILES = LICENSE.GPL LICENSE.GPLv3 LICENSE.LGPLv3
 
 define QT53D_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT53D_BUILD_CMDS
package/qt5/qt5canvas3d/qt5canvas3d.mk +2 -1
index ef5b373d02..1beec7b310 100644
@@ -19,7 +19,8 @@ QT5CANVAS3D_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3
 endif
 
 define QT5CANVAS3D_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5CANVAS3D_BUILD_CMDS
package/qt5/qt5charts/qt5charts.mk +2 -1
index 9e2e6de881..405a4357d1 100644
@@ -25,7 +25,8 @@ QT5CHARTS_DEPENDENCIES += qt5declarative
 endif
 
 define QT5CHARTS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5CHARTS_BUILD_CMDS
package/qt5/qt5connectivity/qt5connectivity.mk +2 -1
index 6de1536b78..eeca32bc70 100644
@@ -27,7 +27,8 @@ QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_BLUEZ5_UTILS),bluez5_utils)
 QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_NEARD),neard)
 
 define QT5CONNECTIVITY_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5CONNECTIVITY_BUILD_CMDS
package/qt5/qt5declarative/qt5declarative.mk +2 -1
index 2fe72b3be6..20166d8eb6 100644
@@ -19,7 +19,8 @@ QT5DECLARATIVE_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt
 endif
 
 define QT5DECLARATIVE_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5DECLARATIVE_BUILD_CMDS
package/qt5/qt5enginio/qt5enginio.mk +2 -1
index 38f309646f..89eb99879b 100644
@@ -23,7 +23,8 @@ QT5ENGINIO_DEPENDENCIES += qt5declarative
 endif
 
 define QT5ENGINIO_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5ENGINIO_BUILD_CMDS
package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk +2 -1
index c5011a94f0..a2f0ba6b25 100644
@@ -19,7 +19,8 @@ QT5GRAPHICALEFFECTS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21
 endif
 
 define QT5GRAPHICALEFFECTS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5GRAPHICALEFFECTS_BUILD_CMDS
package/qt5/qt5imageformats/qt5imageformats.mk +2 -1
index fa13ebedaf..3d8f33af21 100644
@@ -19,7 +19,8 @@ QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL
 endif
 
 define QT5IMAGEFORMATS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5IMAGEFORMATS_BUILD_CMDS
package/qt5/qt5location/qt5location.mk +2 -1
index da0aad7961..7998e72eda 100644
@@ -23,7 +23,8 @@ QT5LOCATION_DEPENDENCIES += qt5declarative
 endif
 
 define QT5LOCATION_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5LOCATION_BUILD_CMDS
package/qt5/qt5multimedia/qt5multimedia.mk +2 -1
index 27a65ce1ca..10a210e7a6 100644
@@ -35,7 +35,8 @@ QT5MULTIMEDIA_DEPENDENCIES += alsa-lib
 endif
 
 define QT5MULTIMEDIA_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5MULTIMEDIA_BUILD_CMDS
package/qt5/qt5quickcontrols/qt5quickcontrols.mk +2 -1
index 3e0c5effb3..6add8d2be1 100644
@@ -19,7 +19,8 @@ QT5QUICKCONTROLS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICE
 endif
 
 define QT5QUICKCONTROLS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5QUICKCONTROLS_BUILD_CMDS
package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk +2 -1
index c2004c2ee7..a7dcf0a906 100644
@@ -14,7 +14,8 @@ QT5QUICKCONTROLS2_LICENSE = GPL-3.0 or LGPL-3.0, GFDL-1.3 (docs)
 QT5QUICKCONTROLS2_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
 
 define QT5QUICKCONTROLS2_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5QUICKCONTROLS2_BUILD_CMDS
package/qt5/qt5script/qt5script.mk +2 -1
index 4a292c95a5..65093f45a0 100644
@@ -28,7 +28,8 @@ QT5SCRIPT_LICENSE_FILES += \
 	src/3rdparty/javascriptcore/JavaScriptCore/pcre/COPYING
 
 define QT5SCRIPT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5SCRIPT_BUILD_CMDS
package/qt5/qt5scxml/qt5scxml.mk +2 -1
index de9ece597c..33522a5b01 100644
@@ -17,7 +17,8 @@ QT5SCXML_LICENSE := $(QT5SCXML_LICENSE), BSD-3-Clause (examples)
 endif
 
 define QT5SCXML_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5SCXML_BUILD_CMDS
package/qt5/qt5sensors/qt5sensors.mk +2 -1
index 2d5cf327a6..74681a6b97 100644
@@ -23,7 +23,8 @@ QT5SENSORS_DEPENDENCIES += qt5declarative
 endif
 
 define QT5SENSORS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5SENSORS_BUILD_CMDS
package/qt5/qt5serialbus/qt5serialbus.mk +2 -1
index 98c4466cb8..227c19e0b1 100644
@@ -14,7 +14,8 @@ QT5SERIALBUS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0, GFDL-1.3 (docs)
 QT5SERIALBUS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
 
 define QT5SERIALBUS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5SERIALBUS_BUILD_CMDS
package/qt5/qt5serialport/qt5serialport.mk +2 -1
index 2b0953586b..9d0a6882e6 100644
@@ -19,7 +19,8 @@ QT5SERIALPORT_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_E
 endif
 
 define QT5SERIALPORT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5SERIALPORT_BUILD_CMDS
package/qt5/qt5svg/qt5svg.mk +2 -1
index 48ff04bd75..af6df94830 100644
@@ -19,7 +19,8 @@ QT5SVG_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.
 endif
 
 define QT5SVG_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5SVG_BUILD_CMDS
package/qt5/qt5tools/qt5tools.mk +2 -1
index a972756d3a..aa20353c82 100644
@@ -49,7 +49,8 @@ QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO) += qtplugininfo
 QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO) += qtplugininfo
 
 define QT5TOOLS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5TOOLS_BUILD_CMDS
package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk +2 -1
index 8ce3169774..41d21a5ffd 100644
@@ -64,7 +64,8 @@ endef
 endif
 
 define QT5VIRTUALKEYBOARD_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake $(QT5VIRTUALKEYBOARD_QMAKEFLAGS))
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) $(QT5VIRTUALKEYBOARD_QMAKEFLAGS))
 endef
 
 define QT5VIRTUALKEYBOARD_BUILD_CMDS
package/qt5/qt5wayland/qt5wayland.mk +2 -1
index d6fb6e1888..9a5ee240f1 100644
@@ -31,7 +31,8 @@ QT5WAYLAND_QMAKEFLAGS += CONFIG+=wayland-compositor
 endif
 
 define QT5WAYLAND_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake $(QT5WAYLAND_QMAKEFLAGS))
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) $(QT5WAYLAND_QMAKEFLAGS))
 endef
 
 define QT5WAYLAND_BUILD_CMDS
package/qt5/qt5webchannel/qt5webchannel.mk +2 -1
index f1c08532c0..91967acfbd 100644
@@ -26,7 +26,8 @@ QT5WEBCHANNEL_DEPENDENCIES += qt5declarative
 endif
 
 define QT5WEBCHANNEL_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5WEBCHANNEL_BUILD_CMDS
package/qt5/qt5webengine/qt5webengine.mk +2 -1
index a3cfcec26e..4d251d9eb7 100644
@@ -64,7 +64,8 @@ QT5WEBENGINE_ENV += GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config
 endif
 
 define QT5WEBENGINE_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(HOST_DIR)/bin/qmake $(QT5WEBENGINE_QMAKEFLAGS))
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(QT5_QMAKE) $(QT5WEBENGINE_QMAKEFLAGS))
 endef
 
 define QT5WEBENGINE_BUILD_CMDS
package/qt5/qt5webkit-examples/qt5webkit-examples.mk +2 -1
index 94153fd652..61d27adf93 100644
@@ -27,7 +27,8 @@ QT5WEBKIT_EXAMPLES_DEPENDENCIES += qt5xmlpatterns
 endif
 
 define QT5WEBKIT_EXAMPLES_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5WEBKIT_EXAMPLES_BUILD_CMDS
package/qt5/qt5webkit/qt5webkit.mk +2 -1
index a0a0998d12..9b1b11e68a 100644
@@ -45,7 +45,8 @@ endef
 QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
 
 define QT5WEBKIT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(HOST_DIR)/bin/qmake WEBKIT_CONFIG+=use_system_leveldb)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(QT5_QMAKE) WEBKIT_CONFIG+=use_system_leveldb)
 endef
 
 define QT5WEBKIT_BUILD_CMDS
package/qt5/qt5websockets/qt5websockets.mk +2 -1
index c67db198db..87ce570fde 100644
@@ -26,7 +26,8 @@ QT5WEBSOCKETS_DEPENDENCIES += qt5declarative
 endif
 
 define QT5WEBSOCKETS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5WEBSOCKETS_BUILD_CMDS
package/qt5/qt5x11extras/qt5x11extras.mk +2 -1
index 9d54c11061..b7932ae152 100644
@@ -19,7 +19,8 @@ QT5X11EXTRAS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EX
 endif
 
 define QT5X11EXTRAS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5X11EXTRAS_BUILD_CMDS
package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk +2 -1
index 0a8b47ac53..ddc0911b75 100644
@@ -22,7 +22,8 @@ QT5XMLPATTERNS_LICENSE := $(QT5XMLPATTERNS_LICENSE), BSD-3-Clause (examples)
 endif
 
 define QT5XMLPATTERNS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
+	$(QT5_QTCONF_FIXUP)
+	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
 define QT5XMLPATTERNS_BUILD_CMDS
package/qt5cinex/qt5cinex.mk +2 -1
index 89c38ee3f5..75b1b41665 100644
@@ -18,7 +18,8 @@ QT5CINEX_LICENSE = CC-BY-3.0
 QT5CINEX_LICENSE_FILES = README
 
 define QT5CINEX_CONFIGURE_CMDS
-	cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake
+	$(QT5_QTCONF_FIXUP)
+	cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE)
 endef
 
 define QT5CINEX_BUILD_CMDS
package/qwt/qwt.mk +1 -0
index f381ebbb7a..985de13d3d 100644
@@ -43,6 +43,7 @@ endif
 
 define QWT_CONFIGURE_CMDS
 	$(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
+	$(QT5_QTCONF_FIXUP)
 	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
Signature · 1 line
2.21.0
#3 lore raw

cover ppsh compatible Qt5 configuration

In reply to Andreas Naumann

Hello Andreas,

Quoted 11 lines · On Sat, 9 Mar 2019 15:10:20 +0100 Andreas Naumann <[email protected]>…

you were asking for ideas on "Making the Qt5 packaging compatible with per-package folder". Lately I had some time to look into it and came up with the following patches. Basically they use a custom qt.conf to manipulate qmakes builtin pathes. Details are in the commit-messages.

I did a compile test with almost all qt5 modules available, as well as other buildroot provided qt5 applications. At the moment I dont have equipment for runtime tests. As far as I could see the install procedure now works as expected, no more failures.
Unfortunately webengine and webkit-example failed sometime during the build but it seems that these were unrelated issues.

Thanks a lot for looking into this!

However, there is one thing that this doesn't seem to address: the installation part.

Currently, the staging installation is just:

make install

with no DESTDIR/INSTALL_ROOT, and therefore for the target installation, we have to manually install libraries, QML files and other stuff, which is really annoying to maintain. Ideally, we would like Qt5 to behave like most other packages, and do:

	make INSTALL_ROOT=$(STAGING_DIR) install

for the staging installation, and:

	make INSTALL_ROOT=$(TARGET_DIR) install

for the target installation. This change is not strictly needed for per-package host/target directories, but I really would like to take the opportunity of changing all this Qt5 logic to also address this related problem.

I had prepared something like this:
https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
but I don't remember if it was working completely or not.

Thanks,

Thomas

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

cover ppsh compatible Qt5 configuration

Quoted 33 lines · Thomas Petazzoni

Hello Andreas,

Quoted 11 lines · On Sat, 9 Mar 2019 15:10:20 +0100 Andreas Naumann <[email protected]>…

you were asking for ideas on "Making the Qt5 packaging compatible with per-package folder". Lately I had some time to look into it and came up with the following patches. Basically they use a custom qt.conf to manipulate qmakes builtin pathes. Details are in the commit-messages.

I did a compile test with almost all qt5 modules available, as well as other buildroot provided qt5 applications. At the moment I dont have equipment for runtime tests. As far as I could see the install procedure now works as expected, no more failures.
Unfortunately webengine and webkit-example failed sometime during the build but it seems that these were unrelated issues.

Thanks a lot for looking into this!

However, there is one thing that this doesn't seem to address: the installation part.

Currently, the staging installation is just:

make install

with no DESTDIR/INSTALL_ROOT, and therefore for the target installation, we have to manually install libraries, QML files and other stuff, which is really annoying to maintain. Ideally, we would like Qt5 to behave like most other packages, and do:

	make INSTALL_ROOT=$(STAGING_DIR) install
Quoted 8 lines

for the staging installation, and:

	make INSTALL_ROOT=$(TARGET_DIR) install

for the target installation. This change is not strictly needed for per-package host/target directories, but I really would like to take the opportunity of changing all this Qt5 logic to also address this related problem.

And maybe also take the opportunity to add qmake infra. That would make changes
like this patch a lot easier.

Regards,
Arnout

Quoted 9 lines

I had prepared something like this:
https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
but I don't remember if it was working completely or not.

Thanks,

Thomas

#5 lore raw

cover ppsh compatible Qt5 configuration

Hi Arnout,

Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:

Quoted 6 lines

And maybe also take the opportunity to add qmake infra. That would make changes
like this patch a lot easier.

I'm not quite sure what this means. An extra qmake-package?

Quoted 18 lines

Regards,
Arnout

Quoted 9 lines

I had prepared something like this:
https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
but I don't remember if it was working completely or not.

Thanks,

Thomas

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

cover ppsh compatible Qt5 configuration

Quoted 11 lines · Andreas Naumann

Hi Arnout,

Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:

Quoted 6 lines

? And maybe also take the opportunity to add qmake infra. That would make changes like this patch a lot easier.

I'm not quite sure what this means. An extra qmake-package?

We now have infra for several build systems: autotools, cmake, ...

We don't have anything for qmake. Instead, qmake packages use the
generic-package instrastructure, with custom commands to call qmake and make.

My proposal would be to add qmake-package as an infra, similar to e.g.
cmake-package.

The qmake binary would still be provided by qt5base, and qt5base would
obviously not be a qmake-package.

Regards,
Arnout

Quoted 20 lines
Quoted 20 lines

? Regards,
? Arnout

Quoted 10 lines

I had prepared something like this:
https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,

but I don't remember if it was working completely or not.

Thanks,

Thomas

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#7 lore raw

cover ppsh compatible Qt5 configuration

Am 11.03.19 um 14:06 schrieb Arnout Vandecappelle:

Quoted 15 lines · Andreas Naumann
Quoted 11 lines

Hi Arnout,

Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:

Quoted 6 lines

? And maybe also take the opportunity to add qmake infra. That would make changes
like this patch a lot easier.

I'm not quite sure what this means. An extra qmake-package?

Quoted 7 lines

We now have infra for several build systems: autotools, cmake, ...

We don't have anything for qmake. Instead, qmake packages use the
generic-package instrastructure, with custom commands to call qmake and make.

My proposal would be to add qmake-package as an infra, similar to e.g.
cmake-package.

aah, package/pkg-qmake.mk I see. I'll keep that in mind.

regards,
Andreas

Quoted 28 lines

The qmake binary would still be provided by qt5base, and qt5base would
obviously not be a qmake-package.

Regards,
Arnout

Quoted 20 lines
Quoted 20 lines

? Regards,
? Arnout

Quoted 10 lines

I had prepared something like this:
https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,

but I don't remember if it was working completely or not.

Thanks,

Thomas

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#8 lore raw

cover ppsh compatible Qt5 configuration

In reply to Thomas Petazzoni

Thomas, All,

On 2019-03-09 15:22 +0100, Thomas Petazzoni spake thusly:

Quoted 31 lines
Quoted 11 lines · On Sat, 9 Mar 2019 15:10:20 +0100 Andreas Naumann <[email protected]>…

you were asking for ideas on "Making the Qt5 packaging compatible with per-package folder". Lately I had some time to look into it and came up with the following patches. Basically they use a custom qt.conf to manipulate qmakes builtin pathes. Details are in the commit-messages.

I did a compile test with almost all qt5 modules available, as well as other buildroot provided qt5 applications. At the moment I dont have equipment for runtime tests. As far as I could see the install procedure now works as expected, no more failures.
Unfortunately webengine and webkit-example failed sometime during the build but it seems that these were unrelated issues.

Thanks a lot for looking into this!

However, there is one thing that this doesn't seem to address: the installation part.

Currently, the staging installation is just:

make install

with no DESTDIR/INSTALL_ROOT, and therefore for the target installation, we have to manually install libraries, QML files and other stuff, which is really annoying to maintain. Ideally, we would like Qt5 to behave like most other packages, and do:

	make INSTALL_ROOT=$(STAGING_DIR) install
Quoted 8 lines

for the staging installation, and:

	make INSTALL_ROOT=$(TARGET_DIR) install

for the target installation. This change is not strictly needed for per-package host/target directories, but I really would like to take the opportunity of changing all this Qt5 logic to also address this related problem.

I still believe a long-term goal would be to actually only ever install everything in staging, and generate target right at the end as a copy from staging as a starting point for all the cleaning we already do in target-finalize.

This would have nicely worked-around this issue.

Regards,
Yann E. MORIN.

Quoted 15 lines

I had prepared something like this:
https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,
but I don't remember if it was working completely or not.

Thanks,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

cover ppsh compatible Qt5 configuration

Hi Thomas, Yann,...

Am 10.03.19 um 17:06 schrieb Yann E. MORIN:

Quoted 43 lines

Thomas, All,

On 2019-03-09 15:22 +0100, Thomas Petazzoni spake thusly:

Quoted 40 lines
Quoted 6 lines · On Sat, 9 Mar 2019 15:10:20 +0100 Andreas Naumann <[email protected]>…

you were asking for ideas on "Making the Qt5 packaging compatible with per-package folder". Lately I had some time to look into it and came up with the following patches. Basically they use a custom qt.conf to manipulate qmakes builtin pathes. Details are in the commit-messages.

Quoted 6 lines

I did a compile test with almost all qt5 modules available, as well as other buildroot provided qt5 applications. At the moment I dont have equipment for runtime tests. As far as I could see the install procedure now works as expected, no more failures. Unfortunately webengine and webkit-example failed sometime during the build but it seems that these were unrelated issues.

Thanks a lot for looking into this!

However, there is one thing that this doesn't seem to address: the installation part.

Currently, the staging installation is just:

make install

with no DESTDIR/INSTALL_ROOT, and therefore for the target installation, we have to manually install libraries, QML files and other stuff, which is really annoying to maintain. Ideally, we would like Qt5 to behave like most other packages, and do:

make INSTALL_ROOT=$(STAGING_DIR) install

for the staging installation, and:

make INSTALL_ROOT=$(TARGET_DIR) install

for the target installation. This change is not strictly needed for per-package host/target directories, but I really would like to take the opportunity of changing all this Qt5 logic to also address this related problem.

thank you for your feedback. I totally understand the issue and would of course also like to reduce the maintenance burden.
Now, I have also fiddled with extprefix and found out, just like you, that we can't really use INSTALL_ROOT without additional, more or less hacky, fixups.

Looking for a simpler solution, I had one more idea with extprefix, that is to set it to e.g. .../sysroot_qtonly/usr and install everthing there as part of the build step. The staging-/target-install steps would then just copy everything from the extprefix path to their respective locations. This should avoid littering staging/target with host files.

Some local tests indicate that this could be implemented even without explicitely setting extprefix but using the SysrootifyPrefix=false setting in our custom qt.conf. That would allow to apply the solution for the per-package use case (without reworking the Makefiles). However...

Quoted 5 lines

I still believe a long-term goal would be to actually only ever install everything in staging, and generate target right at the end as a copy from staging as a starting point for all the cleaning we already do in target-finalize.

... the QT install step copies a lot of files that we don't need in target. Cleaning them and "forgetting" to maintain what to clean during version bumps, could lead to useless stuff accumulating in target. Personally I'm more fond of positive lists, because it creates a more minimal-by-default policy. However, if it is decided to "shoot first and ask questions later :-)" I'm happy to try a v2 in that way.

That is, for Qt5 only. Doing this in a generic way for all packages sounds like a pretty demanding task.

Regards,
Andreas

Quoted 8 lines

This would have nicely worked-around this issue.> Regards, Yann E. MORIN.

Quoted 4 lines

I had prepared something like this:
https://github.com/tpetazzoni/buildroot/commit/05e776abf531319a749f5a7d65f265979ea6c4ab,

but I don't remember if it was working completely or not.

Quoted 9 lines
Quoted 8 lines

Thanks,

Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
_______________________________________________ buildroot mailing list buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot