All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration
@ 2019-03-09 14:10 Andreas Naumann
  2019-03-09 14:10 ` [Buildroot] [PATCH 1/2] qt5base: Fix inconsistencies when overriding qmake properties Andreas Naumann
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Andreas Naumann @ 2019-03-09 14:10 UTC (permalink / raw)
  To: buildroot

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(-)

-- 
2.21.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 1/2] qt5base: Fix inconsistencies when overriding qmake properties
  2019-03-09 14:10 [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Andreas Naumann
@ 2019-03-09 14:10 ` Andreas Naumann
  2019-03-09 14:10 ` [Buildroot] [PATCH 2/2] qt5: Prepare qmake for per-package infrastructure Andreas Naumann
  2019-03-09 14:22 ` [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Thomas Petazzoni
  2 siblings, 0 replies; 10+ messages in thread
From: Andreas Naumann @ 2019-03-09 14:10 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5base/qt.conf.in | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/package/qt5/qt5base/qt.conf.in b/package/qt5/qt5base/qt.conf.in
index 9a0b9cd53b..46ebe61614 100644
--- a/package/qt5/qt5base/qt.conf.in
+++ b/package/qt5/qt5base/qt.conf.in
@@ -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
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/2] qt5: Prepare qmake for per-package infrastructure
  2019-03-09 14:10 [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Andreas Naumann
  2019-03-09 14:10 ` [Buildroot] [PATCH 1/2] qt5base: Fix inconsistencies when overriding qmake properties Andreas Naumann
@ 2019-03-09 14:10 ` Andreas Naumann
  2019-03-09 14:22 ` [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Thomas Petazzoni
  2 siblings, 0 replies; 10+ messages in thread
From: Andreas Naumann @ 2019-03-09 14:10 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 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(-)

diff --git a/package/python-sip/python-sip.mk b/package/python-sip/python-sip.mk
index 69019f5f19..98c3c736d4 100644
--- a/package/python-sip/python-sip.mk
+++ b/package/python-sip/python-sip.mk
@@ -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
diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
index d8012a913d..e03660a8f9 100644
--- a/package/qt5/qt5.mk
+++ b/package/qt5/qt5.mk
@@ -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
diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk
index 48a931d60b..06db38ba82 100644
--- a/package/qt5/qt53d/qt53d.mk
+++ b/package/qt5/qt53d/qt53d.mk
@@ -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
diff --git a/package/qt5/qt5canvas3d/qt5canvas3d.mk b/package/qt5/qt5canvas3d/qt5canvas3d.mk
index ef5b373d02..1beec7b310 100644
--- a/package/qt5/qt5canvas3d/qt5canvas3d.mk
+++ b/package/qt5/qt5canvas3d/qt5canvas3d.mk
@@ -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
diff --git a/package/qt5/qt5charts/qt5charts.mk b/package/qt5/qt5charts/qt5charts.mk
index 9e2e6de881..405a4357d1 100644
--- a/package/qt5/qt5charts/qt5charts.mk
+++ b/package/qt5/qt5charts/qt5charts.mk
@@ -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
diff --git a/package/qt5/qt5connectivity/qt5connectivity.mk b/package/qt5/qt5connectivity/qt5connectivity.mk
index 6de1536b78..eeca32bc70 100644
--- a/package/qt5/qt5connectivity/qt5connectivity.mk
+++ b/package/qt5/qt5connectivity/qt5connectivity.mk
@@ -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
diff --git a/package/qt5/qt5declarative/qt5declarative.mk b/package/qt5/qt5declarative/qt5declarative.mk
index 2fe72b3be6..20166d8eb6 100644
--- a/package/qt5/qt5declarative/qt5declarative.mk
+++ b/package/qt5/qt5declarative/qt5declarative.mk
@@ -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
diff --git a/package/qt5/qt5enginio/qt5enginio.mk b/package/qt5/qt5enginio/qt5enginio.mk
index 38f309646f..89eb99879b 100644
--- a/package/qt5/qt5enginio/qt5enginio.mk
+++ b/package/qt5/qt5enginio/qt5enginio.mk
@@ -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
diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
index c5011a94f0..a2f0ba6b25 100644
--- a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
+++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
@@ -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
diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk
index fa13ebedaf..3d8f33af21 100644
--- a/package/qt5/qt5imageformats/qt5imageformats.mk
+++ b/package/qt5/qt5imageformats/qt5imageformats.mk
@@ -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
diff --git a/package/qt5/qt5location/qt5location.mk b/package/qt5/qt5location/qt5location.mk
index da0aad7961..7998e72eda 100644
--- a/package/qt5/qt5location/qt5location.mk
+++ b/package/qt5/qt5location/qt5location.mk
@@ -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
diff --git a/package/qt5/qt5multimedia/qt5multimedia.mk b/package/qt5/qt5multimedia/qt5multimedia.mk
index 27a65ce1ca..10a210e7a6 100644
--- a/package/qt5/qt5multimedia/qt5multimedia.mk
+++ b/package/qt5/qt5multimedia/qt5multimedia.mk
@@ -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
diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
index 3e0c5effb3..6add8d2be1 100644
--- a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
+++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
@@ -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
diff --git a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
index c2004c2ee7..a7dcf0a906 100644
--- a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
+++ b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
@@ -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
diff --git a/package/qt5/qt5script/qt5script.mk b/package/qt5/qt5script/qt5script.mk
index 4a292c95a5..65093f45a0 100644
--- a/package/qt5/qt5script/qt5script.mk
+++ b/package/qt5/qt5script/qt5script.mk
@@ -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
diff --git a/package/qt5/qt5scxml/qt5scxml.mk b/package/qt5/qt5scxml/qt5scxml.mk
index de9ece597c..33522a5b01 100644
--- a/package/qt5/qt5scxml/qt5scxml.mk
+++ b/package/qt5/qt5scxml/qt5scxml.mk
@@ -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
diff --git a/package/qt5/qt5sensors/qt5sensors.mk b/package/qt5/qt5sensors/qt5sensors.mk
index 2d5cf327a6..74681a6b97 100644
--- a/package/qt5/qt5sensors/qt5sensors.mk
+++ b/package/qt5/qt5sensors/qt5sensors.mk
@@ -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
diff --git a/package/qt5/qt5serialbus/qt5serialbus.mk b/package/qt5/qt5serialbus/qt5serialbus.mk
index 98c4466cb8..227c19e0b1 100644
--- a/package/qt5/qt5serialbus/qt5serialbus.mk
+++ b/package/qt5/qt5serialbus/qt5serialbus.mk
@@ -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
diff --git a/package/qt5/qt5serialport/qt5serialport.mk b/package/qt5/qt5serialport/qt5serialport.mk
index 2b0953586b..9d0a6882e6 100644
--- a/package/qt5/qt5serialport/qt5serialport.mk
+++ b/package/qt5/qt5serialport/qt5serialport.mk
@@ -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
diff --git a/package/qt5/qt5svg/qt5svg.mk b/package/qt5/qt5svg/qt5svg.mk
index 48ff04bd75..af6df94830 100644
--- a/package/qt5/qt5svg/qt5svg.mk
+++ b/package/qt5/qt5svg/qt5svg.mk
@@ -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
diff --git a/package/qt5/qt5tools/qt5tools.mk b/package/qt5/qt5tools/qt5tools.mk
index a972756d3a..aa20353c82 100644
--- a/package/qt5/qt5tools/qt5tools.mk
+++ b/package/qt5/qt5tools/qt5tools.mk
@@ -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
diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
index 8ce3169774..41d21a5ffd 100644
--- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
+++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
@@ -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
diff --git a/package/qt5/qt5wayland/qt5wayland.mk b/package/qt5/qt5wayland/qt5wayland.mk
index d6fb6e1888..9a5ee240f1 100644
--- a/package/qt5/qt5wayland/qt5wayland.mk
+++ b/package/qt5/qt5wayland/qt5wayland.mk
@@ -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
diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk
index f1c08532c0..91967acfbd 100644
--- a/package/qt5/qt5webchannel/qt5webchannel.mk
+++ b/package/qt5/qt5webchannel/qt5webchannel.mk
@@ -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
diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
index a3cfcec26e..4d251d9eb7 100644
--- a/package/qt5/qt5webengine/qt5webengine.mk
+++ b/package/qt5/qt5webengine/qt5webengine.mk
@@ -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
diff --git a/package/qt5/qt5webkit-examples/qt5webkit-examples.mk b/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
index 94153fd652..61d27adf93 100644
--- a/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
+++ b/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
@@ -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
diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk
index a0a0998d12..9b1b11e68a 100644
--- a/package/qt5/qt5webkit/qt5webkit.mk
+++ b/package/qt5/qt5webkit/qt5webkit.mk
@@ -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
diff --git a/package/qt5/qt5websockets/qt5websockets.mk b/package/qt5/qt5websockets/qt5websockets.mk
index c67db198db..87ce570fde 100644
--- a/package/qt5/qt5websockets/qt5websockets.mk
+++ b/package/qt5/qt5websockets/qt5websockets.mk
@@ -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
diff --git a/package/qt5/qt5x11extras/qt5x11extras.mk b/package/qt5/qt5x11extras/qt5x11extras.mk
index 9d54c11061..b7932ae152 100644
--- a/package/qt5/qt5x11extras/qt5x11extras.mk
+++ b/package/qt5/qt5x11extras/qt5x11extras.mk
@@ -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
diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
index 0a8b47ac53..ddc0911b75 100644
--- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
+++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
@@ -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
diff --git a/package/qt5cinex/qt5cinex.mk b/package/qt5cinex/qt5cinex.mk
index 89c38ee3f5..75b1b41665 100644
--- a/package/qt5cinex/qt5cinex.mk
+++ b/package/qt5cinex/qt5cinex.mk
@@ -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
diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
index f381ebbb7a..985de13d3d 100644
--- a/package/qwt/qwt.mk
+++ b/package/qwt/qwt.mk
@@ -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
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration
  2019-03-09 14:10 [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Andreas Naumann
  2019-03-09 14:10 ` [Buildroot] [PATCH 1/2] qt5base: Fix inconsistencies when overriding qmake properties Andreas Naumann
  2019-03-09 14:10 ` [Buildroot] [PATCH 2/2] qt5: Prepare qmake for per-package infrastructure Andreas Naumann
@ 2019-03-09 14:22 ` Thomas Petazzoni
  2019-03-10 14:57   ` Arnout Vandecappelle
  2019-03-10 16:06   ` Yann E. MORIN
  2 siblings, 2 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2019-03-09 14:22 UTC (permalink / raw)
  To: buildroot

Hello Andreas,

On Sat,  9 Mar 2019 15:10:20 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> 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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration
  2019-03-09 14:22 ` [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Thomas Petazzoni
@ 2019-03-10 14:57   ` Arnout Vandecappelle
  2019-03-11 11:17     ` Andreas Naumann
  2019-03-10 16:06   ` Yann E. MORIN
  1 sibling, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2019-03-10 14:57 UTC (permalink / raw)
  To: buildroot



On 09/03/2019 15:22, Thomas Petazzoni wrote:
> Hello Andreas,
> 
> On Sat,  9 Mar 2019 15:10:20 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> 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.

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

 Regards,
 Arnout


> 
> 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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration
  2019-03-09 14:22 ` [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Thomas Petazzoni
  2019-03-10 14:57   ` Arnout Vandecappelle
@ 2019-03-10 16:06   ` Yann E. MORIN
  2019-03-11 11:16     ` Andreas Naumann
  1 sibling, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2019-03-10 16:06 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2019-03-09 15:22 +0100, Thomas Petazzoni spake thusly:
> On Sat,  9 Mar 2019 15:10:20 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
> > 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 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.

> 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
> -- 
> 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

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration
  2019-03-10 16:06   ` Yann E. MORIN
@ 2019-03-11 11:16     ` Andreas Naumann
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Naumann @ 2019-03-11 11:16 UTC (permalink / raw)
  To: buildroot

Hi Thomas, Yann,...

Am 10.03.19 um 17:06 schrieb Yann E. MORIN:
> Thomas, All,
> 
> On 2019-03-09 15:22 +0100, Thomas Petazzoni spake thusly:
>> On Sat,  9 Mar 2019 15:10:20 +0100 Andreas Naumann
>> <anaumann@ultratronik.de> wrote:
>> 
>>> 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.

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...

> 
> 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



> 
> This would have nicely worked-around this issue.> Regards, Yann E.
> MORIN.
> 
>> 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 -- 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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration
  2019-03-10 14:57   ` Arnout Vandecappelle
@ 2019-03-11 11:17     ` Andreas Naumann
  2019-03-11 13:06       ` Arnout Vandecappelle
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Naumann @ 2019-03-11 11:17 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:
> 
> 
> 
>   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?

>   Regards,
>   Arnout
> 
> 
>>
>> 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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration
  2019-03-11 11:17     ` Andreas Naumann
@ 2019-03-11 13:06       ` Arnout Vandecappelle
  2019-03-11 13:45         ` Andreas Naumann
  0 siblings, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2019-03-11 13:06 UTC (permalink / raw)
  To: buildroot



On 11/03/2019 12:17, Andreas Naumann wrote:
> Hi Arnout,
> 
> Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:
>>
>>
>>
>> ? 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

> 
>> ? Regards,
>> ? Arnout
>>
>>
>>>
>>> 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
>>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration
  2019-03-11 13:06       ` Arnout Vandecappelle
@ 2019-03-11 13:45         ` Andreas Naumann
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Naumann @ 2019-03-11 13:45 UTC (permalink / raw)
  To: buildroot



Am 11.03.19 um 14:06 schrieb Arnout Vandecappelle:
> 
> 
> On 11/03/2019 12:17, Andreas Naumann wrote:
>> Hi Arnout,
>>
>> Am 10.03.19 um 15:57 schrieb Arnout Vandecappelle:
>>>
>>>
>>>
>>>  ? 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.

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

regards,
Andreas


> 
>   The qmake binary would still be provided by qt5base, and qt5base would
> obviously not be a qmake-package.
> 
>   Regards,
>   Arnout
> 
>>
>>>  ? Regards,
>>>  ? Arnout
>>>
>>>
>>>>
>>>> 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
>>>
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-03-11 13:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-09 14:10 [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Andreas Naumann
2019-03-09 14:10 ` [Buildroot] [PATCH 1/2] qt5base: Fix inconsistencies when overriding qmake properties Andreas Naumann
2019-03-09 14:10 ` [Buildroot] [PATCH 2/2] qt5: Prepare qmake for per-package infrastructure Andreas Naumann
2019-03-09 14:22 ` [Buildroot] [PATCH 0/2] ppsh compatible Qt5 configuration Thomas Petazzoni
2019-03-10 14:57   ` Arnout Vandecappelle
2019-03-11 11:17     ` Andreas Naumann
2019-03-11 13:06       ` Arnout Vandecappelle
2019-03-11 13:45         ` Andreas Naumann
2019-03-10 16:06   ` Yann E. MORIN
2019-03-11 11:16     ` Andreas Naumann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.