Skip to contentSkip to conversation

Qt5 qmake infra with generic target install

PATCH Superseded Andreas Naumann 4 participants 33 messages Mar 22, 2019 – Apr 15, 2019

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v4 cover Qt5 qmake infra with generic target install

Hi all,

here is the fourth iteration of my efforts to prepare Qt5 packages for ppsh.

Originally I had prepared v3 with a fix for the reinstall issue found by Thomas, which included conversion to a new qmake infra as suggested by Arnout.

However, having done that I had the idea to use a folder inside the package build dir as INSTALL_ROOT, which makes it possible to to isolate the staging files and copy them to target without relying on timestamps. So I ditched v3 and carried on doing that as v4. (If somebody is interested in v3 I can still
send it.)

This avoids the controversial discussed "install to staging only" approach, for which I'm not sure if it actually has enough advantages to be worth the hassle of dealing with timestamps and such.

regards,
Andreas

v3 -> v4:
- changed time-stamp based target install to using INSTALL_ROOT
- exclude ppsh specific patches

v2 -> v3 (not published):
- convert to qmake infra
- use a custom .stamp_staging_started to fix the -reinstall issue

v1 -> v2:
- added generic qmake target install
- added removal of la/prl fixup (optional)
- rebased and reordered (together with ppsh-v7) on master
- split patches to separate qmake rework from ppsh specifics
- added handling of pkg-config search pathes for ppsh

Andreas Naumann (6):
qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
qt5: Provide generic qmake package infrastructure
qt5: Convert packages to qmake infra
quazip: Patch .pro file to correctly crosscompile and use qmake infra
qt5base: Fix inconsistencies when overriding qmake properties
qt5: Remove *.la/*.prl fixup script

 package/Makefile.in                           |   1 +
 package/pkg-qmake.mk                          | 108 ++++++++++++++++++
 package/qextserialport/qextserialport.mk      |  22 +---
 package/qt-webkit-kiosk/qt-webkit-kiosk.mk    |  11 +-
 package/qt5/qt53d/qt53d.mk                    |  39 +------
 package/qt5/qt5base/qt.conf.in                |  17 +--
 package/qt5/qt5base/qt5base.mk                |  88 ++------------
 package/qt5/qt5canvas3d/qt5canvas3d.mk        |  26 +----
 package/qt5/qt5charts/qt5charts.mk            |  41 +------
 .../qt5/qt5connectivity/qt5connectivity.mk    |  60 +---------
 package/qt5/qt5declarative/qt5declarative.mk  |  48 +-------
 package/qt5/qt5enginio/qt5enginio.mk          |  39 +------
 .../qt5graphicaleffects.mk                    |  18 +--
 .../qt5/qt5imageformats/qt5imageformats.mk    |  20 +---
 package/qt5/qt5location/qt5location.mk        |  50 +-------
 package/qt5/qt5multimedia/qt5multimedia.mk    |  47 +-------
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk  |  41 +------
 .../qt5quickcontrols2/qt5quickcontrols2.mk    |  40 +------
 package/qt5/qt5script/qt5script.mk            |  32 +-----
 package/qt5/qt5scxml/qt5scxml.mk              |  37 +-----
 package/qt5/qt5sensors/qt5sensors.mk          |  40 +------
 package/qt5/qt5serialbus/qt5serialbus.mk      |  38 +-----
 package/qt5/qt5serialport/qt5serialport.mk    |  32 +-----
 package/qt5/qt5svg/qt5svg.mk                  |  40 +------
 package/qt5/qt5tools/qt5tools.mk              |   6 +-
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  |  63 +---------
 package/qt5/qt5wayland/qt5wayland.mk          |  43 +------
 package/qt5/qt5webchannel/qt5webchannel.mk    |  40 +------
 package/qt5/qt5webengine/qt5webengine.mk      |  50 +-------
 .../qt5webkit-examples/qt5webkit-examples.mk  |  23 +---
 package/qt5/qt5webkit/qt5webkit.mk            |  30 ++---
 package/qt5/qt5websockets/qt5websockets.mk    |  40 +------
 package/qt5/qt5x11extras/qt5x11extras.mk      |  21 +---
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  |  32 +-----
 package/qt5cinex/qt5cinex.mk                  |   9 +-
 ...001-Fix-crosscompile-staging-install.patch |  16 +++
 package/quazip/quazip.mk                      |  18 +--
 package/qwt/qwt.mk                            |   9 +-
 38 files changed, 190 insertions(+), 1145 deletions(-)
 create mode 100644 package/pkg-qmake.mk
 create mode 100644 package/quazip/0001-Fix-crosscompile-staging-install.patch
Signature · 1 line
2.21.0
#1 lore raw

PATCH v4 1/6 qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

Traditionally we configured qt5 to always build shared libraries. This resulted in many conditionals when setting buildroot to static-libs only, because each module's target install had to be guarded.
So to avoid this and simplify target install in a subsequent commit, configure qt to build (and install) only the type of libs which the buildroot defconfig is set to.
Unfortunately it seems that Qt does not support building both dynamic and static libs at the same time, so we still set it shared if buildroot asks for both.

---
 package/qt5/qt5base/qt5base.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +7 -2
index 14536980a8..a8bec84123 100644
@@ -24,8 +24,13 @@ QT5BASE_CONFIGURE_OPTS += \
 	-no-iconv \
 	-system-zlib \
 	-system-pcre \
-	-no-pch \
-	-shared
+	-no-pch
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+QT5BASE_CONFIGURE_OPTS += -shared
+else ifeq ($(BR2_STATIC_LIBS),y)
+QT5BASE_CONFIGURE_OPTS += -static
+endif
 
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5BASE_DEPENDENCIES += pcre
Signature · 1 line
2.21.0
#2 lore raw

PATCH v4 1/6 qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

Quoted 21 lines · Andreas Naumann

Traditionally we configured qt5 to always build shared libraries. This resulted in many conditionals when setting buildroot to static-libs only, because each module's target install had to be guarded.
So to avoid this and simplify target install in a subsequent commit, configure qt to build (and install) only the type of libs which the buildroot defconfig is set to.
Unfortunately it seems that Qt does not support building both dynamic and static libs at the same time, so we still set it shared if buildroot asks for both.

---
 package/qt5/qt5base/qt5base.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +0 -0
index 14536980a8..a8bec84123 100644
@@ -24,8 +24,13 @@ QT5BASE_CONFIGURE_OPTS += \
 	-no-iconv \
 	-system-zlib \

package/qt5/qt5base/qt5base.mk QT5BASE_CONFIGURE_OPTS += \ · line 33

Quoted 10 lines
package/qt5/qt5base/qt5base.mk +7 -2
 	-system-pcre \
-	-no-pch \
-	-shared
+	-no-pch
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+QT5BASE_CONFIGURE_OPTS += -shared
+else ifeq ($(BR2_STATIC_LIBS),y)
+QT5BASE_CONFIGURE_OPTS += -static
+endif

For cmake-package, we do the equivalent of

ifeq ($(BR2_STATIC_LIBS),y)
QT5BASE_CONFIGURE_OPTS += -static
else
QT5BASE_CONFIGURE_OPTS += -shared
endif

which is IMO both correct and readable.

Regards,
Arnout

Quoted 4 lines
package/qt5/qt5base/qt5base.mk +0 -0
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5BASE_DEPENDENCIES += pcre
 
#3 lore raw

PATCH v4 1/6 qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen

Am 25.03.19 um 23:13 schrieb Arnout Vandecappelle:

Quoted 29 lines · Andreas Naumann
Quoted 15 lines

Traditionally we configured qt5 to always build shared libraries. This resulted in many conditionals when setting buildroot to static-libs only, because each module's target install had to be guarded. So to avoid this and simplify target install in a subsequent commit, configure qt to build (and install) only the type of libs which the buildroot defconfig is set to. Unfortunately it seems that Qt does not support building both dynamic and static libs at the same time, so we still set it shared if buildroot asks for both.

package/qt5/qt5base/qt5base.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)

(quoted diff) +0 -0
Quoted 8 lines

b/package/qt5/qt5base/qt5base.mk index 14536980a8..a8bec84123 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -24,8 +24,13 @@ QT5BASE_CONFIGURE_OPTS += \ -no-iconv \ -system-zlib \ -system-pcre
\ - -no-pch \ - -shared + -no-pch + +ifeq
($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +QT5BASE_CONFIGURE_OPTS += -shared +else ifeq ($(BR2_STATIC_LIBS),y) +QT5BASE_CONFIGURE_OPTS += -static +endif

For cmake-package, we do the equivalent of

Quoted 4 lines

ifeq ($(BR2_STATIC_LIBS),y) QT5BASE_CONFIGURE_OPTS += -static else QT5BASE_CONFIGURE_OPTS += -shared endif

which is IMO both correct and readable.

True. Same thing, simpler code. I take it.

Regards,
Andreas

Quoted 9 lines

Regards, Arnout

Quoted 4 lines

ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y) QT5BASE_DEPENDENCIES += pcre

#4 lore raw

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

In reply to Andreas Naumann

This provides generic functions for Qt5 qmake based packages. Besides being able to remove lots of redundant commands, it should make it possible to eliminate the numerous and complex target install steps.
This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder. In addition, rsync excludes all header-, documentation- and cmake-pathes as well as libtool and prl files in order to avoid unnecessary files accumulating in target.

Getting rid of the many conditional install commands is possible because qmake already takes care of this when generating the Makefile install targets with the given or autodetected configure options of each package.

However, custom install steps may have to remain in cases where a particular buildroot option has no corresponding setting in the packages configuration options.

---
 package/Makefile.in  |   1 +
 package/pkg-qmake.mk | 109 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+)
 create mode 100644 package/pkg-qmake.mk
package/Makefile.in +1 -0
index dc818a2c18..fb0e22114c 100644
@@ -442,3 +442,4 @@ include package/pkg-kernel-module.mk
 include package/pkg-waf.mk
 include package/pkg-golang.mk
 include package/pkg-meson.mk
+include package/pkg-qmake.mk
package/pkg-qmake.mk new file +109 -0

109 lines not on this page · raw message

Signature · 1 line
2.21.0
#5 lore raw

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

Hi Andreas,

Quoted 3 lines · Andreas Naumann

This provides generic functions for Qt5 qmake based packages. Besides being able to remove lots of redundant commands, it should make it possible to eliminate the numerous and complex target install steps.

The commands are not really redundant (otherwise you could just remove them
anyway) and eliminating the target install steps is more or less the same thing. And anyway, this infra doesn't allow that by itself, because you could just do it per package. It just makes it easier to do it consistently for all packages, makes it easier to add a new qmake package, and it makes it easier to change how the target installation is done.

Quoted 5 lines

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder.

We have not converged yet on whether this is the right approach. So maybe, in
order to move forward, it would be better to split the patch up into a first bit that creates the qmake package but does not define target install steps, then convert the relevant packages to qmake packages, and finally change the qmake infra to do target install and changes all the packages again. It's more work to do it this way, obviously, but it would allow us to already commit part of the series before we have converged on it completely.

Quoted 3 lines

In addition, rsync excludes all header-, documentation- and cmake-pathes as well as libtool and prl files in order to avoid unnecessary files accumulating in target.

All of these (except *.prl) are anyway cleaned up in target finalize, so by
itself it's not that useful.

Quoted 7 lines

Getting rid of the many conditional install commands is possible because qmake already takes care of this when generating the Makefile install targets with the given or autodetected configure options of each package.

However, custom install steps may have to remain in cases where a particular buildroot option has no corresponding setting in the packages configuration options.

This is also something that probably will need more discussion.

Quoted 22 lines
---
 package/Makefile.in  |   1 +
 package/pkg-qmake.mk | 109 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+)
 create mode 100644 package/pkg-qmake.mk
package/Makefile.in +1 -0
index dc818a2c18..fb0e22114c 100644
@@ -442,3 +442,4 @@ include package/pkg-kernel-module.mk
 include package/pkg-waf.mk
 include package/pkg-golang.mk
 include package/pkg-meson.mk
+include package/pkg-qmake.mk
package/pkg-qmake.mk new file +0 -0
new file mode 100644
index 0000000000..11cfb809fc

package/pkg-qmake.mk line 5

Quoted 5 lines
package/pkg-qmake.mk new file +5 -0
@@ -0,0 +1,109 @@
+################################################################################
+# QMAKE package infrastructure
+#
+# This file implements an infrastructure that eases development of package
+# .mk files for QMAKE packages. It should be used for all packages that use

It's called qmake, not QMAKE.

package/pkg-qmake.mk line 9

Quoted 4 lines
package/pkg-qmake.mk new file +4 -0
+# QMAKE as their build system.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure

You have not actually added documentation :-)

Quoted 15 lines
package/pkg-qmake.mk new file +15 -0
+#
+# In terms of implementation, this QMAKE infrastructure requires the .mk file
+# to only specify metadata information about the package: name, version,
+# download URL, etc.
+#
+# We still allow the package .mk file to override what the different steps
+# are doing, if needed. For example, if <PKG>_BUILD_CMDS is already defined,
+# it is used as the list of commands to perform to build the package,
+# instead of the default QMAKE behaviour. The package can also define some
+# post operation hooks.
+#
+################################################################################
+
+################################################################################
+# inner-qmake-package -- defines how the configuration, compilation and

package/pkg-qmake.mk line 34

Quoted 10 lines
package/pkg-qmake.mk new file +10 -0
+# installation of a qmake package should be done, implements a few hooks
+# to tune the build process for qmake specifities and calls the generic
+# package infrastructure to generate the necessary make targets
+#
+#  argument 1 is the lowercase package name
+#  argument 2 is the uppercase package name, including a HOST_ prefix
+#             for host packages
+#  argument 3 is the uppercase package name, without the HOST_ prefix
+#             for host packages
+#  argument 4 is the type (target or host)

Since we don't support a host variant (yet), I would prefer to leave out
argument 3 and 4. That makes it more explicit that the whole thing needs to be reviewed when a host variant gets added.

package/pkg-qmake.mk line 43

Quoted 9 lines
package/pkg-qmake.mk new file +9 -0
+################################################################################
+
+define inner-qmake-package
+
+$(2)_CONF_ENV			?=
+$(2)_CONF_OPTS			?=
+$(2)_MAKE_ENV			?=
+$(2)_MAKE_OPTS			?=
+$(2)_INSTALL_STAGING_OPTS	?= install

Even though target install reuses staging install, I'd allow overriding it:

$(2)_INSTALL_TARGET_OPTS ?= $$($(2)_INSTALL_STAGING_OPTS)

package/pkg-qmake.mk line 51

Quoted 8 lines
package/pkg-qmake.mk new file +8 -0
+
+#
+# Configure step. Only define it if not already defined by the package
+# .mk file.
+#
+ifndef $(2)_CONFIGURE_CMDS
+define $(2)_CONFIGURE_CMDS
+	cd $$($$(PKG)_SRCDIR) && \

I realize it is currently not done consistently at all, but _SRCDIR should only
be used for extract and patch. _BUILDDIR should be used for configure, build, install.

package/pkg-qmake.mk line 52

Quoted 1 line
package/pkg-qmake.mk new file +1 -0
+	$$(TARGET_MAKE_ENV) \> +	$$($(2)_CONF_ENV) \

This would still fit on the preceding line.

Also, it's weird that you mix $(2) with $$(PKG). Although I'm generally in
favour of using PKG, I think that inside the inner- macros it's better to consistently use $(2).

package/pkg-qmake.mk line 54

Quoted 1 line
package/pkg-qmake.mk new file +1 -0
+	$$(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \

All the qt.io packages currently seem to use qmake without -spec option, and
the external packages use $$(QT5_QMAKE). I'm not entirely sure which is best, but I'd go for QT5_QMAKE.

With that, it would also fit together into a single line with the ENV settings.

Quoted 16 lines
package/pkg-qmake.mk new file +16 -0
+		$$($(2)_CONF_OPTS)
+endef
+endif
+
+#
+# Build step. Only define it if not already defined by the package .mk
+# file.
+#
+ifndef $(2)_BUILD_CMDS
+define $(2)_BUILD_CMDS
+	$$(TARGET_MAKE_ENV) \
+	$$($(2)_MAKE_ENV) \
+	$$(MAKE) -C $$($$(PKG)_SRCDIR) $$($(2)_MAKE_OPTS)
+endef
+endif
+

package/pkg-qmake.mk line 80

Quoted 10 lines
package/pkg-qmake.mk new file +10 -0
+#
+# Staging installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_STAGING_CMDS
+define $(2)_INSTALL_STAGING_CMDS
+	$$(TARGET_MAKE_ENV) \
+	$$($(2)_MAKE_ENV) \
+	$$(MAKE) -C $$($$(PKG)_SRCDIR) $$($(2)_INSTALL_STAGING_OPTS)
+	$$(QT5_LA_PRL_FILES_FIXUP)

H, the QT5_LA_PRL_FILES_FIXUP really only applies to the qt.io packages,
because other packages don't necessarily install as libQt5*.

Actually, this fixup is also partially redundant with the existing fixup in the
install staging rule. So perhaps that rule should be extended with a way to specify additional sed lines for the package, e.g.

        @$(call MESSAGE,"Fixing libtool files")
        for la in $$(find $(STAGING_DIR)/usr/lib* -name "*.la"); do \
                cp -a "$${la}" "$${la}.fixed" && \
                $(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \
...
                        -e "s:@BASE_DIR@:$(BASE_DIR):g" \
			$($(PKG)_FIX_LIBTOOL_SED_EXPR) \
                        "$${la}.fixed" && \

...

and setting

$(2)_FIX_LIBTOOL_SED_EXPR = -e "/^dependency_libs=/s%-L/usr/lib %%g"

in inner-qmake-package.

But that would first need to be refactored in two separate patches, of course.
So, to not make things more complicated than they are already, I'm OK with your current proposal as well.

package/pkg-qmake.mk line 92

Quoted 12 lines
package/pkg-qmake.mk new file +12 -0
+endef
+endif
+
+#
+# Target installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_TARGET_CMDS
+define $(2)_INSTALL_TARGET_CMDS
+	$$(TARGET_MAKE_ENV) \
+	$$($(2)_MAKE_ENV) \
+	$$(MAKE) -C $$($$(PKG)_SRCDIR) INSTALL_ROOT=$$($$(PKG)_SRCDIR)/tmp-target-install $$($(2)_INSTALL_STAGING_OPTS)

This part really needs some explanation in the comment above, because it is
*very* counter-intuitive. You should explain why INSTALL_ROOT is used here and not for staging install, and what its effect is exactly, i.e. that qmake configures things with STAGING_DIR as the prefix and that INSTALL_ROOT goes before it, so you end up with everything under $(@D)/tmp-target-install/$(STAGING_DIR)

However, I'm not sure that this is the way we want to go. What is wrong with
the pkg-files-list? You said before that it was incorrect, but if that is the case, it should be fixed.

Regards,
Arnout

Quoted 18 lines
package/pkg-qmake.mk new file +17 -0
+	rsync -arv --exclude usr/include* --exclude usr/lib/cmake* --exclude usr/doc* \
+	           --exclude *.la --exclude *.prl \
+	    $$($$(PKG)_SRCDIR)/tmp-target-install/$$(STAGING_DIR)/ $$(TARGET_DIR)/
+endef
+endif
+
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call inner-generic-package,$(1),$(2),$(3),$(4))
+
+endef
+
+################################################################################
+# qmake-package -- the target generator macro for QMAKE packages
+################################################################################
+
+qmake-package = $(call inner-qmake-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
#6 lore raw

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

Hello,

Quoted 6 lines · On Tue, 26 Mar 2019 00:16:47 +0100 Arnout Vandecappelle <[email protected]> wrote:
Quoted 5 lines

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder.

Quoted 7 lines

We have not converged yet on whether this is the right approach. So maybe, in
order to move forward, it would be better to split the patch up into a first bit that creates the qmake package but does not define target install steps, then convert the relevant packages to qmake packages, and finally change the qmake infra to do target install and changes all the packages again. It's more work to do it this way, obviously, but it would allow us to already commit part of the series before we have converged on it completely.

While I understand your idea of splitting things up further in terms of patches, I think we can try to agree on how the target installation step should be done and use the approach proposed by Andreas to directly have the qmake infrastructure use this target installation logic. Andreas has already done lots of work on this (and building Qt5 modules takes a lot of time, so I suppose this patch series is annoying like hell to build-test), so I'd like to not raise the barrier too high here.

Quoted 6 lines
Quoted 3 lines

In addition, rsync excludes all header-, documentation- and cmake-pathes as well as libtool and prl files in order to avoid unnecessary files accumulating in target.

All of these (except *.prl) are anyway cleaned up in target finalize, so by
itself it's not that useful.

Yes, I also felt that all those exclusions were not really needed, we should probably keep things simple: rsync everything, and really on target-finalize for doing the cleanup.

Quoted 9 lines
Quoted 7 lines

Getting rid of the many conditional install commands is possible because qmake already takes care of this when generating the Makefile install targets with the given or autodetected configure options of each package.

However, custom install steps may have to remain in cases where a particular buildroot option has no corresponding setting in the packages configuration options.

This is also something that probably will need more discussion.

Why ?

Quoted 9 lines

package/pkg-qmake.mk line 92

Quoted 1 line
package/pkg-qmake.mk new file +1 -0
+	$$(MAKE) -C $$($$(PKG)_SRCDIR) INSTALL_ROOT=$$($$(PKG)_SRCDIR)/tmp-target-install $$($(2)_INSTALL_STAGING_OPTS)  

This part really needs some explanation in the comment above, because it is
*very* counter-intuitive. You should explain why INSTALL_ROOT is used here and not for staging install, and what its effect is exactly, i.e. that qmake configures things with STAGING_DIR as the prefix and that INSTALL_ROOT goes before it, so you end up with everything under $(@D)/tmp-target-install/$(STAGING_DIR)

Quoted 3 lines

However, I'm not sure that this is the way we want to go. What is wrong with
the pkg-files-list? You said before that it was incorrect, but if that is the case, it should be fixed.

At this point, I find the approach proposed by Andreas to be pretty nice. We don't yet use pkg-files-list really as part of the build process anywhere, I feel a bit more comfortable at this point with what Andreas is proposing. No strong argument on this, just a general feeling.

One advantage of Andreas approach is that it does not create a dependency between the target installation step and the staging installation step. They can happen in whatever order, or even in parallel (think top-level parallel build). Indeed our package infrastructure does not enforce any dependency between target installation and staging installation. The solution of doing staging installation, and then use the pkg-file-list of files installed to staging for the target installation would require adding such a dependency between the target installation and staging installation.

Best regards,

Thomas

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

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

Quoted 19 lines · Thomas Petazzoni

Hello,

Quoted 6 lines · On Tue, 26 Mar 2019 00:16:47 +0100 Arnout Vandecappelle <[email protected]> wrote:
Quoted 5 lines

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder.

Quoted 7 lines

We have not converged yet on whether this is the right approach. So maybe, in
order to move forward, it would be better to split the patch up into a first bit that creates the qmake package but does not define target install steps, then convert the relevant packages to qmake packages, and finally change the qmake infra to do target install and changes all the packages again. It's more work to do it this way, obviously, but it would allow us to already commit part of the series before we have converged on it completely.

Quoted 3 lines

While I understand your idea of splitting things up further in terms of patches, I think we can try to agree on how the target installation step should be done and use the approach proposed by Andreas to

Sure, that's why I said "maybe". It's not a requirement, but it is also
frustrating to respinning a series and seeing no progress on it. That's why I proposed the option.

Quoted 21 lines

directly have the qmake infrastructure use this target installation logic. Andreas has already done lots of work on this (and building Qt5 modules takes a lot of time, so I suppose this patch series is annoying like hell to build-test), so I'd like to not raise the barrier too high here.

Quoted 6 lines
Quoted 3 lines

In addition, rsync excludes all header-, documentation- and cmake-pathes as well as libtool and prl files in order to avoid unnecessary files accumulating in target.

All of these (except *.prl) are anyway cleaned up in target finalize, so by
itself it's not that useful.

Yes, I also felt that all those exclusions were not really needed, we should probably keep things simple: rsync everything, and really on target-finalize for doing the cleanup.

Quoted 4 lines
Quoted 4 lines

Getting rid of the many conditional install commands is possible because qmake already takes care of this when generating the Makefile install targets with the given or autodetected configure options of each package.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

However, custom install steps may have to remain in cases where a particular buildroot option has no corresponding setting in the packages configuration options.

This is also something that probably will need more discussion.

Why ?

Uh, I don't see that either anymore...

Oh, wait, now I remember: at the time I wrote that, I thought that I was going
to give the feedback somewhere that we should have a list of files (wildcards) to copy from staging to target instead of requiring custom install commands. But I never got around to making that comment :-)

Anyway, keeping custom install commands is definitely the way to go as a first
step.

Quoted 10 lines
Quoted 10 lines

package/pkg-qmake.mk line 92

Quoted 2 lines
package/pkg-qmake.mk new file +1 -0
+	$$(MAKE) -C $$($$(PKG)_SRCDIR) INSTALL_ROOT=$$($$(PKG)_SRCDIR)/tmp-target-install $$($(2)_INSTALL_STAGING_OPTS)  

This part really needs some explanation in the comment above, because it is
*very* counter-intuitive. You should explain why INSTALL_ROOT is used here and not for staging install, and what its effect is exactly, i.e. that qmake configures things with STAGING_DIR as the prefix and that INSTALL_ROOT goes before it, so you end up with everything under $(@D)/tmp-target-install/$(STAGING_DIR)

Quoted 6 lines
Quoted 3 lines

However, I'm not sure that this is the way we want to go. What is wrong with
the pkg-files-list? You said before that it was incorrect, but if that is the case, it should be fixed.

At this point, I find the approach proposed by Andreas to be pretty nice.

I'm also starting to warm up to it... Norbert has used the same approach for
libfuse, and mentioned that it is something that could be generalized to all packages. And I'm starting to see the merit of that.

I feel more comfortable to do that experiment here than in the libfuse package,
because here it is in infra so relatively easy to change. For example, I guess it would also be nice to do a common install (in an additional step that both target and staging install depend on, or maybe just as part of the build step) into a PPD-like additional directory, and copy from there to the actual target and staging, preferably using the hardlink approach instead of actual copying. I'm just dreaming out loud here.

Quoted 4 lines

We don't yet use pkg-files-list really as part of the build process anywhere, I feel a bit more comfortable at this point with what Andreas is proposing. No strong argument on this, just a general feeling.

Okay, fair enough, let's not go for the pkg-files-list approach.

Andreas, could you include this sentence from Thomas in the commit message so
we remember what the reason was to choose for this approach rather than pkg-files-list?

Quoted 6 lines

One advantage of Andreas approach is that it does not create a dependency between the target installation step and the staging installation step. They can happen in whatever order, or even in parallel (think top-level parallel build). Indeed our package infrastructure does not enforce any dependency between target installation and staging installation.

Actually it does:

ifeq ($$($(2)_INSTALL_STAGING),YES)
$(1)-install-staging: $$($(2)_TARGET_INSTALL_STAGING)
$$($(2)_TARGET_INSTALL_STAGING): $$($(2)_TARGET_BUILD)
# Some packages use install-staging stuff for install-target
$$($(2)_TARGET_INSTALL_TARGET): $$($(2)_TARGET_INSTALL_STAGING)
else
$(1)-install-staging:
endif

Introduced by:

commit 6c5c08b854e4490697076ae3c5a9c587d8672c63

Author: Fabio Porcedda <[email protected]>
Date:   Fri Feb 14 10:55:05 2014

package: add support for top-level parallel make

To be able to use top-level parallel make we must not depend in a rule on the order of evaluation of the prerequisites, so instead of relying on the left to right ordering of evaluation of the prerequisites add an explicit rule to describe the dependencies.

We cannot use the pattern rules because they must have the same dependency for every package, but we need to change the dependencies depending on $(2)_OVERRIDE_SRCDIR variable value, so we must use a more flexible way like $(2)_TARGET_% variables.

So add explicit dependencies for the following stamp files:
$(2)_TARGET_EXTRACT
$(2)_TARGET_PATCH
$(2)_TARGET_CONFIGURE
$(2)_TARGET_BUILD
$(2)_TARGET_INSTALL_STAGING $(2)_TARGET_INSTALL_TARGET $(2)_TARGET_INSTALL_IMAGES $(2)_TARGET_INSTALL_HOST

2014... We've been working too long on this stuff...

Regards,
Arnout

Quoted 9 lines

The solution of doing staging
installation, and then use the pkg-file-list of files installed to staging for the target installation would require adding such a dependency between the target installation and staging installation.

Best regards,

Thomas

#8 lore raw

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

Am 26.03.19 um 11:09 schrieb Arnout Vandecappelle:

Quoted 26 lines · Thomas Petazzoni
Quoted 23 lines

Hello,

Quoted 17 lines · On Tue, 26 Mar 2019 00:16:47 +0100 Arnout Vandecappelle <[email protected]> wrote:
Quoted 7 lines

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder.

We have not converged yet on whether this is the right approach. So maybe, in order to move forward, it would be better to split the patch up into a first bit that creates the qmake package but does not define target install steps, then convert the relevant packages to qmake packages, and finally change the qmake infra to do target install and changes all the packages again. It's more work to do it this way, obviously, but it would allow us to already commit part of the series before we have converged on it completely.

Quoted 8 lines
Quoted 4 lines

While I understand your idea of splitting things up further in terms of patches, I think we can try to agree on how the target installation step should be done and use the approach proposed by Andreas to

Sure, that's why I said "maybe". It's not a requirement, but it is also frustrating to respinning a series and seeing no progress on it. That's why I proposed the option.

Splitting the conversion of each package (and doing this one package at a time?) really seems like a lot work and I dont know if it leads to a nicer history.
I propose to split up the infra introduction in two parts (config,build,staging vs target install), but keep the conversion of each package in one patch. Or maybe one patch for the straightforward cases and the rest individually?

Quoted 11 lines
Quoted 11 lines

directly have the qmake infrastructure use this target installation logic. Andreas has already done lots of work on this (and building Qt5 modules takes a lot of time, so I suppose this patch series is annoying like hell to build-test), so I'd like to not raise the barrier too high here.

Quoted 4 lines
Quoted 3 lines

In addition, rsync excludes all header-, documentation- and cmake-pathes as well as libtool and prl files in order to avoid unnecessary files accumulating in target.

Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

All of these (except *.prl) are anyway cleaned up in target finalize, so by itself it's not that useful.

Yes, I also felt that all those exclusions were not really needed, we should probably keep things simple: rsync everything, and really on target-finalize for doing the cleanup.

Ok, so I add removal of *.prl to target-finalize instead.

Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Getting rid of the many conditional install commands is possible because qmake already takes care of this when generating the Makefile install targets with the given or autodetected configure options of each package.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

However, custom install steps may have to remain in cases where a particular buildroot option has no corresponding setting in the packages configuration options.

This is also something that probably will need more discussion.

Why ?

Quoted 7 lines

Uh, I don't see that either anymore...

Oh, wait, now I remember: at the time I wrote that, I thought that I was going to give the feedback somewhere that we should have a list of files (wildcards) to copy from staging to target instead of requiring custom install commands. But I never got around to making that comment :-)

If we copy everything from staging anyway, what's the list of additional files good for? The thing is, sometimes we need to copy additional files from the build directory or the buildroot package directory to target.

Quoted 3 lines

Anyway, keeping custom install commands is definitely the way to go as a first step.

I dont know how this can be fixed later, except upstream in some cases.

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
(quoted diff) +1 -0
+	$$(MAKE) -C $$($$(PKG)_SRCDIR)

INSTALL_ROOT=$$($$(PKG)_SRCDIR)/tmp-target-install $$($(2)_INSTALL_STAGING_OPTS)

This part really needs some explanation in the comment above, because it is *very* counter-intuitive. You should explain why INSTALL_ROOT is used here and not for staging install, and what its effect is exactly, i.e. that qmake configures things with STAGING_DIR as the prefix and that INSTALL_ROOT goes before it, so you end up with everything under $(@D)/tmp-target-install/$(STAGING_DIR)

I'll add explanation.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

However, I'm not sure that this is the way we want to go. What is wrong with the pkg-files-list? You said before that it was incorrect, but if that is the case, it should be fixed.

pkg-files-list currently breaks the parallel build. I did send a patch for that.
However I suspect the lists might still not be correct because if a package provides a file which already exists it wont be recorded, right? This situation is problematic anyway but currently solved by at least a deterministic package build/install order in which "the last wins". Using the staging pkg-files-list for target install would reverse that to "first package wins".
Finally, when building in parallel, this will become a real issue.

Quoted 23 lines
Quoted 3 lines

At this point, I find the approach proposed by Andreas to be pretty nice.

I'm also starting to warm up to it... Norbert has used the same approach for libfuse, and mentioned that it is something that could be generalized to all packages. And I'm starting to see the merit of that.

I feel more comfortable to do that experiment here than in the libfuse package, because here it is in infra so relatively easy to change. For example, I guess it would also be nice to do a common install (in an additional step that both target and staging install depend on, or maybe just as part of the build step) into a PPD-like additional directory, and copy from there to the actual target and staging, preferably using the hardlink approach instead of actual copying. I'm just dreaming out loud here.

Quoted 4 lines

We don't yet use pkg-files-list really as part of the build process anywhere, I feel a bit more comfortable at this point with what Andreas is proposing. No strong argument on this, just a general feeling.

Quoted 5 lines

Okay, fair enough, let's not go for the pkg-files-list approach.

Andreas, could you include this sentence from Thomas in the commit message so we remember what the reason was to choose for this approach rather than pkg-files-list?

Will do.

Regards,
Andreas

Quoted 60 lines
Quoted 8 lines

One advantage of Andreas approach is that it does not create a dependency between the target installation step and the staging installation step. They can happen in whatever order, or even in parallel (think top-level parallel build). Indeed our package infrastructure does not enforce any dependency between target installation and staging installation.

Actually it does:

ifeq ($$($(2)_INSTALL_STAGING),YES) $(1)-install-staging:
$$($(2)_TARGET_INSTALL_STAGING) $$($(2)_TARGET_INSTALL_STAGING):
$$($(2)_TARGET_BUILD) # Some packages use install-staging stuff for install-target $$($(2)_TARGET_INSTALL_TARGET):
$$($(2)_TARGET_INSTALL_STAGING) else $(1)-install-staging: endif

Introduced by:

commit 6c5c08b854e4490697076ae3c5a9c587d8672c63 Author: Fabio
Porcedda <[email protected]> Date: Fri Feb 14 10:55:05 2014

package: add support for top-level parallel make

To be able to use top-level parallel make we must not depend in a rule on the order of evaluation of the prerequisites, so instead of relying on the left to right ordering of evaluation of the prerequisites add an explicit rule to describe the dependencies.

We cannot use the pattern rules because they must have the same dependency for every package, but we need to change the dependencies depending on $(2)_OVERRIDE_SRCDIR variable value, so we must use a more flexible way like $(2)_TARGET_% variables.

So add explicit dependencies for the following stamp files:
$(2)_TARGET_EXTRACT $(2)_TARGET_PATCH $(2)_TARGET_CONFIGURE $(2)_TARGET_BUILD $(2)_TARGET_INSTALL_STAGING $(2)_TARGET_INSTALL_TARGET $(2)_TARGET_INSTALL_IMAGES $(2)_TARGET_INSTALL_HOST

2014... We've been working too long on this stuff...

Regards, Arnout

Quoted 9 lines

The solution of doing staging installation, and then use the pkg-file-list of files installed to staging for the target installation would require adding such a dependency between the target installation and staging installation.

Best regards,

Thomas

#9 lore raw

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

Quoted 38 lines · Andreas Naumann

Am 26.03.19 um 11:09 schrieb Arnout Vandecappelle:

Quoted 26 lines · Thomas Petazzoni
Quoted 23 lines

Hello,

Quoted 17 lines · On Tue, 26 Mar 2019 00:16:47 +0100 Arnout Vandecappelle <[email protected]> wrote:
Quoted 7 lines

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder.

We have not converged yet on whether this is the right approach. So maybe, in order to move forward, it would be better to split the patch up into a first bit that creates the qmake package but does not define target install steps, then convert the relevant packages to qmake packages, and finally change the qmake infra to do target install and changes all the packages again. It's more work to do it this way, obviously, but it would allow us to already commit part of the series before we have converged on it completely.

Quoted 8 lines
Quoted 4 lines

While I understand your idea of splitting things up further in terms of patches, I think we can try to agree on how the target installation step should be done and use the approach proposed by Andreas to

Sure, that's why I said "maybe". It's not a requirement, but it is also frustrating to respinning a series and seeing no progress on it. That's why I proposed the option.

Quoted 7 lines

Splitting the conversion of each package (and doing this one package at a time?) really seems like a lot work and I dont know if it leads to a nicer history.
I propose to split up the infra introduction in two parts (config,build,staging vs target install), but keep the conversion of each package in one patch. Or maybe one patch for the straightforward cases and the rest individually?

Sounds good to me. As Thomas wrote: you don't have to do it if it's too much work.

IIUC your proposal would be:

1. Basic qmake infra
2. Convert all packages to qmake infra (trivial because the difficult cases still use custom staging/target install commands, you just don't remove them).
3. Add target install support to qmake infra
4. Convert all easy packages to target install from qmake infra (i.e. just remove the target install commands)
5-N. Convert difficult packages.

I repeat: it would be nicer this way, but if it's take too much time to do it,
we'll accept it as just two or three patches as well.

[snip]

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

However, I'm not sure that this is the way we want to go. What is wrong with the pkg-files-list? You said before that it was incorrect, but if that is the case, it should be fixed.

pkg-files-list currently breaks the parallel build. I did send a patch for that.
However I suspect the lists might still not be correct because if a package provides a file which already exists it wont be recorded, right?

It will be recorded twice in that case. And the check-uniq-files script checks
in the finalize step that this doesn't actually happen.

Quoted 5 lines

This situation is problematic anyway but currently solved by at least a deterministic package build/install order in which "the last wins". Using the staging pkg-files-list for target install would reverse that to "first package wins".
Finally, when building in parallel, this will become a real issue.

Yes and no. It's not an issue because each package installs in its own
host/staging/target dirs. It may become an issue when combining these dirs from different packages, but that combination is still deterministic (it is not done in parallel and the order is fixed with sort).

But since we agreed to tmpinstall anyway, the point is moot.

Regards,
Arnout

[snip]

#10 lore raw

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

Am 28.03.19 um 09:58 schrieb Arnout Vandecappelle:

Quoted 51 lines · Andreas Naumann
Quoted 38 lines

Am 26.03.19 um 11:09 schrieb Arnout Vandecappelle:

Quoted 26 lines · Thomas Petazzoni
Quoted 23 lines

Hello,

Quoted 17 lines · On Tue, 26 Mar 2019 00:16:47 +0100 Arnout Vandecappelle <[email protected]> wrote:
Quoted 7 lines

This is done by re-running the install step of the qmake generated Makefile with the package build directory prepended (to the staging/host path). Even though this does create lengthy pathes it allows for easy separation of the staging files from the host destined files by just omitting the resulting BUILD_DIR+HOST_DIR path from the following rsync call to the real target folder.

We have not converged yet on whether this is the right approach. So maybe, in order to move forward, it would be better to split the patch up into a first bit that creates the qmake package but does not define target install steps, then convert the relevant packages to qmake packages, and finally change the qmake infra to do target install and changes all the packages again. It's more work to do it this way, obviously, but it would allow us to already commit part of the series before we have converged on it completely.

Quoted 8 lines
Quoted 4 lines

While I understand your idea of splitting things up further in terms of patches, I think we can try to agree on how the target installation step should be done and use the approach proposed by Andreas to

Sure, that's why I said "maybe". It's not a requirement, but it is also frustrating to respinning a series and seeing no progress on it. That's why I proposed the option.

Quoted 6 lines

Splitting the conversion of each package (and doing this one package at a time?) really seems like a lot work and I dont know if it leads to a nicer history. I propose to split up the infra introduction in two parts (config,build,staging vs target install), but keep the conversion of each package in one patch. Or maybe one patch for the straightforward cases and the rest individually?

Sounds good to me. As Thomas wrote: you don't have to do it if it's too much work.

Quoted 9 lines

IIUC your proposal would be:

1. Basic qmake infra 2. Convert all packages to qmake infra (trivial because the difficult cases still use custom staging/target install commands, you just don't remove them). 3. Add target install support to qmake infra 4. Convert all easy packages to target install from qmake infra (i.e. just remove the target install commands) 5-N. Convert difficult packages.

Actually I meant to not do step 2, but this should be doable as well. I'll see how it goes.

Quoted 9 lines

I repeat: it would be nicer this way, but if it's take too much time to do it, we'll accept it as just two or three patches as well.

[snip]

Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

However, I'm not sure that this is the way we want to go. What is wrong with the pkg-files-list? You said before that it was incorrect, but if that is the case, it should be fixed.

Quoted 8 lines
Quoted 4 lines

pkg-files-list currently breaks the parallel build. I did send a patch for that. However I suspect the lists might still not be correct because if a package provides a file which already exists it wont be recorded, right?

It will be recorded twice in that case. And the check-uniq-files script checks in the finalize step that this doesn't actually happen.

oh i see. I didnt fully understand step_pkg_size_inner.

Quoted 7 lines
Quoted 6 lines

This situation is problematic anyway but currently solved by at least a deterministic package build/install order in which "the last wins". Using the staging pkg-files-list for target install would reverse that to "first package wins". Finally, when building in parallel, this will become a real issue.

Quoted 5 lines

Yes and no. It's not an issue because each package installs in its own host/staging/target dirs. It may become an issue when combining these dirs from different packages, but that combination is still deterministic (it is not done in parallel and the order is fixed with sort).

True. Thanks for pointing out.

regards,
Andreas

Quoted 8 lines

But since we agreed to tmpinstall anyway, the point is moot.

Regards, Arnout

[snip]

#11 lore raw

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

Quoted 10 lines · Andreas Naumann
Quoted 9 lines

IIUC your proposal would be:

1. Basic qmake infra 2. Convert all packages to qmake infra (trivial because the difficult cases still use custom staging/target install commands, you just don't remove them). 3. Add target install support to qmake infra 4. Convert all easy packages to target install from qmake infra (i.e. just remove the target install commands) 5-N. Convert difficult packages.

Quoted 2 lines

Actually I meant to not do step 2, but this should be doable as well. I'll see how it goes.

Then splitting up the qmake infra in two steps doesn't help much either. And
we've anyway converged on the approach now, so there's no real need to split it up. So the only thing to split up is the patch that updates the packages: one big patch for the easy ones, and then more complicated patches for the individual difficult ones.

Regards,
Arnout

#12 lore raw

PATCH v4 2/6 qt5: Provide generic qmake package infrastructure

In reply to Arnout Vandecappelle

Am 26.03.19 um 00:16 schrieb Arnout Vandecappelle:

Quoted 10 lines

Hi Andreas,

Quoted 4 lines · Andreas Naumann

This provides generic functions for Qt5 qmake based packages. Besides being able to remove lots of redundant commands, it should make it possible to eliminate the numerous and complex target install steps.

The commands are not really redundant (otherwise you could just remove them

I guess I used the wrong word, should be duplicate instead of redundant.

Quoted 2 lines

anyway) and eliminating the target install steps is more or less the same thing.

Yes and no. Target install is done in another way, so why not summarize that?

Quoted 5 lines

And anyway, this infra doesn't allow that by itself, because you could just do it per package. It just makes it easier to do it consistently for all packages, makes it easier to add a new qmake package, and it makes it easier to change how the target installation is done.

True, it's two things at once. I'll split the patch and add your statements about consistency. More on this in my answer further down the thread.

regards,
Andreas

Quoted 2 lines

snip

#13 lore raw

PATCH v4 3/6 qt5: Convert packages to qmake infra

In reply to Andreas Naumann

In most cases the configure, build, install-staging and install-target commands are replaced with the qmake-package generics. In some cases the custom environment/option variables are renamed to the generic name.

The exception to this are the following cases, where the replacement was either not straightforward or could not be tested:

qt5webengine:
Should be straightforward but is currently broken with
ninja: build stopped: subcommand failed. Makefile.gn_run:326: recipe for target 'run_ninja' failed

qt5webkit:
The generic install creates QtWebProcess in /usr/libexec/ instead of /usr/bin. The jsc binary was not copied at all. Unsure of its significance the custom install command is kept in a post install hook.

qt5webkit-examples:
Should be straightforward but build is currently broken with
make[5]: *** No rule to make target 'QtWebKit/QWebView', needed by '.uic/ui_formextractor.h'. Stop. (OE even removed it because apparently nobody cares).

qt5webchannel:
A custom install of javascript has to remain

qt5cinex:
Custom logic because no staging install

qt5tools:
custom logic

---
 package/qextserialport/qextserialport.mk      | 22 +-----
 package/qt-webkit-kiosk/qt-webkit-kiosk.mk    | 11 +--
 package/qt5/qt53d/qt53d.mk                    | 39 +--------
 package/qt5/qt5base/qt5base.mk                | 79 +------------------
 package/qt5/qt5canvas3d/qt5canvas3d.mk        | 26 +-----
 package/qt5/qt5charts/qt5charts.mk            | 41 +---------
 .../qt5/qt5connectivity/qt5connectivity.mk    | 60 +-------------
 package/qt5/qt5declarative/qt5declarative.mk  | 48 +----------
 package/qt5/qt5enginio/qt5enginio.mk          | 39 +--------
 .../qt5graphicaleffects.mk                    | 18 +----
 .../qt5/qt5imageformats/qt5imageformats.mk    | 20 +----
 package/qt5/qt5location/qt5location.mk        | 50 +-----------
 package/qt5/qt5multimedia/qt5multimedia.mk    | 47 +----------
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk  | 41 +---------
 .../qt5quickcontrols2/qt5quickcontrols2.mk    | 40 +---------
 package/qt5/qt5script/qt5script.mk            | 32 +-------
 package/qt5/qt5scxml/qt5scxml.mk              | 37 +--------
 package/qt5/qt5sensors/qt5sensors.mk          | 40 +---------
 package/qt5/qt5serialbus/qt5serialbus.mk      | 38 +--------
 package/qt5/qt5serialport/qt5serialport.mk    | 32 +-------
 package/qt5/qt5svg/qt5svg.mk                  | 40 +---------
 package/qt5/qt5tools/qt5tools.mk              |  6 +-
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  | 63 +--------------
 package/qt5/qt5wayland/qt5wayland.mk          | 43 +---------
 package/qt5/qt5webchannel/qt5webchannel.mk    | 40 +---------
 package/qt5/qt5webengine/qt5webengine.mk      | 50 ++----------
 .../qt5webkit-examples/qt5webkit-examples.mk  | 23 +-----
 package/qt5/qt5webkit/qt5webkit.mk            | 30 ++-----
 package/qt5/qt5websockets/qt5websockets.mk    | 40 +---------
 package/qt5/qt5x11extras/qt5x11extras.mk      | 21 +----
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  | 32 +-------
 package/qt5cinex/qt5cinex.mk                  |  9 +--
 package/quazip/quazip.mk                      | 10 +--
 package/qwt/qwt.mk                            |  9 +--
 34 files changed, 56 insertions(+), 1120 deletions(-)
package/qextserialport/qextserialport.mk +1 -21
index ecaff21efc..6f14d21fe7 100644
@@ -16,24 +16,4 @@ endif
 
 QEXTSERIALPORT_DEPENDENCIES = qt5base
 
-define QEXTSERIALPORT_CONFIGURE_CMDS
-	cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) $(QEXTSERIALPORT_CONF_OPTS)
-endef
-
-define QEXTSERIALPORT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QEXTSERIALPORT_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),y)
-QEXTSERIALPORT_INSTALL_TARGET = NO
-else
-define QEXTSERIALPORT_INSTALL_TARGET_CMDS
-	cp -a $(@D)/*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +3 -8
index a714fca9c9..22cbf3cb87 100644
@@ -11,13 +11,8 @@ QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia
 QT_WEBKIT_KIOSK_LICENSE = LGPL-3.0
 QT_WEBKIT_KIOSK_LICENSE_FILES = doc/lgpl.html
 
-define QT_WEBKIT_KIOSK_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr)
-endef
-
-define QT_WEBKIT_KIOSK_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QT_WEBKIT_KIOSK_INSTALL_STAGING = NO
+QT_WEBKIT_KIOSK_CONF_OPTS = PREFIX=/usr
 
 define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src -f Makefile.qt-webkit-kiosk \
@@ -29,4 +24,4 @@ define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
 		$(if $(BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS),install_sound)
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt53d/qt53d.mk +1 -38
index 48a931d60b..eeb1b3644c 100644
@@ -17,41 +17,4 @@ endif
 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)
-endef
-
-define QT53D_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT53D_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT53D_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/qt3d $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifeq ($(BR2_STATIC_LIBS),)
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-# Available since 5.9
-define QT53D_INSTALL_TARGET_LATEST
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/geometryloaders $(TARGET_DIR)/usr/lib/qt/plugins
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/renderplugins $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-define QT53D_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt53D*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sceneparsers $(TARGET_DIR)/usr/lib/qt/plugins
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt3D $(TARGET_DIR)/usr/qml
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick $(TARGET_DIR)/usr/qml
-	$(QT53D_INSTALL_TARGET_LATEST)
-	$(QT53D_INSTALL_TARGET_EXAMPLES)
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5base/qt5base.mk +2 -77

95 lines not on this page · raw message

package/qt5/qt5canvas3d/qt5canvas3d.mk +1 -25
index ef5b373d02..711d0175d4 100644
@@ -18,28 +18,4 @@ QT5CANVAS3D_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0
 QT5CANVAS3D_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3
 endif
 
-define QT5CANVAS3D_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5CANVAS3D_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5CANVAS3D_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(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))
+$(eval $(qmake-package))
package/qt5/qt5charts/qt5charts.mk +1 -40

44 lines not on this page · raw message

package/qt5/qt5connectivity/qt5connectivity.mk +1 -59

63 lines not on this page · raw message

package/qt5/qt5declarative/qt5declarative.mk +1 -47

51 lines not on this page · raw message

package/qt5/qt5enginio/qt5enginio.mk +1 -38
index 38f309646f..cb1558e4b8 100644
@@ -22,41 +22,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5ENGINIO_DEPENDENCIES += qt5declarative
 endif
 
-define QT5ENGINIO_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5ENGINIO_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5ENGINIO_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5ENGINIO_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/Enginio $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5ENGINIO_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/enginio $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5ENGINIO_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libEnginio.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5ENGINIO_INSTALL_TARGET_CMDS
-	$(QT5ENGINIO_INSTALL_TARGET_LIBS)
-	$(QT5ENGINIO_INSTALL_TARGET_QMLS)
-	$(QT5ENGINIO_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk +1 -17
index c5011a94f0..92a3c1b8fb 100644
@@ -18,20 +18,4 @@ QT5GRAPHICALEFFECTS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or L
 QT5GRAPHICALEFFECTS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5GRAPHICALEFFECTS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5GRAPHICALEFFECTS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5GRAPHICALEFFECTS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-define QT5GRAPHICALEFFECTS_INSTALL_TARGET_CMDS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtGraphicalEffects $(TARGET_DIR)/usr/qml
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5imageformats/qt5imageformats.mk +1 -19
index fa13ebedaf..662215521c 100644
@@ -18,22 +18,4 @@ QT5IMAGEFORMATS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or LGPL-
 QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5IMAGEFORMATS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5IMAGEFORMATS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5IMAGEFORMATS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5IMAGEFORMATS_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/imageformats/*.so $(TARGET_DIR)/usr/lib/qt/plugins/imageformats/
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5location/qt5location.mk +1 -49

53 lines not on this page · raw message

package/qt5/qt5multimedia/qt5multimedia.mk +1 -46

55 lines not on this page · raw message

package/qt5/qt5quickcontrols/qt5quickcontrols.mk +1 -40

44 lines not on this page · raw message

package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk +1 -39
index c2004c2ee7..51d8b60741 100644
@@ -13,42 +13,4 @@ QT5QUICKCONTROLS2_INSTALL_STAGING = YES
 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)
-endef
-
-define QT5QUICKCONTROLS2_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5QUICKCONTROLS2_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5QUICKCONTROLS2_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/quickcontrols2 $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-define QT5QUICKCONTROLS2_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5QuickTemplates2.so.* $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5QuickControls2.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/calendar $(TARGET_DIR)/usr/qml/Qt/labs
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/platform $(TARGET_DIR)/usr/qml/Qt/labs
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Controls.2 $(TARGET_DIR)/usr/qml/QtQuick
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Templates.2 $(TARGET_DIR)/usr/qml/QtQuick
-	$(QT5QUICKCONTROLS2_INSTALL_TARGET_EXAMPLES)
-endef
-else
-define QT5QUICKCONTROLS2_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5LabsTemplates.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/controls $(TARGET_DIR)/usr/qml/Qt/labs
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/calendar $(TARGET_DIR)/usr/qml/Qt/labs
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/templates $(TARGET_DIR)/usr/qml/Qt/labs
-	$(QT5QUICKCONTROLS2_INSTALL_TARGET_EXAMPLES)
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5script/qt5script.mk +1 -31
index 4a292c95a5..e2a1bb2812 100644
@@ -27,34 +27,4 @@ QT5SCRIPT_LICENSE_FILES += \
 	src/3rdparty/javascriptcore/JavaScriptCore/COPYING.LIB \
 	src/3rdparty/javascriptcore/JavaScriptCore/pcre/COPYING
 
-define QT5SCRIPT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SCRIPT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SCRIPT_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-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))
+$(eval $(qmake-package))
package/qt5/qt5scxml/qt5scxml.mk +1 -36
index de9ece597c..cb6b83052f 100644
@@ -16,39 +16,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5SCXML_LICENSE := $(QT5SCXML_LICENSE), BSD-3-Clause (examples)
 endif
 
-define QT5SCXML_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SCXML_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SCXML_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SCXML_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Scxml*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5SCXML_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtScxml/ $(TARGET_DIR)/usr/qml/
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5SCXML_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/scxml $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5SCXML_INSTALL_TARGET_CMDS
-	$(QT5SCXML_INSTALL_TARGET_LIBS)
-	$(QT5SCXML_INSTALL_TARGET_QMLS)
-	$(QT5SCXML_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5sensors/qt5sensors.mk +1 -39
index 2d5cf327a6..7a3c5b7ef5 100644
@@ -22,42 +22,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5SENSORS_DEPENDENCIES += qt5declarative
 endif
 
-define QT5SENSORS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SENSORS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SENSORS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SENSORS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Sensors.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sensor* $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5SENSORS_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtSensors $(TARGET_DIR)/usr/qml
-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))
+$(eval $(qmake-package))
package/qt5/qt5serialbus/qt5serialbus.mk +1 -37
index 98c4466cb8..0ee351afe2 100644
@@ -13,40 +13,4 @@ QT5SERIALBUS_INSTALL_STAGING = YES
 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)
-endef
-
-define QT5SERIALBUS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SERIALBUS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5SERIALBUS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5SerialBus.so.* \
-		$(TARGET_DIR)/usr/lib
-	mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins/canbus
-	cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/canbus/*.so \
-		$(TARGET_DIR)/usr/lib/qt/plugins/canbus
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES)$(BR2_PACKAGE_QT5BASE_WIDGETS),yy)
-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
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5serialport/qt5serialport.mk +1 -31
index 2b0953586b..f08fac6002 100644
@@ -18,34 +18,4 @@ QT5SERIALPORT_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or LGPL-3.
 QT5SERIALPORT_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5SERIALPORT_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SERIALPORT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SERIALPORT_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-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))
+$(eval $(qmake-package))
package/qt5/qt5svg/qt5svg.mk +1 -39
index 48ff04bd75..2d8dade407 100644
@@ -18,42 +18,4 @@ QT5SVG_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0, GFDL-1.3 (docs)
 QT5SVG_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5SVG_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5SVG_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5SVG_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y)
-define QT5SVG_INSTALL_ICONENGINES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/iconengines $(TARGET_DIR)/usr/lib/qt/plugins
-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_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))
+$(eval $(qmake-package))
package/qt5/qt5tools/qt5tools.mk +1 -5
index a972756d3a..6351375757 100644
@@ -48,10 +48,6 @@ QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTPATHS) += qtpaths
 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)
-endef
-
 define QT5TOOLS_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) sub-src-qmake_all
 	$(foreach p,$(QT5TOOLS_BUILD_DIRS_y), \
@@ -63,4 +59,4 @@ define QT5TOOLS_INSTALL_TARGET_CMDS
 		$(INSTALL) -D -m0755 $(@D)/bin/$(p) $(TARGET_DIR)/usr/bin/$(p)$(sep))
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk +4 -59

91 lines not on this page · raw message

package/qt5/qt5wayland/qt5wayland.mk +2 -41

48 lines not on this page · raw message

package/qt5/qt5webchannel/qt5webchannel.mk +2 -38
index f1c08532c0..6b273544d4 100644
@@ -25,19 +25,6 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5WEBCHANNEL_DEPENDENCIES += qt5declarative
 endif
 
-define QT5WEBCHANNEL_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5WEBCHANNEL_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBCHANNEL_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
 	$(INSTALL) -m 0644 -D $(@D)/examples/webchannel/shared/qwebchannel.js \
@@ -50,29 +37,6 @@ define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
 endef
 endif
 
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5WEBCHANNEL_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebChannel $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webchannel $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBCHANNEL_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebChannel.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5WEBCHANNEL_INSTALL_TARGET_CMDS
-	$(QT5WEBCHANNEL_INSTALL_TARGET_LIBS)
-	$(QT5WEBCHANNEL_INSTALL_TARGET_QMLS)
-	$(QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT)
-	$(QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES)
-endef
+QT5WEBCHANNEL_POST_INSTALL_TARGET_HOOKS += QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5webengine/qt5webengine.mk +6 -44

75 lines not on this page · raw message

package/qt5/qt5webkit-examples/qt5webkit-examples.mk +1 -22
index 94153fd652..1f6058657d 100644
@@ -26,29 +26,8 @@ ifeq ($(BR2_PACKAGE_QT5XMLPATTERNS),y)
 QT5WEBKIT_EXAMPLES_DEPENDENCIES += qt5xmlpatterns
 endif
 
-define QT5WEBKIT_EXAMPLES_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5WEBKIT_EXAMPLES_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBKIT_EXAMPLES_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5WEBKIT_EXAMPLES_DEPENDENCIES += qt5declarative
-define QT5WEBKIT_EXAMPLES_INSTALL_QML
-	cp -dpfr $(@D)/examples/webkitqml $(TARGET_DIR)/usr/lib/qt/examples
-endef
 endif
 
-define QT5WEBKIT_EXAMPLES_INSTALL_TARGET_CMDS
-	mkdir -p $(TARGET_DIR)/usr/lib/qt/examples
-	cp -dpfr $(@D)/examples/webkitwidgets $(TARGET_DIR)/usr/lib/qt/examples
-	$(QT5WEBKIT_EXAMPLES_INSTALL_QML)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5webkit/qt5webkit.mk +7 -23
index a0a0998d12..7878e94e6e 100644
@@ -37,36 +37,20 @@ endif
 # QtWebkit's build system uses python, but only supports python2. We work
 # around this by forcing python2 early in the PATH, via a python->python2
 # symlink.
-QT5WEBKIT_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
+QT5WEBKIT_CONF_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
+QT5WEBKIT_MAKE_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
 define QT5WEBKIT_PYTHON2_SYMLINK
 	mkdir -p $(@D)/host-bin
 	ln -sf $(HOST_DIR)/bin/python2 $(@D)/host-bin/python
 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)
-endef
-
-define QT5WEBKIT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBKIT_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
+QT5WEBKIT_CONF_OPTS =  WEBKIT_CONFIG+=use_system_leveldb
 
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5WEBKIT_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebKit $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-define QT5WEBKIT_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib
+define QT5WEBKIT_INSTALL_TARGET_EXTRAS
 	cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/
-	$(QT5WEBKIT_INSTALL_TARGET_QMLS)
 endef
 
-$(eval $(generic-package))
+QT5WEBKIT_POST_INSTALL_TARGET_HOOKS += QT5WEBKIT_INSTALL_TARGET_EXTRAS
+
+$(eval $(qmake-package))
package/qt5/qt5websockets/qt5websockets.mk +1 -39
index c67db198db..247031e53c 100644
@@ -25,42 +25,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5WEBSOCKETS_DEPENDENCIES += qt5declarative
 endif
 
-define QT5WEBSOCKETS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5WEBSOCKETS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBSOCKETS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5WEBSOCKETS_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt/WebSockets $(TARGET_DIR)/usr/qml/Qt/
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebSockets $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBSOCKETS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/websockets $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBSOCKETS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebSockets.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5WEBSOCKETS_INSTALL_TARGET_CMDS
-	$(QT5WEBSOCKETS_INSTALL_TARGET_LIBS)
-	$(QT5WEBSOCKETS_INSTALL_TARGET_QMLS)
-	$(QT5WEBSOCKETS_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5x11extras/qt5x11extras.mk +1 -20
index 9d54c11061..8590f543c6 100644
@@ -18,23 +18,4 @@ QT5X11EXTRAS_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0
 QT5X11EXTRAS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5X11EXTRAS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5X11EXTRAS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5X11EXTRAS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5X11EXTRAS_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5X11Extras.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk +1 -31
index 0a8b47ac53..4efbf43da7 100644
@@ -21,34 +21,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5XMLPATTERNS_LICENSE := $(QT5XMLPATTERNS_LICENSE), BSD-3-Clause (examples)
 endif
 
-define QT5XMLPATTERNS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5XMLPATTERNS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5XMLPATTERNS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5XMLPATTERNS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5XmlPatterns*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5XMLPATTERNS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/xmlpatterns $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5XMLPATTERNS_INSTALL_TARGET_CMDS
-	$(QT5XMLPATTERNS_INSTALL_TARGET_LIBS)
-	$(QT5XMLPATTERNS_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5cinex/qt5cinex.mk +1 -8
index 89c38ee3f5..2b27f651d8 100644
@@ -17,13 +17,6 @@ QT5CINEX_DEPENDENCIES = qt5base qt5declarative
 QT5CINEX_LICENSE = CC-BY-3.0
 QT5CINEX_LICENSE_FILES = README
 
-define QT5CINEX_CONFIGURE_CMDS
-	cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake
-endef
-
-define QT5CINEX_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
 
 # In addition to the Cinematic Experience itself, we also install a
 # wrapper shell script to /usr/bin: the Cinematic Experience binary
@@ -39,4 +32,4 @@ define QT5CINEX_INSTALL_TARGET_CMDS
 		$(TARGET_DIR)/usr/bin/CinematicExperience-demo
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/quazip/quazip.mk +2 -8
index aba8274506..eef423b58a 100644
@@ -13,13 +13,7 @@ QUAZIP_DEPENDENCIES = \
 QUAZIP_LICENSE = LGPL-2.1
 QUAZIP_LICENSE_FILES = COPYING
 
-define QUAZIP_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr)
-endef
-
-define QUAZIP_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QUAZIP_CONF_OPTS = PREFIX=/usr
 
 define QUAZIP_INSTALL_STAGING_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(STAGING_DIR)
@@ -29,4 +23,4 @@ define QUAZIP_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(TARGET_DIR)
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qwt/qwt.mk +3 -6
index f381ebbb7a..bed510c598 100644
@@ -41,14 +41,11 @@ else
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/'
 endif
 
-define QWT_CONFIGURE_CMDS
+define QWT_PRE_CONFIGURE_CMD
 	$(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
-define QWT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QWT_PRE_CONFIGURE_HOOKS += QWT_PRE_CONFIGURE_CMD
 
 # After installation, we fixup the INSTALL_PREFIX in qwtconfig.pri so
 # that when building with qmake, -L$(STAGING_DIR)/usr/lib is used and
@@ -64,4 +61,4 @@ define QWT_INSTALL_TARGET_CMDS
 	rm -Rf $(TARGET_DIR)/usr/mkspecs
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
Signature · 1 line
2.21.0
#14 lore raw

PATCH v4 3/6 qt5: Convert packages to qmake infra

Hi Andreas,

Such a huge patch is pretty difficult to review and commit in one shot...

It would be a lot easier with one patch per package, because then we can apply
a few and leave the rest for another day.

Quoted 3 lines · Andreas Naumann

In most cases the configure, build, install-staging and install-target commands are replaced with the qmake-package generics. In some cases the custom environment/option variables are renamed to the generic name.

[snip]

Quoted 6 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +0 -0
index a714fca9c9..22cbf3cb87 100644
@@ -11,13 +11,8 @@ QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia
 QT_WEBKIT_KIOSK_LICENSE = LGPL-3.0

package/qt-webkit-kiosk/qt-webkit-kiosk.mk QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia · line 14

Quoted 10 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +1 -7
 QT_WEBKIT_KIOSK_LICENSE_FILES = doc/lgpl.html
 
-define QT_WEBKIT_KIOSK_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr)
-endef
-
-define QT_WEBKIT_KIOSK_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QT_WEBKIT_KIOSK_INSTALL_STAGING = NO

This isn't needed, it's the default.

Quoted 24 lines
package/qt-webkit-kiosk/qt-webkit-kiosk.mk +2 -1
+QT_WEBKIT_KIOSK_CONF_OPTS = PREFIX=/usr
 
 define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src -f Makefile.qt-webkit-kiosk \
@@ -29,4 +24,4 @@ define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS
 		$(if $(BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS),install_sound)
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
package/qt5/qt53d/qt53d.mk +0 -6
index 48a931d60b..eeb1b3644c 100644
@@ -17,41 +17,4 @@ endif
 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)
-endef
-
-define QT53D_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)

package/qt5/qt53d/qt53d.mk endif · line 35

Quoted 10 lines
package/qt5/qt53d/qt53d.mk +0 -10
-endef
-
-define QT53D_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5_LA_PRL_FILES_FIXUP)
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT53D_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/qt3d $(TARGET_DIR)/usr/lib/qt/examples/

So, how is the examples case handled now?

Quoted 13 lines
package/qt5/qt53d/qt53d.mk +0 -13
-endef
-endif
-
-ifeq ($(BR2_STATIC_LIBS),)
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-# Available since 5.9
-define QT53D_INSTALL_TARGET_LATEST
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/geometryloaders $(TARGET_DIR)/usr/lib/qt/plugins
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/renderplugins $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-define QT53D_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt53D*.so.* $(TARGET_DIR)/usr/lib

package/qt5/qt53d/qt53d.mk endif · line 20

Quoted 10 lines
package/qt5/qt53d/qt53d.mk +1 -9
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sceneparsers $(TARGET_DIR)/usr/lib/qt/plugins
-	cp -dpfr $(STAGING_DIR)/usr/qml/Qt3D $(TARGET_DIR)/usr/qml
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick $(TARGET_DIR)/usr/qml
-	$(QT53D_INSTALL_TARGET_LATEST)
-	$(QT53D_INSTALL_TARGET_EXAMPLES)
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(qmake-package))

[snip]

I didn't look at the rest yet.

Regards,
Arnout

#15 lore raw

PATCH v4 3/6 qt5: Convert packages to qmake infra

Am 26.03.19 um 00:43 schrieb Arnout Vandecappelle:

Quoted 7 lines

Hi Andreas,

Such a huge patch is pretty difficult to review and commit in one shot...

It would be a lot easier with one patch per package, because then we can apply a few and leave the rest for another day.

I understand. And repeat my proposal to create one patch with all the straightforward packages and individual patches for the the packages with hooks or other specials.

Quoted 17 lines · Andreas Naumann
Quoted 4 lines

In most cases the configure, build, install-staging and install-target commands are replaced with the qmake-package generics. In some cases the custom environment/option variables are renamed to the generic name.

[snip]

Quoted 9 lines
(quoted diff) +0 -0

b/package/qt-webkit-kiosk/qt-webkit-kiosk.mk index a714fca9c9..22cbf3cb87 100644 --- a/package/qt-webkit-kiosk/qt-webkit-kiosk.mk +++ b/package/qt-webkit-kiosk/qt-webkit-kiosk.mk @@ -11,13 +11,8 @@ QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia QT_WEBKIT_KIOSK_LICENSE = LGPL-3.0 QT_WEBKIT_KIOSK_LICENSE_FILES = doc/lgpl.html

Quoted 6 lines
Quoted 4 lines

-define QT_WEBKIT_KIOSK_CONFIGURE_CMDS - (cd $(@D);
$(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr) -endef - -define
QT_WEBKIT_KIOSK_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef +QT_WEBKIT_KIOSK_INSTALL_STAGING = NO

This isn't needed, it's the default.

True. At first I set _INSTALL_STAGING per default to YES, but removed that later. Forgot to remove this line then.

Quoted 15 lines
Quoted 15 lines

+QT_WEBKIT_KIOSK_CONF_OPTS = PREFIX=/usr

define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src -f Makefile.qt-webkit-kiosk \ @@ -29,4 +24,4 @@ define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS $(if $(BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS),install_sound) endef

-$(eval $(generic-package)) +$(eval $(qmake-package)) diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk index 48a931d60b..eeb1b3644c 100644 --- a/package/qt5/qt53d/qt53d.mk +++ b/package/qt5/qt53d/qt53d.mk @@ -17,41 +17,4 @@ endif QT53D_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-3.0 QT53D_LICENSE_FILES = LICENSE.GPL LICENSE.GPLv3 LICENSE.LGPLv3

Quoted 11 lines
Quoted 9 lines

-define QT53D_CONFIGURE_CMDS - (cd $(@D); $(TARGET_MAKE_ENV)
$(HOST_DIR)/bin/qmake) -endef - -define QT53D_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) -endef - -define
QT53D_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
install - $(QT5_LA_PRL_FILES_FIXUP) -endef - -ifeq
($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) -define
QT53D_INSTALL_TARGET_EXAMPLES - cp -dpfr
$(STAGING_DIR)/usr/lib/qt/examples/qt3d $(TARGET_DIR)/usr/lib/qt/examples/

So, how is the examples case handled now?

To be honest, I dont know how exactly. But I have tested that if qt5base was configured without examples, they wont be compiled and installed in the other modules.

Quoted 20 lines
Quoted 17 lines

-endef -endif - -ifeq ($(BR2_STATIC_LIBS),) -ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y) -# Available since 5.9
-define QT53D_INSTALL_TARGET_LATEST - cp -dpfr
$(STAGING_DIR)/usr/lib/qt/plugins/geometryloaders
$(TARGET_DIR)/usr/lib/qt/plugins - cp -dpfr
$(STAGING_DIR)/usr/lib/qt/plugins/renderplugins $(TARGET_DIR)/usr/lib/qt/plugins -endef -endif -define
QT53D_INSTALL_TARGET_CMDS - cp -dpf
$(STAGING_DIR)/usr/lib/libQt53D*.so.* $(TARGET_DIR)/usr/lib - cp
-dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sceneparsers
$(TARGET_DIR)/usr/lib/qt/plugins - cp -dpfr
$(STAGING_DIR)/usr/qml/Qt3D $(TARGET_DIR)/usr/qml - cp -dpfr
$(STAGING_DIR)/usr/qml/QtQuick $(TARGET_DIR)/usr/qml -
$(QT53D_INSTALL_TARGET_LATEST) - $(QT53D_INSTALL_TARGET_EXAMPLES)
-endef -endif - -$(eval $(generic-package)) +$(eval $(qmake-package))

[snip]

Quoted 1 line

I didn't look at the rest yet.

Ok, thanks a lot anyway!

Regards,
Andreas

Quoted 3 lines

Regards, Arnout

#16 lore raw

PATCH v4 3/6 qt5: Convert packages to qmake infra

Quoted 10 lines · Andreas Naumann
Quoted 9 lines
Quoted 7 lines

-define QT53D_CONFIGURE_CMDS -??? (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake) -endef - -define QT53D_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) -endef - -define QT53D_INSTALL_STAGING_CMDS -??? $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install -??? $(QT5_LA_PRL_FILES_FIXUP) -endef - -ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) -define QT53D_INSTALL_TARGET_EXAMPLES -??? cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/qt3d $(TARGET_DIR)/usr/lib/qt/examples/

So, how is the examples case handled now?

Quoted 3 lines

To be honest, I dont know how exactly. But I have tested that if qt5base was configured without examples, they wont be compiled and installed in the other modules.

Oh, I hadn't noticed that it was in fact QT5BASE_EXAMPLES that was tested. I
had just seen that QT53D_EXAMPLES was not used anywhere else in the .mk file, and hadn't thought of the possibility that this option would be encoded in the qt.conf or something like that.

Regards,
Arnout

#17 lore raw

PATCH v4 4/6 quazip: Patch .pro file to correctly crosscompile and use qmake infra

In reply to Andreas Naumann

The quazip .pro files uses the target only prefix for cross staging install. This breaks using the new qmake infra, so add a minor patch to fix this.

---
 .../0001-Fix-crosscompile-staging-install.patch  | 16 ++++++++++++++++
 package/quazip/quazip.mk                         | 10 ----------
 2 files changed, 16 insertions(+), 10 deletions(-)
 create mode 100644 package/quazip/0001-Fix-crosscompile-staging-install.patch
package/quazip/0001-Fix-crosscompile-staging-install.patch new file +16 -0
new file mode 100644
index 0000000000..96cae37283
@@ -0,0 +1,16 @@
+Index: quazip-0.7.6/quazip/quazip.pro
+===================================================================
+--- quazip-0.7.6.orig/quazip/quazip.pro
++++ quazip-0.7.6/quazip/quazip.pro
+@@ -47,9 +47,9 @@ CONFIG(debug, debug|release) {
+ }
+ 
+ unix:!symbian {
+-    headers.path=$$PREFIX/include/quazip
++    headers.path=$$[QT_INSTALL_PREFIX]/include/quazip
+     headers.files=$$HEADERS
+-    target.path=$$PREFIX/lib/$${LIB_ARCH}
++    target.path=$$[QT_INSTALL_PREFIX]/lib/$${LIB_ARCH}
+     QMAKE_PKGCONFIG_DESTDIR = pkgconfig
+     INSTALLS += headers target
+ 
package/quazip/quazip.mk +0 -10
index eef423b58a..1b34c9fc2a 100644
@@ -13,14 +13,4 @@ QUAZIP_DEPENDENCIES = \
 QUAZIP_LICENSE = LGPL-2.1
 QUAZIP_LICENSE_FILES = COPYING
 
-QUAZIP_CONF_OPTS = PREFIX=/usr
-
-define QUAZIP_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(STAGING_DIR)
-endef
-
-define QUAZIP_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(TARGET_DIR)
-endef
-
 $(eval $(qmake-package))
Signature · 1 line
2.21.0
#18 lore raw

PATCH v4 4/6 quazip: Patch .pro file to correctly crosscompile and use qmake infra

package/quazip/0001-Fix-crosscompile-staging-install.patch

Quoted 16 lines · Andreas Naumann

The quazip .pro files uses the target only prefix for cross staging install. This breaks using the new qmake infra, so add a minor patch to fix this.

---
 .../0001-Fix-crosscompile-staging-install.patch  | 16 ++++++++++++++++
 package/quazip/quazip.mk                         | 10 ----------
 2 files changed, 16 insertions(+), 10 deletions(-)
 create mode 100644 package/quazip/0001-Fix-crosscompile-staging-install.patch
package/quazip/0001-Fix-crosscompile-staging-install.patch new file +0 -0
new file mode 100644
index 0000000000..96cae37283
@@ -0,0 +1,16 @@

You need a commit message and a SoB here. Also, preferably a git formatted patch.

There's an active upstream at https://github.com/stachenov/quazip so please
send a PR.

Quoted 22 lines
package/quazip/0001-Fix-crosscompile-staging-install.patch new file +16 -0
+Index: quazip-0.7.6/quazip/quazip.pro
+===================================================================
+--- quazip-0.7.6.orig/quazip/quazip.pro
++++ quazip-0.7.6/quazip/quazip.pro
+@@ -47,9 +47,9 @@ CONFIG(debug, debug|release) {
+ }
+ 
+ unix:!symbian {
+-    headers.path=$$PREFIX/include/quazip
++    headers.path=$$[QT_INSTALL_PREFIX]/include/quazip
+     headers.files=$$HEADERS
+-    target.path=$$PREFIX/lib/$${LIB_ARCH}
++    target.path=$$[QT_INSTALL_PREFIX]/lib/$${LIB_ARCH}
+     QMAKE_PKGCONFIG_DESTDIR = pkgconfig
+     INSTALLS += headers target
+ 
package/quazip/quazip.mk +0 -0
index eef423b58a..1b34c9fc2a 100644
@@ -13,14 +13,4 @@ QUAZIP_DEPENDENCIES = \
 QUAZIP_LICENSE = LGPL-2.1

package/quazip/quazip.mk QUAZIP_DEPENDENCIES = \ · line 23

Quoted 10 lines
package/quazip/quazip.mk +0 -8
 QUAZIP_LICENSE_FILES = COPYING
 
-QUAZIP_CONF_OPTS = PREFIX=/usr
-
-define QUAZIP_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(STAGING_DIR)
-endef
-
-define QUAZIP_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(TARGET_DIR)

How come this used to work if they were using PREFIX instead of QT_INSTALL_PREFIX?

Regards,
Arnout

Quoted 4 lines
package/quazip/quazip.mk +0 -2
-endef
-
 $(eval $(qmake-package))
#19 lore raw

PATCH v4 4/6 quazip: Patch .pro file to correctly crosscompile and use qmake infra

Am 26.03.19 um 01:03 schrieb Arnout Vandecappelle:

Quoted 21 lines · Andreas Naumann
Quoted 11 lines

The quazip .pro files uses the target only prefix for cross staging install. This breaks using the new qmake infra, so add a minor patch to fix this.

.../0001-Fix-crosscompile-staging-install.patch | 16
++++++++++++++++ package/quazip/quazip.mk |
10 ---------- 2 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 package/quazip/0001-Fix-crosscompile-staging-install.patch

Quoted 6 lines

diff --git a/package/quazip/0001-Fix-crosscompile-staging-install.patch b/package/quazip/0001-Fix-crosscompile-staging-install.patch new file mode 100644 index 0000000000..96cae37283 --- /dev/null +++ b/package/quazip/0001-Fix-crosscompile-staging-install.patch @@ -0,0 +1,16 @@

Quoted 3 lines

You need a commit message and a SoB here. Also, preferably a git formatted patch.> There's an active upstream at
https://github.com/stachenov/quazip so please send a PR.

OK.

Quoted 5 lines
Quoted 5 lines

+Index: quazip-0.7.6/quazip/quazip.pro
+===================================================================

+--- quazip-0.7.6.orig/quazip/quazip.pro

Quoted 14 lines
Quoted 14 lines

++++ quazip-0.7.6/quazip/quazip.pro +@@ -47,9 +47,9 @@ CONFIG(debug, debug|release) { + } + + unix:!symbian { +- headers.path=$$PREFIX/include/quazip ++ headers.path=$$[QT_INSTALL_PREFIX]/include/quazip + headers.files=$$HEADERS +- target.path=$$PREFIX/lib/$${LIB_ARCH} ++ target.path=$$[QT_INSTALL_PREFIX]/lib/$${LIB_ARCH} +
QMAKE_PKGCONFIG_DESTDIR = pkgconfig + INSTALLS += headers
target + diff --git a/package/quazip/quazip.mk b/package/quazip/quazip.mk index eef423b58a..1b34c9fc2a 100644 --- a/package/quazip/quazip.mk +++ b/package/quazip/quazip.mk @@ -13,14 +13,4 @@ QUAZIP_DEPENDENCIES = \ QUAZIP_LICENSE = LGPL-2.1 QUAZIP_LICENSE_FILES = COPYING

Quoted 8 lines
Quoted 5 lines

-QUAZIP_CONF_OPTS = PREFIX=/usr - -define
QUAZIP_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
install INSTALL_ROOT=$(STAGING_DIR) -endef - -define
QUAZIP_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
install INSTALL_ROOT=$(TARGET_DIR)

How come this used to work if they were using PREFIX instead of QT_INSTALL_PREFIX?

Using PREFIX leads to cross-install not being natively supported, but only with the addition of INSTALL_PREFIX. Thomas tried to utilize this behaviour for our purpose. However, if a package has files for the build-host, they will leak into STAGING_DIR and have to be identified and removed in a later step. This is not optimal which is why Thomas was looking for another solution in the first place.

Regards,
Andreas

Quoted 6 lines

Regards, Arnout

Quoted 2 lines

-endef - $(eval $(qmake-package))

#20 lore raw

PATCH v4 5/6 qt5base: Fix inconsistencies when overriding qmake properties

In reply to Andreas Naumann

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
#21 lore raw

PATCH v4 5/6 qt5base: Fix inconsistencies when overriding qmake properties

Quoted 12 lines · Andreas Naumann

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

Quoted 4 lines

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.

This used to be the first patch in the series, and AFAICS it should indeed be
OK to apply it already. Or am I mistaken? Have you tested some packages with just this patch?

The changelog in the cover letter doesn't bring enlightenment...

Regards,
Arnout

Quoted 34 lines
---
 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
#22 lore raw

PATCH v4 5/6 qt5base: Fix inconsistencies when overriding qmake properties

Am 26.03.19 um 00:50 schrieb Arnout Vandecappelle:

Quoted 22 lines · Andreas Naumann
Quoted 13 lines

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

Quoted 5 lines

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.

Quoted 3 lines

This used to be the first patch in the series, and AFAICS it should indeed be OK to apply it already. Or am I mistaken? Have you tested some packages with just this patch?

After v1 I have not tested just this patch exclusively, but always with the other patches on top. If something was wrong it should fail anyway though.
I reordered it because it's not a prerequisite to qmake infra. Actually I wasn't sure to resend it at all because its more a prerequisite to the ppsh changes (which I left out at v4).

But true, it stands on its own and I'd be happy if it could be tested/applied by someone. Should I resend standalone?

Regards,
Andreas

Quoted 25 lines

The changelog in the cover letter doesn't bring enlightenment...

Regards, Arnout

Quoted 19 lines

package/qt5/qt5base/qt.conf.in | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)

(quoted diff) +0 -0

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

(quoted diff) +0 -2
-Libraries=/usr/lib -LibraryExecutables=/usr/libexec 
-Binaries=/usr/bin Plugins=/usr/lib/qt/plugins 

Examples=/usr/lib/qt/examples -Qml2Imports=/usr/qml

(quoted diff) +0 -4
-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
#23 lore raw

PATCH v4 5/6 qt5base: Fix inconsistencies when overriding qmake properties

Quoted 2 lines · Andreas Naumann

But true, it stands on its own and I'd be happy if it could be tested/applied by someone. Should I resend standalone?

No, keep it as part of the series, because the rest of the series depends on
it. You can (if you like) mention in the cover letter or the patch comments (below the --- line) that it can be applied standalone.

Regards,
Arnout

#24 lore raw

PATCH v4 5/6 qt5base: Fix inconsistencies when overriding qmake properties

In reply to Andreas Naumann
Quoted 12 lines · Andreas Naumann

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

Quoted 4 lines

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.

Since you said this patch is indeed independent of the rest, I was about to
apply, but then I noticed this...

In the original qt.conf.in, Settings was explicitly set to /usr. Now, you
change it back to /usr/etc/xdg, which is indeed the Qt default. However, would this not lead to runtime problems for people who actually use the settings directory, because it will have changed location after Buildroot upgrade? If we had the Qt default overridden before, I think we should keep that override (even if it is maybe not such a great idea to override it).

Quoted 19 lines
---
 package/qt5/qt5base/qt.conf.in | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)
package/qt5/qt5base/qt.conf.in +2 -3
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

package/qt5/qt5base/qt.conf.in line 16

Quoted 10 lines
package/qt5/qt5base/qt.conf.in +0 -8
-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

This is the original setting of Settings.

Regards,
Arnout

Quoted 5 lines
package/qt5/qt5base/qt.conf.in +1 -3
-Documentation=/usr/doc
-ArchData=/usr
-Data=/usr
+Settings=/usr/etc/xdg
#25 lore raw

PATCH v4 5/6 qt5base: Fix inconsistencies when overriding qmake properties

Hi Arnout,

Am 14.04.19 um 12:12 schrieb Arnout Vandecappelle:

Quoted 23 lines · Andreas Naumann
Quoted 12 lines

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

Quoted 4 lines

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.

Since you said this patch is indeed independent of the rest, I was about to
apply, but then I noticed this...

Quoted 7 lines

In the original qt.conf.in, Settings was explicitly set to /usr. Now, you
change it back to /usr/etc/xdg, which is indeed the Qt default. However, would this not lead to runtime problems for people who actually use the settings directory, because it will have changed location after Buildroot upgrade? If we had the Qt default overridden before, I think we should keep that override (even if it is maybe not such a great idea to override it).

I agree and actually was a bit unsure if changing the value would create issues for anybody. However within buildroot I have not found a package that actually deploys anything to /usr/etc/xdg, which could also mean I didnt look hard enough.

I will try to finally prepare v5 of the set tonight. If I dont hear anything else, I'll set the value back to /usr.

regards,
Andreas

Quoted 42 lines
Quoted 20 lines
---
  package/qt5/qt5base/qt.conf.in | 17 +++--------------
  1 file changed, 3 insertions(+), 14 deletions(-)
package/qt5/qt5base/qt.conf.in +2 -3
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

package/qt5/qt5base/qt.conf.in line 16

Quoted 10 lines
package/qt5/qt5base/qt.conf.in +0 -8
-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

This is the original setting of Settings.

Regards,
Arnout

Quoted 5 lines
package/qt5/qt5base/qt.conf.in +1 -3
-Documentation=/usr/doc
-ArchData=/usr
-Data=/usr
+Settings=/usr/etc/xdg
#26 lore raw

PATCH v4 5/6 qt5base: Fix inconsistencies when overriding qmake properties

Quoted 34 lines · Andreas Naumann

Hi Arnout,

Am 14.04.19 um 12:12 schrieb Arnout Vandecappelle:

Quoted 23 lines · Andreas Naumann
Quoted 12 lines

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

Quoted 4 lines

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.

? Since you said this patch is indeed independent of the rest, I was about to apply, but then I noticed this...

Quoted 7 lines

? In the original qt.conf.in, Settings was explicitly set to /usr. Now, you change it back to /usr/etc/xdg, which is indeed the Qt default. However, would this not lead to runtime problems for people who actually use the settings directory, because it will have changed location after Buildroot upgrade? If we had the Qt default overridden before, I think we should keep that override (even if it is maybe not such a great idea to override it).

Quoted 3 lines

I agree and actually was a bit unsure if changing the value would create issues for anybody. However within buildroot I have not found a package that actually deploys anything to /usr/etc/xdg, which could also mean I didnt look hard enough.

I can't say I *really* know what this Settings configuration is doing, but I
*think* it is used by applications (and we don't ship many qt5-based applications, mainly libraries). Also I think it will typically not be populated during installation, but it will be used at runtime to read and save global settings.

Quoted 2 lines

I will try to finally prepare v5 of the set tonight. If I dont hear anything else, I'll set the value back to /usr.

Okay, thanks.

Regards,
Arnout

Quoted 47 lines

regards,
Andreas

Quoted 42 lines
Quoted 23 lines

---
? package/qt5/qt5base/qt.conf.in | 17 +++-------------- ? 1 file changed, 3 insertions(+), 14 deletions(-)

package/qt5/qt5base/qt.conf.in +0 -0
index 9a0b9cd53b..46ebe61614 100644
@@ -1,19 +1,8 @@

? [Paths]

package/qt5/qt5base/qt.conf.in +2 -1
-Prefix=@@HOST_DIR@@
+Prefix=/usr
+HostPrefix=@@HOST_DIR@@

? Sysroot=@@STAGING_DIR@@
? Headers=/usr/include/qt5

package/qt5/qt5base/qt.conf.in +0 -3
-Libraries=/usr/lib
-LibraryExecutables=/usr/libexec
-Binaries=/usr/bin

? Plugins=/usr/lib/qt/plugins
? Examples=/usr/lib/qt/examples

package/qt5/qt5base/qt.conf.in line 16

Quoted 7 lines
package/qt5/qt5base/qt.conf.in +0 -7
-Qml2Imports=/usr/qml
-Imports=/usr/imports
-Translations=/usr/translations
-Examples=/usr/lib/qt/examples
-Demos=/usr/lib/qt/examples
-Tests=/usr/tests
-Settings=/usr

? This is the original setting of Settings.

? Regards,
? Arnout

Quoted 5 lines
package/qt5/qt5base/qt.conf.in +1 -3
-Documentation=/usr/doc
-ArchData=/usr
-Data=/usr
+Settings=/usr/etc/xdg
#27 lore raw

PATCH v4 6/6 qt5: Remove *.la/*.prl fixup script

In reply to Andreas Naumann

After fixing Prefix in our custom qt.conf, Qt computes and embeds the correct sysroot prefixed pathes in all *.la and *.prl files.

---
 package/pkg-qmake.mk | 1 -
 1 file changed, 1 deletion(-)
package/pkg-qmake.mk +0 -1
index 11cfb809fc..9293253fae 100644
@@ -77,7 +77,6 @@ define $(2)_INSTALL_STAGING_CMDS
 	$$(TARGET_MAKE_ENV) \
 	$$($(2)_MAKE_ENV) \
 	$$(MAKE) -C $$($$(PKG)_SRCDIR) $$($(2)_INSTALL_STAGING_OPTS)
-	$$(QT5_LA_PRL_FILES_FIXUP)
 endef
 endif
 
Signature · 1 line
2.21.0
#28 lore raw

PATCH v4 6/6 qt5: Remove *.la/*.prl fixup script

Hi,

I'd really be interested if somebody remembers why this was needed. *.la files are fixed in another generic step anyway, so why do it twice? Also, I have not found absolute /usr/lib pathes in any of the prl files without this.

regards,
Andreas

Am 22.03.19 um 19:39 schrieb Andreas Naumann:

Quoted 14 lines

After fixing Prefix in our custom qt.conf, Qt computes and embeds the correct sysroot prefixed pathes in all *.la and *.prl files.

package/pkg-qmake.mk | 1 - 1 file changed, 1 deletion(-)

package/pkg-qmake.mk index renamed from package/pkg-qmake.mk +0 -0

11cfb809fc..9293253fae 100644 --- a/package/pkg-qmake.mk +++ b/package/pkg-qmake.mk @@ -77,7 +77,6 @@ define $(2)_INSTALL_STAGING_CMDS $$(TARGET_MAKE_ENV) \ $$($(2)_MAKE_ENV) \
$$(MAKE) -C $$($$(PKG)_SRCDIR) $$($(2)_INSTALL_STAGING_OPTS) - $$(QT5_LA_PRL_FILES_FIXUP) endef endif

#29 lore raw

PATCH v4 6/6 qt5: Remove *.la/*.prl fixup script

Quoted 4 lines · Andreas Naumann

Hi,

I'd really be interested if somebody remembers why this was needed. *.la files are fixed in another generic step anyway, so why do it twice?

That's easy: at the time this was added (commit
1737b5648c9f778149eb7da5897b66a9577d22c4 from 2013) the fixup was only done for autotools packages, not for all packages. That changed only with commit 67f8138a46388f28d00dc8711b64d04ac7ebb464 in 2015.

Quoted 2 lines

Also, I have not found absolute /usr/lib pathes in any of the prl files without this.

This I can't explain. I've added Thomas in Cc but I doubt that he remembers.

But isn't this exactly what gets fixed by the previous patch?

BTW, this patch should also remove the definition of the macro.

Regards,
Arnout

Quoted 23 lines

regards,
Andreas

Am 22.03.19 um 19:39 schrieb Andreas Naumann:

Quoted 7 lines

After fixing Prefix in our custom qt.conf, Qt computes and embeds the correct sysroot prefixed pathes in all *.la and *.prl files.

package/pkg-qmake.mk | 1 - 1 file changed, 1 deletion(-)

package/pkg-qmake.mk index renamed from package/pkg-qmake.mk +0 -0
Quoted 6 lines

11cfb809fc..9293253fae 100644 --- a/package/pkg-qmake.mk +++ b/package/pkg-qmake.mk @@ -77,7 +77,6 @@ define $(2)_INSTALL_STAGING_CMDS $$(TARGET_MAKE_ENV) \ $$($(2)_MAKE_ENV) \ $$(MAKE) -C $$($$(PKG)_SRCDIR) $$($(2)_INSTALL_STAGING_OPTS) - $$(QT5_LA_PRL_FILES_FIXUP) endef endif

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

#30 lore raw

PATCH v4 6/6 qt5: Remove *.la/*.prl fixup script

Hello,

Quoted 4 lines · On Sat, 13 Apr 2019 15:08:58 +0200 Arnout Vandecappelle <[email protected]> wrote:
Quoted 2 lines

Also, I have not found absolute /usr/lib pathes in any of the prl files without this.

This I can't explain. I've added Thomas in Cc but I doubt that he remembers.

I obviously won't remember more than what the commit history has. However, this .prl fixup has been added a *long* time ago, I believe right when qt5 support was introduced. It is very well possible that things changed since then, making the fixup possibly no longer needed.

Thomas

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

v4 cover Qt5 qmake infra with generic target install

In reply to Andreas Naumann
Quoted 13 lines · Andreas Naumann

Hi all,

here is the fourth iteration of my efforts to prepare Qt5 packages for ppsh.

Originally I had prepared v3 with a fix for the reinstall issue found by Thomas, which included conversion to a new qmake infra as suggested by Arnout.

However, having done that I had the idea to use a folder inside the package build dir as INSTALL_ROOT, which makes it possible to to isolate the staging files and copy them to target without relying on timestamps. So I ditched v3 and carried on doing that as v4. (If somebody is interested in v3 I can still
send it.)

Quoted 3 lines

This avoids the controversial discussed "install to staging only" approach, for which I'm not sure if it actually has enough advantages to be worth the hassle of dealing with timestamps and such.

I've given feedback on all patches and marked as changes requested. Except for
patch 5, which I think can be applied as is. It would be nice to do that first, because then my comment about the .la/.prl fixup wouldn't apply any more.

Quoted 7 lines

regards,
Andreas

Quoted 6 lines

v3 -> v4:
- changed time-stamp based target install to using INSTALL_ROOT
- exclude ppsh specific patches>
v2 -> v3 (not published):
- convert to qmake infra
- use a custom .stamp_staging_started to fix the -reinstall issue

I think the quazip patch is also new.

Regards,
Arnout

Quoted 59 lines

v1 -> v2:
- added generic qmake target install
- added removal of la/prl fixup (optional)
- rebased and reordered (together with ppsh-v7) on master
- split patches to separate qmake rework from ppsh specifics
- added handling of pkg-config search pathes for ppsh

Andreas Naumann (6):
qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
qt5: Provide generic qmake package infrastructure
qt5: Convert packages to qmake infra
quazip: Patch .pro file to correctly crosscompile and use qmake infra
qt5base: Fix inconsistencies when overriding qmake properties
qt5: Remove *.la/*.prl fixup script

 package/Makefile.in                           |   1 +
 package/pkg-qmake.mk                          | 108 ++++++++++++++++++
 package/qextserialport/qextserialport.mk      |  22 +---
 package/qt-webkit-kiosk/qt-webkit-kiosk.mk    |  11 +-
 package/qt5/qt53d/qt53d.mk                    |  39 +------
 package/qt5/qt5base/qt.conf.in                |  17 +--
 package/qt5/qt5base/qt5base.mk                |  88 ++------------
 package/qt5/qt5canvas3d/qt5canvas3d.mk        |  26 +----
 package/qt5/qt5charts/qt5charts.mk            |  41 +------
 .../qt5/qt5connectivity/qt5connectivity.mk    |  60 +---------
 package/qt5/qt5declarative/qt5declarative.mk  |  48 +-------
 package/qt5/qt5enginio/qt5enginio.mk          |  39 +------
 .../qt5graphicaleffects.mk                    |  18 +--
 .../qt5/qt5imageformats/qt5imageformats.mk    |  20 +---
 package/qt5/qt5location/qt5location.mk        |  50 +-------
 package/qt5/qt5multimedia/qt5multimedia.mk    |  47 +-------
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk  |  41 +------
 .../qt5quickcontrols2/qt5quickcontrols2.mk    |  40 +------
 package/qt5/qt5script/qt5script.mk            |  32 +-----
 package/qt5/qt5scxml/qt5scxml.mk              |  37 +-----
 package/qt5/qt5sensors/qt5sensors.mk          |  40 +------
 package/qt5/qt5serialbus/qt5serialbus.mk      |  38 +-----
 package/qt5/qt5serialport/qt5serialport.mk    |  32 +-----
 package/qt5/qt5svg/qt5svg.mk                  |  40 +------
 package/qt5/qt5tools/qt5tools.mk              |   6 +-
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  |  63 +---------
 package/qt5/qt5wayland/qt5wayland.mk          |  43 +------
 package/qt5/qt5webchannel/qt5webchannel.mk    |  40 +------
 package/qt5/qt5webengine/qt5webengine.mk      |  50 +-------
 .../qt5webkit-examples/qt5webkit-examples.mk  |  23 +---
 package/qt5/qt5webkit/qt5webkit.mk            |  30 ++---
 package/qt5/qt5websockets/qt5websockets.mk    |  40 +------
 package/qt5/qt5x11extras/qt5x11extras.mk      |  21 +---
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  |  32 +-----
 package/qt5cinex/qt5cinex.mk                  |   9 +-
 ...001-Fix-crosscompile-staging-install.patch |  16 +++
 package/quazip/quazip.mk                      |  18 +--
 package/qwt/qwt.mk                            |   9 +-
 38 files changed, 190 insertions(+), 1145 deletions(-)
 create mode 100644 package/pkg-qmake.mk
 create mode 100644 package/quazip/0001-Fix-crosscompile-staging-install.patch
#32 lore raw

v4 cover Qt5 qmake infra with generic target install

Hi Arnout,

Am 26.03.19 um 01:09 schrieb Arnout Vandecappelle:

Quoted 23 lines · Andreas Naumann
Quoted 15 lines

Hi all,

here is the fourth iteration of my efforts to prepare Qt5 packages for ppsh.

Originally I had prepared v3 with a fix for the reinstall issue found by Thomas, which included conversion to a new qmake infra as suggested by Arnout.

However, having done that I had the idea to use a folder inside the package build dir as INSTALL_ROOT, which makes it possible to to isolate the staging files and copy them to target without relying on timestamps. So I ditched v3 and carried on doing that as v4. (If somebody is interested in v3 I can still send it.)

Quoted 4 lines

This avoids the controversial discussed "install to staging only" approach, for which I'm not sure if it actually has enough advantages to be worth the hassle of dealing with timestamps and such.

Quoted 4 lines

I've given feedback on all patches and marked as changes requested. Except for patch 5, which I think can be applied as is. It would be nice to do that first, because then my comment about the .la/.prl fixup wouldn't apply any more.

Thank you very much for your review! Yes the coverletter wasnt so perfect because many things got in the way after creating the set and before sending the whole thing.
So I really appreciate you took the time!

Quoted 8 lines
Quoted 8 lines

regards, Andreas

Quoted 6 lines
Quoted 4 lines

v3 -> v4: - changed time-stamp based target install to using INSTALL_ROOT - exclude ppsh specific patches> v2 -> v3 (not published): - convert to qmake infra - use a custom .stamp_staging_started to fix the -reinstall issue

I think the quazip patch is also new.

Yes it is.

I'll update in the next iteration.

best regards,
Andreas

Quoted 61 lines

Regards, Arnout

Quoted 57 lines

v1 -> v2: - added generic qmake target install - added removal of la/prl fixup (optional) - rebased and reordered (together with ppsh-v7) on master - split patches to separate qmake rework from ppsh specifics - added handling of pkg-config search pathes for ppsh

Andreas Naumann (6): qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen qt5: Provide generic qmake package infrastructure qt5: Convert packages to qmake infra quazip: Patch .pro file to correctly crosscompile and use qmake infra qt5base:
Fix inconsistencies when overriding qmake properties qt5: Remove *.la/*.prl fixup script

package/Makefile.in | 1 +
package/pkg-qmake.mk | 108
++++++++++++++++++ package/qextserialport/qextserialport.mk |
22 +--- package/qt-webkit-kiosk/qt-webkit-kiosk.mk | 11 +-

package/qt5/qt53d/qt53d.mk                    |  39 +------ 
package/qt5/qt5base/qt.conf.in                |  17 +-- 
package/qt5/qt5base/qt5base.mk                |  88 ++------------
 package/qt5/qt5canvas3d/qt5canvas3d.mk        |  26 +---- 
package/qt5/qt5charts/qt5charts.mk            |  41 +------ 
.../qt5/qt5connectivity/qt5connectivity.mk    |  60 +--------- 
package/qt5/qt5declarative/qt5declarative.mk  |  48 +------- 
package/qt5/qt5enginio/qt5enginio.mk          |  39 +------ 
.../qt5graphicaleffects.mk                    |  18 +-- 
.../qt5/qt5imageformats/qt5imageformats.mk    |  20 +--- 
package/qt5/qt5location/qt5location.mk        |  50 +------- 
package/qt5/qt5multimedia/qt5multimedia.mk    |  47 +------- 
.../qt5/qt5quickcontrols/qt5quickcontrols.mk  |  41 +------ 
.../qt5quickcontrols2/qt5quickcontrols2.mk    |  40 +------ 
package/qt5/qt5script/qt5script.mk            |  32 +----- 
package/qt5/qt5scxml/qt5scxml.mk              |  37 +----- 
package/qt5/qt5sensors/qt5sensors.mk          |  40 +------ 
package/qt5/qt5serialbus/qt5serialbus.mk      |  38 +----- 
package/qt5/qt5serialport/qt5serialport.mk    |  32 +----- 
package/qt5/qt5svg/qt5svg.mk                  |  40 +------ 
package/qt5/qt5tools/qt5tools.mk              |   6 +- 
.../qt5virtualkeyboard/qt5virtualkeyboard.mk  |  63 +--------- 
package/qt5/qt5wayland/qt5wayland.mk          |  43 +------ 
package/qt5/qt5webchannel/qt5webchannel.mk    |  40 +------ 
package/qt5/qt5webengine/qt5webengine.mk      |  50 +------- 
.../qt5webkit-examples/qt5webkit-examples.mk  |  23 +--- 
package/qt5/qt5webkit/qt5webkit.mk            |  30 ++--- 
package/qt5/qt5websockets/qt5websockets.mk    |  40 +------ 
package/qt5/qt5x11extras/qt5x11extras.mk      |  21 +--- 
package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  |  32 +----- 
package/qt5cinex/qt5cinex.mk                  |   9 +- 
...001-Fix-crosscompile-staging-install.patch |  16 +++ 
package/quazip/quazip.mk                      |  18 +-- 
package/qwt/qwt.mk                            |   9 +- 38 files 

changed, 190 insertions(+), 1145 deletions(-) create mode 100644 package/pkg-qmake.mk create mode 100644 package/quazip/0001-Fix-crosscompile-staging-install.patch