All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility
@ 2020-02-17 21:23 Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen Andreas Naumann
                   ` (28 more replies)
  0 siblings, 29 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Hi,
this is a reworked version from my previous effort to convert qt5
packages to a qmake-package infra and then make that infrastructure
suitable for per-package builds.

Though combining the two is not strictly necessary, the approach leads
to, hopefully, less complicated and more maintainable code.
The trick for the generic infra is basically to remove most of the
handcrafted target install steps, in favor of relying on the
qmake generated install recipes. How this is done has not changed since
v4 and what we have agreed on back then. Details in the commits. I have
also tried to incorporate the suggestions of the reviews back then, but
dont yell at me if I missed some (v4 was march last year).

Now for the testing:
Since "2215b8a75 qt5: disable for static-only builds" it's not possible
to build with static library only support, so I didn't test it. However,
the patch "qt5base: Do not build shared libs if BR2_STATIC_LIBS is
chosen" is included in case static libs will be reenabled in the future.

This series is now rebased on master from a few days ago, but most of
the testing has been done on top of revision fe033bd 2019-12-15 18:36
FFontaine       o package/samba4: fix build without python3.
That version happened to build almost fine with a modified
imx6-sabresd_qt5_defconfig (all possible qt packages activated, see below).
Afterwards I tried several times to rebuild with newer master version,
only to find the build break in some corner cases, which didnt seem to
relate to the changes I did. Time and again I ran out of time debugging
and fixing those issues.

The aim of my testing was to prove the target and staging results would
not differ between sequential build without the patches and a
parallelized per-package build with them.

However, there are differences, and they are interesting. To find them I
compared the target folders with a rsync dry-run (details below). It
actually revealed that some files are missing in the old install method:
- executables of qt5xmlpatterns (if not desired could be removed inside
POST_INSTALL_TARGET_HOOKS)
- many plain library links (the ones without any version appendix)
- libQt5Nfc.so* altogether
- NFC examples
- liblocationlabsplugin.so (and some more files from qt5location)

The only files that were missing with the new method are *.prl. Those
were explicitly removed in the target-finalize step. This is a little
inconsistent with the way the examples are installed (with source,
Makefiles and all), so I dont know if it's a issue.

After adding the more complicated package conversions some additional
differences inthe target folders become visible:
- webkitqml, webkitwidgets now appear in examples!
- a number of lipi_toolkit libraries appear in the plugins folder
(originate in qt5virtualkeyboard)
- QtWebPluginProcess and QtWebProcess appear in /usr/libexec (originate
from qt5webkit)
- qtwebengine locales appear in usr/translations/qtwebengine_locales/
instead of usr/translations/qtwebengine_locales/qtwebengine_locales/

However, the majority of target files exists equally in both variants
and I was unable to find major inconsistencies.

The same comparison on the host folders showed hardly any difference at
all. Unfortunately I didnt keep the output, so I cant provide evidence
right now.

Finally, on one occassion I think I observed some kind of race condition
in the per-package host assembly. A build would fail complaining about
some missing header. I would look for it, find it, restart the build
which then happily continued..

Ok, enough for now, regards,
Andreas



Detailed rsync line (grep removes directories from the list):
anaumann at wslxew902-$ rsync -avun --ignore-existing --delete
output/target/ ../buildroot-orig/output/target/ | grep -v "/$"
sending incremental file list
usr/bin/xmlpatterns
usr/bin/xmlpatternsvalidator
usr/lib/libEnginio.so -> libEnginio.so.1.6.3
usr/lib/libQt53DAnimation.so -> libQt53DAnimation.so.5.12.5
usr/lib/libQt53DCore.so -> libQt53DCore.so.5.12.5
usr/lib/libQt53DExtras.so -> libQt53DExtras.so.5.12.5
usr/lib/libQt53DInput.so -> libQt53DInput.so.5.12.5
usr/lib/libQt53DLogic.so -> libQt53DLogic.so.5.12.5
usr/lib/libQt53DQuick.so -> libQt53DQuick.so.5.12.5
usr/lib/libQt53DQuickAnimation.so -> libQt53DQuickAnimation.so.5.12.5
usr/lib/libQt53DQuickExtras.so -> libQt53DQuickExtras.so.5.12.5
usr/lib/libQt53DQuickInput.so -> libQt53DQuickInput.so.5.12.5
usr/lib/libQt53DQuickRender.so -> libQt53DQuickRender.so.5.12.5
usr/lib/libQt53DQuickScene2D.so -> libQt53DQuickScene2D.so.5.12.5
usr/lib/libQt53DRender.so -> libQt53DRender.so.5.12.5
usr/lib/libQt5Bluetooth.so -> libQt5Bluetooth.so.5.12.5
usr/lib/libQt5Charts.so -> libQt5Charts.so.5.12.5
usr/lib/libQt5ExtSerialPort.so -> libQt5ExtSerialPort.so.1.2.0
usr/lib/libQt5Location.so -> libQt5Location.so.5.12.5
usr/lib/libQt5Multimedia.so -> libQt5Multimedia.so.5.12.5
usr/lib/libQt5MultimediaGstTools.so -> libQt5MultimediaGstTools.so.5.12.5
usr/lib/libQt5MultimediaQuick.so -> libQt5MultimediaQuick.so.5.12.5
usr/lib/libQt5MultimediaWidgets.so -> libQt5MultimediaWidgets.so.5.12.5
usr/lib/libQt5Nfc.so -> libQt5Nfc.so.5.12.5
usr/lib/libQt5Nfc.so.5 -> libQt5Nfc.so.5.12.5
usr/lib/libQt5Nfc.so.5.12 -> libQt5Nfc.so.5.12.5
usr/lib/libQt5Nfc.so.5.12.5
usr/lib/libQt5Positioning.so -> libQt5Positioning.so.5.12.5
usr/lib/libQt5PositioningQuick.so -> libQt5PositioningQuick.so.5.12.5
usr/lib/libQt5Qml.so -> libQt5Qml.so.5.12.5
usr/lib/libQt5Quick.so -> libQt5Quick.so.5.12.5
usr/lib/libQt5QuickControls2.so -> libQt5QuickControls2.so.5.12.5
usr/lib/libQt5QuickParticles.so -> libQt5QuickParticles.so.5.12.5
usr/lib/libQt5QuickShapes.so -> libQt5QuickShapes.so.5.12.5
usr/lib/libQt5QuickTemplates2.so -> libQt5QuickTemplates2.so.5.12.5
usr/lib/libQt5QuickTest.so -> libQt5QuickTest.so.5.12.5
usr/lib/libQt5QuickWidgets.so -> libQt5QuickWidgets.so.5.12.5
usr/lib/libQt5Script.so -> libQt5Script.so.5.12.5
usr/lib/libQt5ScriptTools.so -> libQt5ScriptTools.so.5.12.5
usr/lib/libQt5Scxml.so -> libQt5Scxml.so.5.12.5
usr/lib/libQt5Sensors.so -> libQt5Sensors.so.5.12.5
usr/lib/libQt5SerialBus.so -> libQt5SerialBus.so.5.12.5
usr/lib/libQt5SerialPort.so -> libQt5SerialPort.so.5.12.5
usr/lib/libQt5Svg.so -> libQt5Svg.so.5.12.5
usr/lib/libQt5WebSockets.so -> libQt5WebSockets.so.5.12.5
usr/lib/libQt5WebView.so -> libQt5WebView.so.5.12.5
usr/lib/libQt5X11Extras.so -> libQt5X11Extras.so.5.12.5
usr/lib/libQt5XmlPatterns.so -> libQt5XmlPatterns.so.5.12.5
deleting usr/lib/qt/examples/multimedia/spectrum/libfftreal.prl
usr/lib/qt/examples/nfc/nfc.pro
usr/lib/qt/examples/nfc/annotatedurl/annotatedurl
usr/lib/qt/examples/nfc/annotatedurl/annotatedurl.cpp
usr/lib/qt/examples/nfc/annotatedurl/annotatedurl.h
usr/lib/qt/examples/nfc/annotatedurl/annotatedurl.pro
usr/lib/qt/examples/nfc/annotatedurl/main.cpp
usr/lib/qt/examples/nfc/annotatedurl/mainwindow.cpp
usr/lib/qt/examples/nfc/annotatedurl/mainwindow.h
usr/lib/qt/examples/nfc/annotatedurl/mainwindow.ui
usr/lib/qt/examples/nfc/corkboard/Mode.qml
usr/lib/qt/examples/nfc/corkboard/NfcFlag.png
usr/lib/qt/examples/nfc/corkboard/cork.jpg
usr/lib/qt/examples/nfc/corkboard/corkboard.pro
usr/lib/qt/examples/nfc/corkboard/corkboard.qrc
usr/lib/qt/examples/nfc/corkboard/corkboards.qml
usr/lib/qt/examples/nfc/corkboard/icon.png
usr/lib/qt/examples/nfc/corkboard/main.cpp
usr/lib/qt/examples/nfc/corkboard/note-yellow.png
usr/lib/qt/examples/nfc/corkboard/qml_corkboard
usr/lib/qt/examples/nfc/corkboard/tack.png
usr/lib/qt/examples/nfc/corkboard/android/AndroidManifest.xml
usr/lib/qt/examples/nfc/ndefeditor/main.cpp
usr/lib/qt/examples/nfc/ndefeditor/mainwindow.cpp
usr/lib/qt/examples/nfc/ndefeditor/mainwindow.h
usr/lib/qt/examples/nfc/ndefeditor/mainwindow.ui
usr/lib/qt/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp
usr/lib/qt/examples/nfc/ndefeditor/mimeimagerecordeditor.h
usr/lib/qt/examples/nfc/ndefeditor/mimeimagerecordeditor.ui
usr/lib/qt/examples/nfc/ndefeditor/ndefeditor
usr/lib/qt/examples/nfc/ndefeditor/ndefeditor.pro
usr/lib/qt/examples/nfc/ndefeditor/textrecordeditor.cpp
usr/lib/qt/examples/nfc/ndefeditor/textrecordeditor.h
usr/lib/qt/examples/nfc/ndefeditor/textrecordeditor.ui
usr/lib/qt/examples/nfc/ndefeditor/urirecordeditor.cpp
usr/lib/qt/examples/nfc/ndefeditor/urirecordeditor.h
usr/lib/qt/examples/nfc/ndefeditor/urirecordeditor.ui
usr/lib/qt/examples/nfc/poster/poster.pro
usr/lib/qt/examples/nfc/poster/poster.qml
usr/lib/qt/examples/nfc/poster/poster.qrc
usr/lib/qt/examples/nfc/poster/qml_poster
usr/lib/qt/examples/nfc/poster/qmlposter.cpp
deleting usr/lib/qt/examples/sensors/grue/libgruesensor.prl
deleting usr/lib/qt/examples/webkitqml/shared/libshared.prl
deleting
usr/lib/qt/examples/widgets/tools/plugandpaint/plugins/libpnp_basictools.prl
usr/qml/Qt/labs/location/liblocationlabsplugin.so
usr/qml/Qt/labs/location/plugins.qmltypes
usr/qml/Qt/labs/location/qmldir
usr/qml/QtNfc/libdeclarative_nfc.so
usr/qml/QtNfc/plugins.qmltypes
usr/qml/QtNfc/qmldir


Packages on top of imx6-sabresd_qt5_defconfig (with toolchain-external-arm-arm)
+BR2_PACKAGE_DIRECTFB=y
+BR2_PACKAGE_QT53D=y
+BR2_PACKAGE_QT5BASE_EXAMPLES=y
+BR2_PACKAGE_QT5BASE_MYSQL=y
+BR2_PACKAGE_QT5BASE_PSQL=y
+BR2_PACKAGE_QT5BASE_SQLITE_QT=y
+BR2_PACKAGE_QT5BASE_XCB=y
+BR2_PACKAGE_QT5BASE_HARFBUZZ=y
+BR2_PACKAGE_QT5BASE_TSLIB=y
+BR2_PACKAGE_QT5CANVAS3D=y
+BR2_PACKAGE_QT5CHARTS=y
+BR2_PACKAGE_QT5CONNECTIVITY=y
+BR2_PACKAGE_QT5ENGINIO=y
+BR2_PACKAGE_QT5IMAGEFORMATS=y
+BR2_PACKAGE_QT5LOCATION=y
+BR2_PACKAGE_QT5SCXML=y
+BR2_PACKAGE_QT5SENSORS=y
+BR2_PACKAGE_QT5SERIALBUS=y
+BR2_PACKAGE_QT5TOOLS_QDOC_TOOL=y
+BR2_PACKAGE_QT5TOOLS_PIXELTOOL=y
+BR2_PACKAGE_QT5TOOLS_QTDIAG=y
+BR2_PACKAGE_QT5TOOLS_QTPATHS=y
+BR2_PACKAGE_QT5TOOLS_QTPLUGININFO=y
+BR2_PACKAGE_QT5VIRTUALKEYBOARD=y
+BR2_PACKAGE_QT5VIRTUALKEYBOARD_HANDWRITING=y
+BR2_PACKAGE_QT5VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION=y
+BR2_PACKAGE_QT5WAYLAND=y
+BR2_PACKAGE_QT5WAYLAND_COMPOSITOR=y
+BR2_PACKAGE_QT5WEBKIT_EXAMPLES=y
+BR2_PACKAGE_QT5WEBENGINE=y
+BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS=y
+BR2_PACKAGE_QT5WEBENGINE_ALSA=y
+BR2_PACKAGE_QT5WEBVIEW=y
+BR2_PACKAGE_QT5X11EXTRAS=y
+BR2_PACKAGE_CUTELYST=y
+BR2_PACKAGE_GRANTLEE=y
+BR2_PACKAGE_KF5=y
+BR2_PACKAGE_KF5_KCOREADDONS=y
+BR2_PACKAGE_QEXTSERIALPORT=y
+BR2_PACKAGE_QJSON=y
+BR2_PACKAGE_QUAZIP=y
+BR2_PACKAGE_QWT=y
+BR2_PACKAGE_QWT_SVG=y
+BR2_PACKAGE_QWT_MATHML=y
+BR2_PACKAGE_QWT_OPENGL=y
+BR2_PACKAGE_XORG7=y
+BR2_PACKAGE_XLIB_LIBXDAMAGE=y
+BR2_PACKAGE_QT_WEBKIT_KIOSK=y
+BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS=y
+BR2_PACKAGE_PYTHON=y
+BR2_PACKAGE_PYTHON_PYQT5=y
+BR2_PACKAGE_BLUEZ5_UTILS=y

v4->v6
- Remove the now merged qt.conf.in and la/prl-fixup patches
- rebase to current master
- Split the more complicate to convert packages into single commits
- Added the new webview package to the straigtforward conversion patch
- find and fix hidden dependencies of some packages
- and many more, I lost track to be honest

v4->v5
- Split out the qt.conf.in and la/prl-fixup patch (now merged) from
qmake infra patches (because of limited time for full rework)
- Keep custom settings path /usr instead of resetting to default
/usr/etc/xdg



Andreas Naumann (28):
  package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
  core/pkg-infra: Add generic qmake package infrastructure
  qt5: Convert straightforward packages to qmake infra
  package/qt5base: Convert to qmake infra
  package/qwt: Partially convert to qmake infra
  package/qwt: Add missing qt5svg dependency
  package/qt5tools: Partially convert to qmake infra
  package/qt5virtualkeyboard: Convert to qmake infra
  package/quazip: Convert to qmake infra
  package/qt5wayland: Convert to qmake infra
  package/qt5webchannel: Convert to qmake infra
  package/qt5webkit: Convert to qmake infra
  package/qt5webkit-examples: Convert  to qmake infra
  package/qt5webengine: Convert to qmake infra
  package/qt-webkit-kiosk: Convert to qmake infra
  package/qt5cinex: Convert to qmake infra
  core/pkg-infra: Fix package file statistics for parallel build
  package/cmake: Fix for using -O in top-level make
  core/pkg-infra: Add per-package support in qmake infra
  qt5: Fix pkgconfig search path for per-package infrastructure
  package/python-sip: Fix qmake usage for per-package build
  package/python-pyqt5: Fix qmake usage for per-package build
  package/qt5webengine: add libXdamage as XCB dependency
  package/qt5webengine: Add optional dependency on qt5quickcontrols2
  package/qt5webengine: Add optional dependency on qt5location
  package/qt5virtualkeyboard: Add optional dependency on
    qt5quickcontrols2
  package/qt53d: Add optional dependency on qt5multimedia
  package/qt5charts: Add optional dependency on qt5multimedia

 Makefile                                      |   5 +-
 docs/manual/adding-packages-qmake.txt         |  85 ++++++++++++++
 docs/manual/adding-packages.txt               |   2 +
 package/Makefile.in                           |   1 +
 package/cmake/cmake.mk                        |   1 +
 package/pkg-generic.mk                        |  14 ++-
 package/pkg-qmake.mk                          | 106 ++++++++++++++++++
 package/python-pyqt5/python-pyqt5.mk          |   1 +
 package/python-sip/python-sip.mk              |   3 +-
 package/qextserialport/qextserialport.mk      |  22 +---
 package/qt-webkit-kiosk/qt-webkit-kiosk.mk    |  11 +-
 package/qt5/qt5.mk                            |  19 +++-
 package/qt5/qt53d/qt53d.mk                    |  42 +------
 package/qt5/qt5base/qt5base.mk                |  97 ++--------------
 package/qt5/qt5canvas3d/qt5canvas3d.mk        |  25 +----
 package/qt5/qt5charts/qt5charts.mk            |  40 +------
 .../qt5/qt5connectivity/qt5connectivity.mk    |  59 +---------
 package/qt5/qt5declarative/qt5declarative.mk  |  47 +-------
 package/qt5/qt5enginio/qt5enginio.mk          |  38 +------
 .../qt5graphicaleffects.mk                    |  18 +--
 .../qt5/qt5imageformats/qt5imageformats.mk    |  20 +---
 package/qt5/qt5location/qt5location.mk        |  49 +-------
 package/qt5/qt5multimedia/qt5multimedia.mk    |  46 +-------
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk  |  41 +------
 .../qt5quickcontrols2/qt5quickcontrols2.mk    |  40 +------
 package/qt5/qt5script/qt5script.mk            |  31 +----
 package/qt5/qt5scxml/qt5scxml.mk              |  36 +-----
 package/qt5/qt5sensors/qt5sensors.mk          |  39 +------
 package/qt5/qt5serialbus/qt5serialbus.mk      |  37 +-----
 package/qt5/qt5serialport/qt5serialport.mk    |  31 +----
 package/qt5/qt5svg/qt5svg.mk                  |  39 +------
 package/qt5/qt5tools/qt5tools.mk              |   6 +-
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  |  67 ++---------
 package/qt5/qt5wayland/qt5wayland.mk          |  56 +--------
 package/qt5/qt5webchannel/qt5webchannel.mk    |  39 +------
 package/qt5/qt5webengine/Config.in            |   1 +
 package/qt5/qt5webengine/qt5webengine.mk      |  58 +++-------
 .../qt5webkit-examples/qt5webkit-examples.mk  |  23 +---
 package/qt5/qt5webkit/qt5webkit.mk            |  29 ++---
 package/qt5/qt5websockets/qt5websockets.mk    |  39 +------
 package/qt5/qt5webview/qt5webview.mk          |  39 +------
 package/qt5/qt5x11extras/qt5x11extras.mk      |  20 +---
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  |  31 +----
 package/qt5cinex/qt5cinex.mk                  |   9 +-
 package/quazip/quazip.mk                      |  18 +--
 package/qwt/qwt.mk                            |  10 +-
 46 files changed, 313 insertions(+), 1177 deletions(-)
 create mode 100644 docs/manual/adding-packages-qmake.txt
 create mode 100644 package/pkg-qmake.mk

-- 
2.25.0

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

* [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-09 21:21   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 02/28] core/pkg-infra: Add generic qmake package infrastructure Andreas Naumann
                   ` (27 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5base/qt5base.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index 774c771bc9..c662921b8f 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_STATIC_LIBS),y)
+QT5BASE_CONFIGURE_OPTS += -static
+else
+QT5BASE_CONFIGURE_OPTS += -shared
+endif
 
 # starting from version 5.9.0, -optimize-debug is enabled by default
 # for debug builds and it overrides -O* with -Og which is not what we
-- 
2.25.0

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

* [Buildroot] [PATCH v6 02/28] core/pkg-infra: Add generic qmake package infrastructure
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-09 22:10   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 03/28] qt5: Convert straightforward packages to qmake infra Andreas Naumann
                   ` (26 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

This provides generic functions for Qt5 qmake based packages. It will make it
possible to remove lots of redefinition of QT5_xxx_{CONFIGURE|BUILD|
INSTALL_STATGING}_CMDS. Additionally it provides a generic target install
method which will make most of the package specific commands obsolete.

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.
The cleanup of many files we dont want in target is deferred to the
target-finalize step. In addition to what's being removed already, we also have
to cleanup some Qt5 specific files (prl) and the documentation directory.

This approach was chosen over copying all files recorded in the pkg-files-list
after some discussion which Thomas Petazzoni summed up:
"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."

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.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 Makefile                              |   5 +-
 docs/manual/adding-packages-qmake.txt |  85 +++++++++++++++++++++
 docs/manual/adding-packages.txt       |   2 +
 package/Makefile.in                   |   1 +
 package/pkg-qmake.mk                  | 105 ++++++++++++++++++++++++++
 5 files changed, 196 insertions(+), 2 deletions(-)
 create mode 100644 docs/manual/adding-packages-qmake.txt
 create mode 100644 package/pkg-qmake.mk

diff --git a/Makefile b/Makefile
index a52f1c75fd..4cd3d2ba79 100644
--- a/Makefile
+++ b/Makefile
@@ -737,10 +737,11 @@ target-finalize: $(PACKAGES) $(TARGET_DIR) host-finalize
 	$(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
 	rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
 		$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
-		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
+		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake \
+		$(TARGET_DIR)/usr/doc
 	find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
 	find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \
-		\( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
+		\( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | xargs -0 rm -f
 ifneq ($(BR2_PACKAGE_GDB),y)
 	rm -rf $(TARGET_DIR)/usr/share/gdb
 endif
diff --git a/docs/manual/adding-packages-qmake.txt b/docs/manual/adding-packages-qmake.txt
new file mode 100644
index 0000000000..9b5193d67f
--- /dev/null
+++ b/docs/manual/adding-packages-qmake.txt
@@ -0,0 +1,85 @@
+// -*- mode:doc; -*-
+// vim: set syntax=asciidoc:
+
+=== Infrastructure for QMake-based packages
+
+[[qmake-package-tutorial]]
+
+==== +qmake-package+ tutorial
+
+First, let's see how to write a +.mk+ file for a QMake-based package, with
+an example :
+
+------------------------
+01: ################################################################################
+02: #
+03: # libfoo
+04: #
+05: ################################################################################
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_CONF_OPTS = QT_CONFIG+=bar QT_CONFIG-=baz
+11: LIBFOO_DEPENDENCIES = bar
+12:
+13: $(eval $(qmake-package))
+------------------------
+
+On line 7, we declare the version of the package.
+
+On line 8 and 9, we declare the name of the tarball (xz-ed tarball
+recommended) and the location of the tarball on the Web. Buildroot
+will automatically download the tarball from this location.
+
+On line 10, we tell Buildroot what options to enable for libfoo.
+
+On line 11, we tell Buildroot the depednencies of libfoo.
+
+Finally, on line line 13, we invoke the +qmake-package+
+macro that generates all the Makefile rules that actually allows the
+package to be built.
+
+[[qmake-package-reference]]
+
+==== +qmake-package+ reference
+
+The main macro of the QMake package infrastructure is +qmake-package+.
+It is similar to the +generic-package+ macro.
+
+Just like the generic infrastructure, the QMake infrastructure works
+by defining a number of variables before calling the +qmake-package+
+macro.
+
+First, all the package metadata information variables that exist in
+the generic infrastructure also exist in the QMake infrastructure:
++LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+,
++LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+,
++LIBFOO_INSTALL_TARGET+.
+
+An additional variable, specific to the QMake infrastructure, can
+also be defined.
+
+* +LIBFOO_QMAKE_OPTS+, to specify additional options to pass to the
+  +qmake+ script at every step of the package build process: configure,
+  build and installation. By default, empty.
+
+* +LIBFOO_CONF_ENV+, to specify additional environment variables to 
+  pass to the +qmake+ script for the configuration step. By default, empty.
+
+* +LIBFOO_CONF_OPTS+, to specify additional options to pass to the
+  +qmake+ script for the configuration step. By default, empty.
+
+* +LIBFOO_MAKE_ENV+, to specify additional environment variables to the
+  +make+ command during the build and install steps. By default, empty.
+
+* +LIBFOO_MAKE_OPTS+, to specify additional targets to pass to the
+  +make+ command during the build step. By default, empty.
+
+* +LIBFOO_INSTALL_STAGING_OPTS+, to specify additional targets to pass
+  to the +make+ command during the staging installation step. By default,
+  +install+.
+
+* +LIBFOO_INSTALL_TARGET_OPTS+, to specify additional targets to pass
+  to the +make+ command during the target installation step. By default,
+  +install+.
diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt
index 4a4a17e879..814355cd76 100644
--- a/docs/manual/adding-packages.txt
+++ b/docs/manual/adding-packages.txt
@@ -41,6 +41,8 @@ include::adding-packages-cargo.txt[]
 
 include::adding-packages-golang.txt[]
 
+include::adding-packages-qmake.txt[]
+
 include::adding-packages-kernel-module.txt[]
 
 include::adding-packages-asciidoc.txt[]
diff --git a/package/Makefile.in b/package/Makefile.in
index 285e2837ef..51f5cbce4f 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -426,3 +426,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
diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
new file mode 100644
index 0000000000..53ac3e4a1c
--- /dev/null
+++ b/package/pkg-qmake.mk
@@ -0,0 +1,105 @@
+################################################################################
+# 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
+# Qmake as their build system.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# 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
+# 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
+################################################################################
+
+define inner-qmake-package
+
+$(2)_CONF_ENV			?=
+$(2)_CONF_OPTS			?=
+$(2)_MAKE_ENV			?=
+$(2)_MAKE_OPTS			?=
+$(2)_INSTALL_STAGING_OPTS	?= install
+$(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)
+
+#
+# Configure step. Only define it if not already defined by the package
+# .mk file.
+#
+ifndef $(2)_CONFIGURE_CMDS
+define $(2)_CONFIGURE_CMDS
+	cd $$($(2)_BUILDDIR) && \
+	$$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(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 $$($(2)_BUILDDIR) $$($(2)_MAKE_OPTS)
+endef
+endif
+
+#
+# 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 $$($(2)_BUILDDIR) $$($(2)_INSTALL_STAGING_OPTS)
+endef
+endif
+
+#
+# Target installation step. Only define it if not already defined by
+# the package .mk file.
+#
+# Unfortunately we can't use INSTALL_ROOT to directly install to TARGET_DIR
+# because in a crosscompile setup, the qmake generated install destinations
+# are prefixed with the hardcoded sysroot (=STAGING_DIR) and hostprefix
+# (=HOST_DIR).
+# Instead we set INSTALL_ROOT, which comes before the install path, to a
+# temporary folder inside the build directory and effectively install to
+# $(@D)/tmp-target-install/$(STAGING_DIR) and $(@D)/tmp-target-install/$(HOST_DIR).
+# We subsequently rsync only the files from the temporary staging dir and that
+# way exclude files for the build host from target.
+#
+ifndef $(2)_INSTALL_TARGET_CMDS
+define $(2)_INSTALL_TARGET_CMDS
+	$$(TARGET_MAKE_ENV) $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_BUILDDIR) INSTALL_ROOT=$$($(2)_BUILDDIR)tmp-target-install $$($(2)_INSTALL_TARGET_OPTS)
+	rsync -arv $$($(2)_BUILDDIR)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)
-- 
2.25.0

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

* [Buildroot] [PATCH v6 03/28] qt5: Convert straightforward packages to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 02/28] core/pkg-infra: Add generic qmake package infrastructure Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-09 22:12   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 04/28] package/qt5base: Convert " Andreas Naumann
                   ` (25 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

This converts all qmake packages to the new infra for which no custom
environments, option or additional hooks are needed.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qextserialport/qextserialport.mk      | 22 +------
 package/qt5/qt53d/qt53d.mk                    | 38 +-----------
 package/qt5/qt5canvas3d/qt5canvas3d.mk        | 25 +-------
 package/qt5/qt5charts/qt5charts.mk            | 40 +------------
 .../qt5/qt5connectivity/qt5connectivity.mk    | 59 +------------------
 package/qt5/qt5declarative/qt5declarative.mk  | 47 +--------------
 package/qt5/qt5enginio/qt5enginio.mk          | 38 +-----------
 .../qt5graphicaleffects.mk                    | 18 +-----
 .../qt5/qt5imageformats/qt5imageformats.mk    | 20 +------
 package/qt5/qt5location/qt5location.mk        | 49 +--------------
 package/qt5/qt5multimedia/qt5multimedia.mk    | 46 +--------------
 .../qt5/qt5quickcontrols/qt5quickcontrols.mk  | 41 +------------
 .../qt5quickcontrols2/qt5quickcontrols2.mk    | 40 +------------
 package/qt5/qt5script/qt5script.mk            | 31 +---------
 package/qt5/qt5scxml/qt5scxml.mk              | 36 +----------
 package/qt5/qt5sensors/qt5sensors.mk          | 39 +-----------
 package/qt5/qt5serialbus/qt5serialbus.mk      | 37 +-----------
 package/qt5/qt5serialport/qt5serialport.mk    | 31 +---------
 package/qt5/qt5svg/qt5svg.mk                  | 39 +-----------
 package/qt5/qt5websockets/qt5websockets.mk    | 39 +-----------
 package/qt5/qt5webview/qt5webview.mk          | 39 +-----------
 package/qt5/qt5x11extras/qt5x11extras.mk      | 20 +------
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk  | 31 +---------
 23 files changed, 23 insertions(+), 802 deletions(-)

diff --git a/package/qextserialport/qextserialport.mk b/package/qextserialport/qextserialport.mk
index ecaff21efc..6f14d21fe7 100644
--- a/package/qextserialport/qextserialport.mk
+++ b/package/qextserialport/qextserialport.mk
@@ -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))
diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk
index 7674b44558..eeb1b3644c 100644
--- a/package/qt5/qt53d/qt53d.mk
+++ b/package/qt5/qt53d/qt53d.mk
@@ -17,40 +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
-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))
diff --git a/package/qt5/qt5canvas3d/qt5canvas3d.mk b/package/qt5/qt5canvas3d/qt5canvas3d.mk
index b550ff00f2..711d0175d4 100644
--- a/package/qt5/qt5canvas3d/qt5canvas3d.mk
+++ b/package/qt5/qt5canvas3d/qt5canvas3d.mk
@@ -18,27 +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
-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))
diff --git a/package/qt5/qt5charts/qt5charts.mk b/package/qt5/qt5charts/qt5charts.mk
index e359747503..40f5efc2da 100644
--- a/package/qt5/qt5charts/qt5charts.mk
+++ b/package/qt5/qt5charts/qt5charts.mk
@@ -24,42 +24,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5CHARTS_DEPENDENCIES += qt5declarative
 endif
 
-define QT5CHARTS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5CHARTS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5CHARTS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-define QT5CHARTS_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Charts*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-
-# this is only built with quick support enabled
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5CHARTS_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtCharts $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5CHARTS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/charts* $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5CHARTS_INSTALL_TARGET_CMDS
-	$(QT5CHARTS_INSTALL_TARGET_LIBS)
-	$(QT5CHARTS_INSTALL_TARGET_QMLS)
-	$(QT5CHARTS_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
diff --git a/package/qt5/qt5connectivity/qt5connectivity.mk b/package/qt5/qt5connectivity/qt5connectivity.mk
index 0ade9876de..93a5099a99 100644
--- a/package/qt5/qt5connectivity/qt5connectivity.mk
+++ b/package/qt5/qt5connectivity/qt5connectivity.mk
@@ -25,61 +25,4 @@ QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5DECLARATIVE),qt5declarativ
 QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_BLUEZ5_UTILS),bluez5_utils)
 QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_NEARD),neard)
 
-define QT5CONNECTIVITY_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5CONNECTIVITY_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5CONNECTIVITY_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-ifneq ($(BR2_PACKAGE_BLUEZ5_UTILS),)
-define QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtBluetooth $(TARGET_DIR)/usr/qml/
-endef
-endif
-ifeq ($(BR2_PACKAGE_NEARD),y)
-define QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtNfc $(TARGET_DIR)/usr/qml/
-endef
-endif
-endif
-
-ifneq ($(BR2_PACKAGE_BLUEZ5_UTILS),)
-define QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Bluetooth.so.* $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/bin/sdpscanner $(TARGET_DIR)/usr/bin
-endef
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/bluetooth $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-endif
-
-ifeq ($(BR2_PACKAGE_NEARD),y)
-define QT5CONNECTIVITY_INSTALL_TARGET_NFC
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Nfc.so.* $(TARGET_DIR)/usr/lib
-endef
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5CONNECTIVITY_INSTALL_TARGET_NFC_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/nfc $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-endif
-
-define QT5CONNECTIVITY_INSTALL_TARGET_CMDS
-	$(QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH)
-	$(QT5CONNECTIVITY_INSTALL_TARGET_NFC)
-	$(QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS)
-	$(QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS)
-	$(QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_EXAMPLES)
-	$(QT5CONNECTIVITY_INSTALL_TARGET_NFC_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
diff --git a/package/qt5/qt5declarative/qt5declarative.mk b/package/qt5/qt5declarative/qt5declarative.mk
index 6210611961..42c60ed3eb 100644
--- a/package/qt5/qt5declarative/qt5declarative.mk
+++ b/package/qt5/qt5declarative/qt5declarative.mk
@@ -18,49 +18,4 @@ QT5DECLARATIVE_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0, GFDL-1.
 QT5DECLARATIVE_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5DECLARATIVE_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5DECLARATIVE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5DECLARATIVE_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5DECLARATIVE_INSTALL_TARGET_QUICK_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Quick*.so.* $(TARGET_DIR)/usr/lib
-endef
-define QT5DECLARATIVE_INSTALL_TARGET_QUICK_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/quick/ $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-define QT5DECLARATIVE_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Qml*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/qml* $(TARGET_DIR)/usr/lib/qt/plugins
-	$(QT5DECLARATIVE_INSTALL_TARGET_QUICK_LIBS)
-endef
-
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5DECLARATIVE_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/qml* $(TARGET_DIR)/usr/lib/qt/examples/
-	$(QT5DECLARATIVE_INSTALL_TARGET_QUICK_EXAMPLES)
-endef
-endif
-
-define QT5DECLARATIVE_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/bin/qml* $(TARGET_DIR)/usr/bin
-	cp -dpfr $(STAGING_DIR)/usr/qml $(TARGET_DIR)/usr
-	$(QT5DECLARATIVE_INSTALL_TARGET_EXAMPLES)
-	$(QT5DECLARATIVE_INSTALL_TARGET_LIBS)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
diff --git a/package/qt5/qt5enginio/qt5enginio.mk b/package/qt5/qt5enginio/qt5enginio.mk
index ebd99e4cb7..714f8c6b73 100644
--- a/package/qt5/qt5enginio/qt5enginio.mk
+++ b/package/qt5/qt5enginio/qt5enginio.mk
@@ -22,40 +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
-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))
diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
index c5011a94f0..92a3c1b8fb 100644
--- a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
+++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk
@@ -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))
diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk
index fa13ebedaf..662215521c 100644
--- a/package/qt5/qt5imageformats/qt5imageformats.mk
+++ b/package/qt5/qt5imageformats/qt5imageformats.mk
@@ -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))
diff --git a/package/qt5/qt5location/qt5location.mk b/package/qt5/qt5location/qt5location.mk
index a69e8f41a6..8face619d8 100644
--- a/package/qt5/qt5location/qt5location.mk
+++ b/package/qt5/qt5location/qt5location.mk
@@ -22,51 +22,4 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5LOCATION_DEPENDENCIES += qt5declarative
 endif
 
-define QT5LOCATION_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5LOCATION_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5LOCATION_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5LOCATION_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtPositioning $(TARGET_DIR)/usr/qml/
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtLocation $(TARGET_DIR)/usr/qml/
-endef
-define QT5LOCATION_INSTALL_TARGET_LOCATION
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Location.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/geoservices $(TARGET_DIR)/usr/lib/qt/plugins/
-endef
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-define QT5LOCATION_INSTALL_TARGET_POSITION_QUICK
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5PositioningQuick.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5LOCATION_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/location $(TARGET_DIR)/usr/lib/qt/examples/
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/positioning $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-endif
-
-define QT5LOCATION_INSTALL_TARGET_POSITION
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Positioning.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/position $(TARGET_DIR)/usr/lib/qt/plugins/
-endef
-
-define QT5LOCATION_INSTALL_TARGET_CMDS
-	$(QT5LOCATION_INSTALL_TARGET_POSITION)
-	$(QT5LOCATION_INSTALL_TARGET_POSITION_QUICK)
-	$(QT5LOCATION_INSTALL_TARGET_LOCATION)
-	$(QT5LOCATION_INSTALL_TARGET_QMLS)
-	$(QT5LOCATION_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
diff --git a/package/qt5/qt5multimedia/qt5multimedia.mk b/package/qt5/qt5multimedia/qt5multimedia.mk
index e598140a9a..a060490c62 100644
--- a/package/qt5/qt5multimedia/qt5multimedia.mk
+++ b/package/qt5/qt5multimedia/qt5multimedia.mk
@@ -34,53 +34,9 @@ ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
 QT5MULTIMEDIA_DEPENDENCIES += alsa-lib
 endif
 
-define QT5MULTIMEDIA_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5MULTIMEDIA_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5MULTIMEDIA_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_STATIC_LIBS),)
-# since Qt5.10.1 libqgsttools was renamed to libQtMultimediaGstTools
-# and is installed by the default target install step below
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)x$(BR2_PACKAGE_GST1_PLUGINS_BASE),xy)
-define QT5MULTIMEDIA_INSTALL_TARGET_QGSTTOOLS_LIB
-	cp -dpf $(STAGING_DIR)/usr/lib/libqgsttools*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5MULTIMEDIA_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Multimedia*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins
-	$(QT5MULTIMEDIA_INSTALL_TARGET_QGSTTOOLS_LIB)
-endef
-endif # !BR2_STATIC_LIBS
-
-# this is only built with quick/opengl support enabled
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK)$(BR2_PACKAGE_QT5_GL_AVAILABLE),yy)
-define QT5MULTIMEDIA_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtMultimedia $(TARGET_DIR)/usr/qml/
-endef
-endif
-
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5MULTIMEDIA_LICENSE += , LGPL-2.1+ (examples/multimedia/spectrum/3rdparty/fftreal)
 QT5MULTIMEDIA_LICENSE_FILES += examples/multimedia/spectrum/3rdparty/fftreal/license.txt
-define QT5MULTIMEDIA_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/multimedia* $(TARGET_DIR)/usr/lib/qt/examples/
-endef
 endif
 
-define QT5MULTIMEDIA_INSTALL_TARGET_CMDS
-	$(QT5MULTIMEDIA_INSTALL_TARGET_LIBS)
-	$(QT5MULTIMEDIA_INSTALL_TARGET_QMLS)
-	$(QT5MULTIMEDIA_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
index 3e0c5effb3..d6a0d2218c 100644
--- a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
+++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk
@@ -18,43 +18,4 @@ else
 QT5QUICKCONTROLS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
 endif
 
-define QT5QUICKCONTROLS_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5QUICKCONTROLS_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5QUICKCONTROLS_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5QUICKCONTROLS_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/quickcontrols $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK)$(BR2_PACKAGE_QT5BASE_WIDGETS),yy)
-define QT5QUICKCONTROLS_INSTALL_TARGET_PRIVATEWIDGETS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/PrivateWidgets $(TARGET_DIR)/usr/qml/QtQuick
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-define QT5QUICKCONTROLS_INSTALL_TARGET_LAYOUTS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Layouts $(TARGET_DIR)/usr/qml/QtQuick
-endef
-endif
-
-define QT5QUICKCONTROLS_INSTALL_TARGET_CMDS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Controls $(TARGET_DIR)/usr/qml/QtQuick
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Dialogs $(TARGET_DIR)/usr/qml/QtQuick
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Extras $(TARGET_DIR)/usr/qml/QtQuick
-	$(QT5QUICKCONTROLS_INSTALL_TARGET_PRIVATEWIDGETS)
-	$(QT5QUICKCONTROLS_INSTALL_TARGET_LAYOUTS)
-	$(QT5QUICKCONTROLS_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
diff --git a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
index c2004c2ee7..51d8b60741 100644
--- a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
+++ b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk
@@ -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))
diff --git a/package/qt5/qt5script/qt5script.mk b/package/qt5/qt5script/qt5script.mk
index a3b8cb7e34..e2a1bb2812 100644
--- a/package/qt5/qt5script/qt5script.mk
+++ b/package/qt5/qt5script/qt5script.mk
@@ -27,33 +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
-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))
diff --git a/package/qt5/qt5scxml/qt5scxml.mk b/package/qt5/qt5scxml/qt5scxml.mk
index c0776314d5..b90ab01030 100644
--- a/package/qt5/qt5scxml/qt5scxml.mk
+++ b/package/qt5/qt5scxml/qt5scxml.mk
@@ -16,38 +16,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 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
-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))
diff --git a/package/qt5/qt5sensors/qt5sensors.mk b/package/qt5/qt5sensors/qt5sensors.mk
index 10498a4970..7a3c5b7ef5 100644
--- a/package/qt5/qt5sensors/qt5sensors.mk
+++ b/package/qt5/qt5sensors/qt5sensors.mk
@@ -22,41 +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
-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))
diff --git a/package/qt5/qt5serialbus/qt5serialbus.mk b/package/qt5/qt5serialbus/qt5serialbus.mk
index be8bb8b23c..0ee351afe2 100644
--- a/package/qt5/qt5serialbus/qt5serialbus.mk
+++ b/package/qt5/qt5serialbus/qt5serialbus.mk
@@ -13,39 +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
-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))
diff --git a/package/qt5/qt5serialport/qt5serialport.mk b/package/qt5/qt5serialport/qt5serialport.mk
index 5c2abd82da..f08fac6002 100644
--- a/package/qt5/qt5serialport/qt5serialport.mk
+++ b/package/qt5/qt5serialport/qt5serialport.mk
@@ -18,33 +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
-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))
diff --git a/package/qt5/qt5svg/qt5svg.mk b/package/qt5/qt5svg/qt5svg.mk
index cb91844efd..2d8dade407 100644
--- a/package/qt5/qt5svg/qt5svg.mk
+++ b/package/qt5/qt5svg/qt5svg.mk
@@ -18,41 +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
-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))
diff --git a/package/qt5/qt5websockets/qt5websockets.mk b/package/qt5/qt5websockets/qt5websockets.mk
index 6e734a3bf3..0647ade615 100644
--- a/package/qt5/qt5websockets/qt5websockets.mk
+++ b/package/qt5/qt5websockets/qt5websockets.mk
@@ -25,41 +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
-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))
diff --git a/package/qt5/qt5webview/qt5webview.mk b/package/qt5/qt5webview/qt5webview.mk
index 0a80dba612..db4813563a 100644
--- a/package/qt5/qt5webview/qt5webview.mk
+++ b/package/qt5/qt5webview/qt5webview.mk
@@ -16,41 +16,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5WEBVIEW_LICENSE += , BSD-3-Clause (examples)
 endif
 
-define QT5WEBVIEW_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake)
-endef
-
-define QT5WEBVIEW_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBVIEW_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5WEBVIEW_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebView $(TARGET_DIR)/usr/qml/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBVIEW_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webview $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBVIEW_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebView.so.* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/webview $(TARGET_DIR)/usr/lib/qt/plugins
-endef
-endif
-
-define QT5WEBVIEW_INSTALL_TARGET_CMDS
-	$(QT5WEBVIEW_INSTALL_TARGET_LIBS)
-	$(QT5WEBVIEW_INSTALL_TARGET_QMLS)
-	$(QT5WEBVIEW_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
diff --git a/package/qt5/qt5x11extras/qt5x11extras.mk b/package/qt5/qt5x11extras/qt5x11extras.mk
index 6acc9462c1..8590f543c6 100644
--- a/package/qt5/qt5x11extras/qt5x11extras.mk
+++ b/package/qt5/qt5x11extras/qt5x11extras.mk
@@ -18,22 +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
-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))
diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
index 6ed247fd59..0a12bf6bdc 100644
--- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
+++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
@@ -21,33 +21,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 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
-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))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 04/28] package/qt5base: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (2 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 03/28] qt5: Convert straightforward packages to qmake infra Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-09 22:29   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 05/28] package/qwt: Partially convert " Andreas Naumann
                   ` (24 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Convert build, staging and target install to the qmake infra commands.
This removes a lot of conditional code because we solely rely on all install
rules being properly generated according to the configured options.

Of course we keep the configure command/logic as is, because qmake does not
yet exist.

Handling of the custom qt.conf is now done in the post staging hook.

Todo: Check if font install for 5.6 is still working.
Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5base/qt5base.mk | 81 +---------------------------------
 1 file changed, 2 insertions(+), 79 deletions(-)

diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index c662921b8f..03f984ef8c 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -286,33 +286,6 @@ else
 QT5BASE_CONFIGURE_OPTS += -no-journald
 endif
 
-# Build the list of libraries to be installed on the target
-QT5BASE_INSTALL_LIBS_y                                 += Qt5Core
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XCB)        += Qt5XcbQpa
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK)    += Qt5Network
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_CONCURRENT) += Qt5Concurrent
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_SQL)        += Qt5Sql
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_TEST)       += Qt5Test
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XML)        += Qt5Xml
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_OPENGL_LIB) += Qt5OpenGL
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglFSDeviceIntegration
-ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglFsKmsSupport
-endif
-ifeq ($(BR2_PACKAGE_GCNANO_BINARIES),y)
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglFsKmsSupport
-endif
-else
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS)      += Qt5EglDeviceIntegration
-endif
-
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_GUI)          += Qt5Gui
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_WIDGETS)      += Qt5Widgets
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport
-
-QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
-
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y)
 # use vivante backend
@@ -379,10 +352,6 @@ define QT5BASE_CONFIGURE_CMDS
 	)
 endef
 
-define QT5BASE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
 # The file "qt.conf" can be used to override the hard-coded paths that are
 # compiled into the Qt library. We need it to make "qmake" relocatable.
 define QT5BASE_INSTALL_QT_CONF
@@ -390,52 +359,6 @@ define QT5BASE_INSTALL_QT_CONF
 		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
 endef
 
-define QT5BASE_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-	$(QT5BASE_INSTALL_QT_CONF)
-endef
-
-define QT5BASE_INSTALL_TARGET_LIBS
-	for lib in $(QT5BASE_INSTALL_LIBS_y); do \
-		cp -dpf $(STAGING_DIR)/usr/lib/lib$${lib}.so.* $(TARGET_DIR)/usr/lib || exit 1 ; \
-	done
-endef
-
-define QT5BASE_INSTALL_TARGET_PLUGINS
-	if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \
-		mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \
-		cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \
-	fi
-endef
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-define QT5BASE_INSTALL_TARGET_FONTS
-	if [ -d $(STAGING_DIR)/usr/lib/fonts/ ] ; then \
-		mkdir -p $(TARGET_DIR)/usr/lib/fonts ; \
-		cp -dpfr $(STAGING_DIR)/usr/lib/fonts/* $(TARGET_DIR)/usr/lib/fonts ; \
-	fi
-endef
-endif
-
-define QT5BASE_INSTALL_TARGET_EXAMPLES
-	if [ -d $(STAGING_DIR)/usr/lib/qt/examples/ ] ; then \
-		mkdir -p $(TARGET_DIR)/usr/lib/qt/examples ; \
-		cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/* $(TARGET_DIR)/usr/lib/qt/examples ; \
-	fi
-endef
-
-ifeq ($(BR2_STATIC_LIBS),y)
-define QT5BASE_INSTALL_TARGET_CMDS
-	$(QT5BASE_INSTALL_TARGET_FONTS)
-	$(QT5BASE_INSTALL_TARGET_EXAMPLES)
-endef
-else
-define QT5BASE_INSTALL_TARGET_CMDS
-	$(QT5BASE_INSTALL_TARGET_LIBS)
-	$(QT5BASE_INSTALL_TARGET_PLUGINS)
-	$(QT5BASE_INSTALL_TARGET_FONTS)
-	$(QT5BASE_INSTALL_TARGET_EXAMPLES)
-endef
-endif
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_INSTALL_QT_CONF
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 05/28] package/qwt: Partially convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (3 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 04/28] package/qt5base: Convert " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 21:19   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency Andreas Naumann
                   ` (23 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Use the qmake infra CONFIGURE and BUILD generic but keep the manipulation
of qwtconfig.pri as PRE_CONFIGURE_HOOK as well as the custom install steps.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qwt/qwt.mk | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
index e0ffec765f..1fec17b19a 100644
--- a/package/qwt/qwt.mk
+++ b/package/qwt/qwt.mk
@@ -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))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (4 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 05/28] package/qwt: Partially convert " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-02-17 21:56   ` Thomas Petazzoni
  2020-02-19 19:16   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 07/28] package/qt5tools: Partially convert to qmake infra Andreas Naumann
                   ` (22 subsequent siblings)
  28 siblings, 2 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qwt/qwt.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
index 1fec17b19a..50df7e2642 100644
--- a/package/qwt/qwt.mk
+++ b/package/qwt/qwt.mk
@@ -19,6 +19,7 @@ QWT_CONFIG += -e 's%/features%/mkspecs/features%'
 
 ifeq ($(BR2_PACKAGE_QWT_SVG),y)
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/'
+QWT_DEPENDENCIES += qt5svg
 else
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/'
 endif
-- 
2.25.0

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

* [Buildroot] [PATCH v6 07/28] package/qt5tools: Partially convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (5 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 21:22   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 08/28] package/qt5virtualkeyboard: Convert " Andreas Naumann
                   ` (21 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Use generic configure command but for now keep custom build and
install logic.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5tools/qt5tools.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/qt5/qt5tools/qt5tools.mk b/package/qt5/qt5tools/qt5tools.mk
index 0d00022998..8e06706dd6 100644
--- a/package/qt5/qt5tools/qt5tools.mk
+++ b/package/qt5/qt5tools/qt5tools.mk
@@ -50,10 +50,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), \
@@ -71,4 +67,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))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 08/28] package/qt5virtualkeyboard: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (6 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 07/28] package/qt5tools: Partially convert to qmake infra Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 21:35   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 09/28] package/quazip: " Andreas Naumann
                   ` (20 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

It seems the old method was missing some files from the install
step since after the conversion the the following additional files
appear in target after a build with all config options selected:
usr/lib/qt/plugins/lipi_toolkit/libactivedtw.so
usr/lib/qt/plugins/lipi_toolkit/libboxfld.so
usr/lib/qt/plugins/lipi_toolkit/libl7.so
usr/lib/qt/plugins/lipi_toolkit/liblipiengine.so
usr/lib/qt/plugins/lipi_toolkit/liblogger.so
usr/lib/qt/plugins/lipi_toolkit/libneuralnet.so
usr/lib/qt/plugins/lipi_toolkit/libnn.so
usr/lib/qt/plugins/lipi_toolkit/libnpen.so
usr/lib/qt/plugins/lipi_toolkit/libpointfloat.so
usr/lib/qt/plugins/lipi_toolkit/libpreproc.so
usr/lib/qt/plugins/lipi_toolkit/libsubstroke.so
usr/lib/qt/plugins/virtualkeyboard/libqtvirtualkeyboard_lipi.so

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 .../qt5virtualkeyboard/qt5virtualkeyboard.mk  | 63 ++-----------------
 1 file changed, 4 insertions(+), 59 deletions(-)

diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
index c13fa699a6..162ed88c8c 100644
--- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
+++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
@@ -22,7 +22,7 @@ endif
 
 QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS = $(call qstrip,$(BR2_PACKAGE_QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS))
 ifneq ($(strip $(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
-QT5VIRTUALKEYBOARD_QMAKEFLAGS += CONFIG+="$(foreach lang,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS),lang-$(lang))"
+QT5VIRTUALKEYBOARD_CONF_OPTS += CONFIG+="$(foreach lang,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS),lang-$(lang))"
 
 ifneq ($(filter ja_JP all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (openwnn)
@@ -36,7 +36,6 @@ endif
 ifneq ($(filter zh_CN all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (pinyin)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/pinyin/NOTICE
 else
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/plugins/pinyin/3rdparty/pinyin/NOTICE
@@ -46,7 +45,6 @@ endif
 ifneq ($(filter zh_TW all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (tcime), BSD-3-Clause (tcime)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/tcime/COPYING
 else
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/plugins/tcime/3rdparty/tcime/COPYING
@@ -55,8 +53,7 @@ endif
 endif
 
 ifeq ($(BR2_PACKAGE_QT5VIRTUALKEYBOARD_HANDWRITING),y)
-QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
-QT5VIRTUALKEYBOARD_QMAKEFLAGS += CONFIG+=handwriting
+QT5VIRTUALKEYBOARD_CONF_OPTS += CONFIG+=handwriting
 QT5VIRTUALKEYBOARD_LICENSE += , MIT (lipi-toolkit)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/lipi-toolkit/license.txt
@@ -66,59 +63,7 @@ endif
 endif
 
 ifeq ($(BR2_PACKAGE_QT5VIRTUALKEYBOARD_ARROW_KEY_NAVIGATION),y)
-QT5VIRTUALKEYBOARD_QMAKEFLAGS += CONFIG+=arrow-key-navigation
+QT5VIRTUALKEYBOARD_CONF_OPTS += CONFIG+=arrow-key-navigation
 endif
 
-ifeq ($(QT5VIRTUALKEYBOARD_3RDPARTY_PARTS),YES)
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_3RDPARTY_PARTS
-	cp -dpfr $(STAGING_DIR)/usr/qtvirtualkeyboard $(TARGET_DIR)/usr
-endef
-endif
-
-define QT5VIRTUALKEYBOARD_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake $(QT5VIRTUALKEYBOARD_QMAKEFLAGS))
-endef
-
-define QT5VIRTUALKEYBOARD_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5VIRTUALKEYBOARD_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
-	mkdir -p $(TARGET_DIR)/usr/qml/QtQuick/Enterprise
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/Enterprise/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/Enterprise/
-endef
-else
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML
-	mkdir -p $(TARGET_DIR)/usr/qml/QtQuick
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/virtualkeyboard $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST):$(BR2_STATIC_LIBS),y:)
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5VirtualKeyboard*.so.* $(TARGET_DIR)/usr/lib
-endef
-endif
-
-define QT5VIRTUALKEYBOARD_INSTALL_TARGET_CMDS
-	mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so \
-		$(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts
-	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_LIBS)
-	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_QML)
-	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_3RDPARTY_PARTS)
-	$(QT5VIRTUALKEYBOARD_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 09/28] package/quazip: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (7 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 08/28] package/qt5virtualkeyboard: Convert " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-02-17 21:57   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 10/28] package/qt5wayland: " Andreas Naumann
                   ` (19 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

We need to use correct staging path as prefix after switching to qmake infra,
because the qmake infra no longer overwrites the built in install pathes.

Otherwise the build breaks when the install steps are trying to copy to /usr.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/quazip/quazip.mk | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/package/quazip/quazip.mk b/package/quazip/quazip.mk
index 53042f6c4c..35cf8adafd 100644
--- a/package/quazip/quazip.mk
+++ b/package/quazip/quazip.mk
@@ -13,20 +13,6 @@ 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
+QUAZIP_CONF_OPTS = PREFIX=$(STAGING_DIR)/usr
 
-define QUAZIP_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-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 $(generic-package))
+$(eval $(qmake-package))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 10/28] package/qt5wayland: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (8 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 09/28] package/quazip: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 21:48   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 11/28] package/qt5webchannel: " Andreas Naumann
                   ` (18 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Straightforward conversion except for the wayland-compositor configure
option.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5wayland/qt5wayland.mk | 56 +---------------------------
 1 file changed, 2 insertions(+), 54 deletions(-)

diff --git a/package/qt5/qt5wayland/qt5wayland.mk b/package/qt5/qt5wayland/qt5wayland.mk
index 4790efc660..b98a28b5c8 100644
--- a/package/qt5/qt5wayland/qt5wayland.mk
+++ b/package/qt5/qt5wayland/qt5wayland.mk
@@ -27,59 +27,7 @@ QT5WAYLAND_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICE
 endif
 
 ifeq ($(BR2_PACKAGE_QT5WAYLAND_COMPOSITOR),y)
-QT5WAYLAND_QMAKEFLAGS += CONFIG+=wayland-compositor
+QT5WAYLAND_CONF_OPTS += CONFIG+=wayland-compositor
 endif
 
-define QT5WAYLAND_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake $(QT5WAYLAND_QMAKEFLAGS))
-endef
-
-define QT5WAYLAND_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WAYLAND_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
-endef
-
-ifeq ($(BR2_PACKAGE_QT5WAYLAND_COMPOSITOR),y)
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-define QT5WAYLAND_INSTALL_COMPOSITOR
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WaylandCompositor.so* $(TARGET_DIR)/usr/lib
-endef
-else
-define QT5WAYLAND_INSTALL_COMPOSITOR
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Compositor.so* $(TARGET_DIR)/usr/lib
-endef
-endif
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK)$(BR2_PACKAGE_QT5_VERSION_LATEST),yy)
-define QT5WAYLAND_INSTALL_COMPOSITOR_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWayland $(TARGET_DIR)/usr/qml/
-endef
-endif
-endif
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-ifeq ($(BR2_PACKAGE_QT5BASE_OPENGL),y)
-define QT5WAYLAND_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/wayland $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-else
-define QT5WAYLAND_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/wayland $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-endif
-
-define QT5WAYLAND_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WaylandClient.so* $(TARGET_DIR)/usr/lib
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/wayland* $(TARGET_DIR)/usr/lib/qt/plugins
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/platforms/libqwayland* $(TARGET_DIR)/usr/lib/qt/plugins/platforms
-	$(QT5WAYLAND_INSTALL_COMPOSITOR)
-	$(QT5WAYLAND_INSTALL_COMPOSITOR_QMLS)
-	$(QT5WAYLAND_INSTALL_TARGET_EXAMPLES)
-endef
-
-$(eval $(generic-package))
+$(eval $(qmake-package))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 11/28] package/qt5webchannel: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (9 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 10/28] package/qt5wayland: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 21:49   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 12/28] package/qt5webkit: " Andreas Naumann
                   ` (17 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

The install of the javascript is custom and thus needs to be kept.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5webchannel/qt5webchannel.mk | 39 ++--------------------
 1 file changed, 2 insertions(+), 37 deletions(-)

diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk
index 22523036e7..112d5218ba 100644
--- a/package/qt5/qt5webchannel/qt5webchannel.mk
+++ b/package/qt5/qt5webchannel/qt5webchannel.mk
@@ -25,18 +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
-endef
-
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT
 	$(INSTALL) -m 0644 -D $(@D)/examples/webchannel/shared/qwebchannel.js \
@@ -49,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))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 12/28] package/qt5webkit: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (10 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 11/28] package/qt5webchannel: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 21:55   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 13/28] package/qt5webkit-examples: " Andreas Naumann
                   ` (16 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Mostly straightforward conversion.
The jsc binary was not installed automatically. Unsure of its significance
the custom install command is kept in a hook.

Note:
The generic install creates QtWebProcess in /usr/libexec/ instead of /usr/bin.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5webkit/qt5webkit.mk | 29 +++++++----------------------
 1 file changed, 7 insertions(+), 22 deletions(-)

diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk
index 25c5495482..f20fa24b9c 100644
--- a/package/qt5/qt5webkit/qt5webkit.mk
+++ b/package/qt5/qt5webkit/qt5webkit.mk
@@ -37,35 +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
-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))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 13/28] package/qt5webkit-examples: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (11 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 12/28] package/qt5webkit: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 21:57   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 14/28] package/qt5webengine: " Andreas Naumann
                   ` (15 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Straightforward conversion. Only conditional dependencies have to remain.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 .../qt5webkit-examples/qt5webkit-examples.mk  | 23 +------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/package/qt5/qt5webkit-examples/qt5webkit-examples.mk b/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
index 94153fd652..1f6058657d 100644
--- a/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
+++ b/package/qt5/qt5webkit-examples/qt5webkit-examples.mk
@@ -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))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 14/28] package/qt5webengine: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (12 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 13/28] package/qt5webkit-examples: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 22:01   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 15/28] package/qt-webkit-kiosk: " Andreas Naumann
                   ` (14 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Mostly straightforward conversion but keeping custom config/build env
to apply the python2 workaround.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5webengine/qt5webengine.mk | 47 +++---------------------
 1 file changed, 6 insertions(+), 41 deletions(-)

diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
index 1d5ee8d819..798b777df0 100644
--- a/package/qt5/qt5webengine/qt5webengine.mk
+++ b/package/qt5/qt5webengine/qt5webengine.mk
@@ -30,16 +30,16 @@ ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
 endif
 
-QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_system_ffmpeg
+QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_system_ffmpeg
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
-QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_proprietary_codecs
+QT5WEBENGINE_CONF_OPTS += WEBENGINE_CONFIG+=use_proprietary_codecs
 endif
 
 ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
 QT5WEBENGINE_DEPENDENCIES += alsa-lib
 else
-QT5WEBENGINE_QMAKEFLAGS += QT_CONFIG-=alsa
+QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
 endif
 
 # QtWebengine's build system uses python, but only supports python2. We work
@@ -63,42 +63,7 @@ QT5WEBENGINE_PRE_CONFIGURE_HOOKS += QT5WEBENGINE_CREATE_HOST_PKG_CONFIG
 QT5WEBENGINE_ENV += GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config
 endif
 
-define QT5WEBENGINE_CONFIGURE_CMDS
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(HOST_DIR)/bin/qmake $(QT5WEBENGINE_QMAKEFLAGS))
-endef
-
-define QT5WEBENGINE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(MAKE) -C $(@D)
-endef
-
-define QT5WEBENGINE_INSTALL_STAGING_CMDS
-	$(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV) $(MAKE) -C $(@D) install
-endef
-
-define QT5WEBENGINE_INSTALL_TARGET_QMLS
-	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebEngine $(TARGET_DIR)/usr/qml/
-endef
-
-ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-define QT5WEBENGINE_INSTALL_TARGET_EXAMPLES
-	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webengine* $(TARGET_DIR)/usr/lib/qt/examples/
-endef
-endif
-
-ifneq ($(BR2_STATIC_LIBS),y)
-define QT5WEBENGINE_INSTALL_TARGET_LIBS
-	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebEngine*.so.* $(TARGET_DIR)/usr/lib
-	cp -dpf $(STAGING_DIR)/usr/libexec/QtWebEngineProcess $(TARGET_DIR)/usr/libexec/
-	cp -dpfr $(STAGING_DIR)/usr/resources/ $(TARGET_DIR)/usr/
-	mkdir -p $(TARGET_DIR)/usr/translations/qtwebengine_locales/
-	cp -dpfr $(STAGING_DIR)/usr/translations/qtwebengine_locales $(TARGET_DIR)/usr/translations/qtwebengine_locales/
-endef
-endif
-
-define QT5WEBENGINE_INSTALL_TARGET_CMDS
-	$(QT5WEBENGINE_INSTALL_TARGET_LIBS)
-	$(QT5WEBENGINE_INSTALL_TARGET_QMLS)
-	$(QT5WEBENGINE_INSTALL_TARGET_EXAMPLES)
-endef
+QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
+QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)
 
-$(eval $(generic-package))
+$(eval $(qmake-package))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 15/28] package/qt-webkit-kiosk: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (13 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 14/28] package/qt5webengine: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 22:04   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 16/28] package/qt5cinex: " Andreas Naumann
                   ` (13 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Convert but keep the slightly complicated custom install step for now.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt-webkit-kiosk/qt-webkit-kiosk.mk | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/package/qt-webkit-kiosk/qt-webkit-kiosk.mk 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
 
-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))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 16/28] package/qt5cinex: Convert to qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (14 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 15/28] package/qt-webkit-kiosk: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 22:06   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 17/28] core/pkg-infra: Fix package file statistics for parallel build Andreas Naumann
                   ` (12 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Keep custom install logic because qt5cinex has no built-in install target.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5cinex/qt5cinex.mk | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/package/qt5cinex/qt5cinex.mk b/package/qt5cinex/qt5cinex.mk
index 89c38ee3f5..2b27f651d8 100644
--- a/package/qt5cinex/qt5cinex.mk
+++ b/package/qt5cinex/qt5cinex.mk
@@ -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))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 17/28] core/pkg-infra: Fix package file statistics for parallel build
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (15 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 16/28] package/qt5cinex: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 22:07   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make Andreas Naumann
                   ` (11 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

When activating top level parallel build, multiple processes may
try to modify the various *files-list* files in the common build/
directory at the same time. This can cause racy build failures.

The fix here is to use flock to ensure exclusive execution of the
statistics gathering code. For this to work it is assumed that the
target/staging/host directories are isolated, which is true for
per-package builds.
For standard sequential builds, the locking is of course unnecessary
but no conditional handling is implemented  since the runtime cost is
expected to be next to nothing.

For flock to work, the statistics gathering code must be run in a
single subshell. Otherwise the lockfile descriptor would be closed
after the subshell (= the Makefile line where it was opened) ends
and thus the lock would be released before even entering the critical
code section.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/pkg-generic.mk | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 268d999efb..d18805e2d0 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -64,20 +64,22 @@ GLOBAL_INSTRUMENTATION_HOOKS += step_time
 # $(3): suffix of file  (optional)
 define step_pkg_size_inner
 	@touch $(BUILD_DIR)/.files-list$(3).stat
-	@touch $(BUILD_DIR)/packages-file-list$(3).txt
-	$(SED) '/^$(1),/d' $(BUILD_DIR)/packages-file-list$(3).txt
+	exec 3>$(BUILD_DIR)/packages-file-list$(3).txt; \
+	flock -x 3; \
+	$(SED) '/^$(1),/d' $(BUILD_DIR)/packages-file-list$(3).txt; \
 	cd $(2); \
 	LC_ALL=C find . \( -type f -o -type l \) -printf '%T@:%i:%#m:%y:%s,%p\n' \
-		| LC_ALL=C sort > $(BUILD_DIR)/.files-list$(3).new
+		| LC_ALL=C sort > $(BUILD_DIR)/.files-list$(3).new; \
 	LC_ALL=C comm -13 \
 		$(BUILD_DIR)/.files-list$(3).stat \
 		$(BUILD_DIR)/.files-list$(3).new \
-		> $($(PKG)_BUILDDIR)/.files-list$(3).txt
+		> $($(PKG)_BUILDDIR)/.files-list$(3).txt; \
 	sed -r -e 's/^[^,]+/$(1)/' \
 		$($(PKG)_BUILDDIR)/.files-list$(3).txt \
-		>> $(BUILD_DIR)/packages-file-list$(3).txt
+		>> $(BUILD_DIR)/packages-file-list$(3).txt; \
 	mv $(BUILD_DIR)/.files-list$(3).new \
-		$(BUILD_DIR)/.files-list$(3).stat
+		$(BUILD_DIR)/.files-list$(3).stat; \
+	exec 3>&-
 endef
 
 define step_pkg_size
-- 
2.25.0

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (16 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 17/28] core/pkg-infra: Fix package file statistics for parallel build Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 22:25   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra Andreas Naumann
                   ` (10 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Setting -O in top level make somehow interferes with the explicit setting of
-jX in the cmake bootstrap script. Avoid passing down MAKEFLAGS in the configure
case.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/cmake/cmake.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk
index 1f30736023..690603b09c 100644
--- a/package/cmake/cmake.mk
+++ b/package/cmake/cmake.mk
@@ -41,6 +41,7 @@ define HOST_CMAKE_CONFIGURE_CMDS
 	(cd $(@D); \
 		$(HOST_CONFIGURE_OPTS) \
 		CFLAGS="$(HOST_CMAKE_CFLAGS)" \
+		MAKEFLAGS= \
 		./bootstrap --prefix=$(HOST_DIR) \
 			--parallel=$(PARALLEL_JOBS) -- \
 			-DCMAKE_C_FLAGS="$(HOST_CMAKE_CFLAGS)" \
-- 
2.25.0

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

* [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (17 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-04-10 20:25   ` Yann E. MORIN
                     ` (2 more replies)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure Andreas Naumann
                   ` (9 subsequent siblings)
  28 siblings, 3 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

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

Fortunately, qmake's built-in pathes can be overridden by placing a custom
qt.conf next to the qmake binary. This is already used to facilitate SDK
relocation. So for per-package path manipulation we can reuse that method, but
need to change the host/sysroot values according to each per-package
path.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/pkg-qmake.mk           |  1 +
 package/qt5/qt5.mk             | 15 +++++++++++++++
 package/qt5/qt5base/qt5base.mk |  9 +--------
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
index 53ac3e4a1c..3aa0dd7101 100644
--- a/package/pkg-qmake.mk
+++ b/package/pkg-qmake.mk
@@ -46,6 +46,7 @@ $(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)
 #
 ifndef $(2)_CONFIGURE_CMDS
 define $(2)_CONFIGURE_CMDS
+	$$(QT5_QT_CONF_FIXUP)
 	cd $$($(2)_BUILDDIR) && \
 	$$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS)
 endef
diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
index d94d9cc99f..eb2a749678 100644
--- a/package/qt5/qt5.mk
+++ b/package/qt5/qt5.mk
@@ -17,5 +17,20 @@ QT5_SITE = https://download.qt.io/archive/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)
 
 include $(sort $(wildcard package/qt5/*/*.mk))
 
+# The file "qt.conf" can be used to override the hard-coded paths that are
+# compiled into the Qt library. We need it to make "qmake" relocatable and
+# tweak the per-package install pathes
+define QT5_INSTALL_QT_CONF
+	rm -f $(HOST_DIR)/bin/qt.conf && \
+	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
+		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
+endef
+
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define QT5_QT_CONF_FIXUP
+        $(QT5_INSTALL_QT_CONF)
+endef
+endif
+
 # Variable for other Qt applications to use
 QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index 03f984ef8c..960a802b3b 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -352,13 +352,6 @@ define QT5BASE_CONFIGURE_CMDS
 	)
 endef
 
-# The file "qt.conf" can be used to override the hard-coded paths that are
-# compiled into the Qt library. We need it to make "qmake" relocatable.
-define QT5BASE_INSTALL_QT_CONF
-	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
-		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
-endef
-
-QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_INSTALL_QT_CONF
+QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
 
 $(eval $(qmake-package))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (18 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-06-19 10:22   ` Louis-Paul CORDIER
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build Andreas Naumann
                   ` (8 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Per default qmake uses the pkg-config binary and search path detected by qt5base
and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages
not contained in qt5base not being detected.
To overcome this, set the correct pathes in the global QMAKE variable.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
index eb2a749678..c3b9f69c3f 100644
--- a/package/qt5/qt5.mk
+++ b/package/qt5/qt5.mk
@@ -33,4 +33,6 @@ endef
 endif
 
 # Variable for other Qt applications to use
-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
-- 
2.25.0

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

* [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (19 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-11 22:30   ` Thomas Petazzoni
  2020-07-01 21:56   ` Yann E. MORIN
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 22/28] package/python-pyqt5: " Andreas Naumann
                   ` (7 subsequent siblings)
  28 siblings, 2 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Since python-sip is not built by the qmake infra, we need to explicitly
integrate the qt.conf fixup needed for successful per-package build and
consistently use qmake via QT5_QMAKE variable.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/python-sip/python-sip.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/python-sip/python-sip.mk b/package/python-sip/python-sip.mk
index 1d6c205396..7ae2d43e1e 100644
--- a/package/python-sip/python-sip.mk
+++ b/package/python-sip/python-sip.mk
@@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
 endef
 
 define PYTHON_SIP_CONFIGURE_CMDS
+	$(QT5_QT_CONF_FIXUP)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
 			--bindir $(TARGET_DIR)/usr/bin \
@@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
 			--sipdir $(TARGET_DIR)/usr/share/sip \
 			--sysroot $(STAGING_DIR)/usr \
 			--use-qmake && \
-		$(HOST_DIR)/bin/qmake)
+		$(QT5_QMAKE))
 endef
 
 define PYTHON_SIP_BUILD_CMDS
-- 
2.25.0

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

* [Buildroot] [PATCH v6 22/28] package/python-pyqt5: Fix qmake usage for per-package build
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (20 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency Andreas Naumann
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Since python-pyqt5 is not built by the qmake infra, we need to explicitly
integrate the qt.conf fixup needed for successful per-package build.

Note:
Calling qmake via the QT5_QMAKE variable can not be done because it includes
parameters which the python configure script does not accept.
However, at the moment these parameters are only important for modifiying the
per-package pkg-config pathes. This is assumed to be correctly done because
the correct per-package sysroot path is supplied to the python configure
script.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/python-pyqt5/python-pyqt5.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/python-pyqt5/python-pyqt5.mk b/package/python-pyqt5/python-pyqt5.mk
index 260a93af9c..60828fce1a 100644
--- a/package/python-pyqt5/python-pyqt5.mk
+++ b/package/python-pyqt5/python-pyqt5.mk
@@ -161,6 +161,7 @@ PYTHON_PYQT5_CONF_OPTS = \
 
 define PYTHON_PYQT5_CONFIGURE_CMDS
 	$(call PYTHON_PYQT5_GENERATE_QTDETAIL,$(@D))
+	$(QT5_QT_CONF_FIXUP)
 	(cd $(@D); \
 		$(TARGET_MAKE_ENV) \
 		$(TARGET_CONFIGURE_OPTS) \
-- 
2.25.0

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

* [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (21 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 22/28] package/python-pyqt5: " Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-03-12  8:15   ` Thomas Petazzoni
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 24/28] package/qt5webengine: Add optional dependency on qt5quickcontrols2 Andreas Naumann
                   ` (5 subsequent siblings)
  28 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

Fixes a build failure.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5webengine/Config.in       | 1 +
 package/qt5/qt5webengine/qt5webengine.mk | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in
index 0e776ecb61..f98530fa4d 100644
--- a/package/qt5/qt5webengine/Config.in
+++ b/package/qt5/qt5webengine/Config.in
@@ -59,6 +59,7 @@ config BR2_PACKAGE_QT5WEBENGINE
 	select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_QT5BASE_XCB
 	select BR2_PACKAGE_XLIB_LIBXSCRNSAVER if BR2_PACKAGE_QT5BASE_XCB
 	select BR2_PACKAGE_XLIB_LIBXTST if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_QT5BASE_XCB
 	help
 	  The Qt WebEngine module provides a web browser engine that
 	  makes it easy to embed content from the World Wide Web into
diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
index 798b777df0..cd7a0ba81c 100644
--- a/package/qt5/qt5webengine/qt5webengine.mk
+++ b/package/qt5/qt5webengine/qt5webengine.mk
@@ -23,7 +23,7 @@ QT5WEBENGINE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT \
 
 ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
 QT5WEBENGINE_DEPENDENCIES += xlib_libXScrnSaver xlib_libXcomposite \
-	xlib_libXcursor xlib_libXi xlib_libXrandr xlib_libXtst
+	xlib_libXcursor xlib_libXi xlib_libXrandr xlib_libXtst xlib_libXdamage
 endif
 
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
-- 
2.25.0

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

* [Buildroot] [PATCH v6 24/28] package/qt5webengine: Add optional dependency on qt5quickcontrols2
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (22 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 25/28] package/qt5webengine: Add optional dependency on qt5location Andreas Naumann
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

The recipebrowser example depends on qt5quickcontrols2.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5webengine/qt5webengine.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
index cd7a0ba81c..c27bf85908 100644
--- a/package/qt5/qt5webengine/qt5webengine.mk
+++ b/package/qt5/qt5webengine/qt5webengine.mk
@@ -42,6 +42,10 @@ else
 QT5WEBENGINE_CONF_OPTS += QT_CONFIG-=alsa
 endif
 
+ifeq ($(BR2_PACKAGE_QT5QUICKCONTROLS2),y)
+QT5WEBENGINE_DEPENDENCIES += qt5quickcontrols2
+endif
+
 # QtWebengine'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.
-- 
2.25.0

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

* [Buildroot] [PATCH v6 25/28] package/qt5webengine: Add optional dependency on qt5location
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (23 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 24/28] package/qt5webengine: Add optional dependency on qt5quickcontrols2 Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 26/28] package/qt5virtualkeyboard: Add optional dependency on qt5quickcontrols2 Andreas Naumann
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

the webenginewidgets maps example depends on it

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5webengine/qt5webengine.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
index c27bf85908..e0b39c354f 100644
--- a/package/qt5/qt5webengine/qt5webengine.mk
+++ b/package/qt5/qt5webengine/qt5webengine.mk
@@ -46,6 +46,11 @@ ifeq ($(BR2_PACKAGE_QT5QUICKCONTROLS2),y)
 QT5WEBENGINE_DEPENDENCIES += qt5quickcontrols2
 endif
 
+ifeq ($(BR2_PACKAGE_QT5LOCATION),y)
+QT5WEBENGINE_DEPENDENCIES += qt5location
+endif
+
+
 # QtWebengine'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.
-- 
2.25.0

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

* [Buildroot] [PATCH v6 26/28] package/qt5virtualkeyboard: Add optional dependency on qt5quickcontrols2
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (24 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 25/28] package/qt5webengine: Add optional dependency on qt5location Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 27/28] package/qt53d: Add optional dependency on qt5multimedia Andreas Naumann
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

The basic example depends on qt5quickcontrols2.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
index 162ed88c8c..ea41b5ff86 100644
--- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
+++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
@@ -15,6 +15,10 @@ QT5VIRTUALKEYBOARD_SOURCE = qtvirtualkeyboard-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT5
 QT5VIRTUALKEYBOARD_DEPENDENCIES = qt5base qt5declarative qt5svg
 QT5VIRTUALKEYBOARD_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_QT5QUICKCONTROLS2),y)
+QT5VIRTUALKEYBOARD_DEPENDENCIES += qt5quickcontrols2
+endif
+
 QT5VIRTUALKEYBOARD_LICENSE = GPL-3.0
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 QT5VIRTUALKEYBOARD_LICENSE_FILES = LICENSE.GPL3
-- 
2.25.0

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

* [Buildroot] [PATCH v6 27/28] package/qt53d: Add optional dependency on qt5multimedia
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (25 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 26/28] package/qt5virtualkeyboard: Add optional dependency on qt5quickcontrols2 Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 28/28] package/qt5charts: " Andreas Naumann
  2020-02-18 21:33 ` [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Peter Seiderer
  28 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

The audio-visualizer-qml example depends on it.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt53d/qt53d.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk
index eeb1b3644c..c9db7cd0d7 100644
--- a/package/qt5/qt53d/qt53d.mk
+++ b/package/qt5/qt53d/qt53d.mk
@@ -10,6 +10,10 @@ QT53D_SOURCE = qt3d-$(QT5_SOURCE_TARBALL_PREFIX)-$(QT53D_VERSION).tar.xz
 QT53D_DEPENDENCIES = qt5base qt5declarative
 QT53D_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_QT5MULTIMEDIA),y)
+QT53D_DEPENDENCIES += qt5multimedia
+endif
+
 ifeq ($(BR2_PACKAGE_ASSIMP),y)
 QT53D_DEPENDENCIES += assimp
 endif
-- 
2.25.0

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

* [Buildroot] [PATCH v6 28/28] package/qt5charts: Add optional dependency on qt5multimedia
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (26 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 27/28] package/qt53d: Add optional dependency on qt5multimedia Andreas Naumann
@ 2020-02-17 21:23 ` Andreas Naumann
  2020-02-18 21:33 ` [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Peter Seiderer
  28 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-17 21:23 UTC (permalink / raw)
  To: buildroot

The audio example depends on it.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qt5/qt5charts/qt5charts.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/qt5/qt5charts/qt5charts.mk b/package/qt5/qt5charts/qt5charts.mk
index 40f5efc2da..478cf9d6d8 100644
--- a/package/qt5/qt5charts/qt5charts.mk
+++ b/package/qt5/qt5charts/qt5charts.mk
@@ -24,4 +24,8 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
 QT5CHARTS_DEPENDENCIES += qt5declarative
 endif
 
+ifeq ($(BR2_PACKAGE_QT5MULTIMEDIA),y)
+QT5CHARTS_DEPENDENCIES += qt5multimedia
+endif
+
 $(eval $(qmake-package))
-- 
2.25.0

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

* [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency Andreas Naumann
@ 2020-02-17 21:56   ` Thomas Petazzoni
  2020-02-18  9:43     ` Andreas Naumann
  2020-02-19 19:16   ` Thomas Petazzoni
  1 sibling, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-02-17 21:56 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:28 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qwt/qwt.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
> index 1fec17b19a..50df7e2642 100644
> --- a/package/qwt/qwt.mk
> +++ b/package/qwt/qwt.mk
> @@ -19,6 +19,7 @@ QWT_CONFIG += -e 's%/features%/mkspecs/features%'
>  
>  ifeq ($(BR2_PACKAGE_QWT_SVG),y)
>  QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/'
> +QWT_DEPENDENCIES += qt5svg
>  else
>  QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/'
>  endif

This looks like a fix we should apply today. Why doesn't this trigger
any autobuilder failure?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 09/28] package/quazip: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 09/28] package/quazip: " Andreas Naumann
@ 2020-02-17 21:57   ` Thomas Petazzoni
  2020-02-18 10:00     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-02-17 21:57 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:31 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> We need to use correct staging path as prefix after switching to qmake infra,
> because the qmake infra no longer overwrites the built in install pathes.
> 
> Otherwise the build breaks when the install steps are trying to copy to /usr.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

A prefix of $(STAGING_DIR)/usr looks wrong, as prefix is normally where
the things will be once installed in the target. Do we really need to
do this change?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency
  2020-02-17 21:56   ` Thomas Petazzoni
@ 2020-02-18  9:43     ` Andreas Naumann
  2020-02-18 14:58       ` Thomas Petazzoni
  0 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-18  9:43 UTC (permalink / raw)
  To: buildroot

Hi

Am 17.02.20 um 22:56 schrieb Thomas Petazzoni:
> On Mon, 17 Feb 2020 22:23:28 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
>> ---
>>   package/qwt/qwt.mk | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
>> index 1fec17b19a..50df7e2642 100644
>> --- a/package/qwt/qwt.mk
>> +++ b/package/qwt/qwt.mk
>> @@ -19,6 +19,7 @@ QWT_CONFIG += -e 's%/features%/mkspecs/features%'
>>   
>>   ifeq ($(BR2_PACKAGE_QWT_SVG),y)
>>   QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/'
>> +QWT_DEPENDENCIES += qt5svg
>>   else
>>   QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/'
>>   endif
> 
> This looks like a fix we should apply today. Why doesn't this trigger
> any autobuilder failure?

Probably because qwt is built after qt5svg (more or less by chance). 
However, in per-package mode this becomes a problem because the libs are 
not copied to the qwt per-package staging.

regards,
Andreas

> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 09/28] package/quazip: Convert to qmake infra
  2020-02-17 21:57   ` Thomas Petazzoni
@ 2020-02-18 10:00     ` Andreas Naumann
  2020-03-11 21:42       ` Thomas Petazzoni
  0 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-02-18 10:00 UTC (permalink / raw)
  To: buildroot

Hi,

Am 17.02.20 um 22:57 schrieb Thomas Petazzoni:
> On Mon, 17 Feb 2020 22:23:31 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> We need to use correct staging path as prefix after switching to qmake infra,
>> because the qmake infra no longer overwrites the built in install pathes.
>>
>> Otherwise the build breaks when the install steps are trying to copy to /usr.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> 
> A prefix of $(STAGING_DIR)/usr looks wrong, as prefix is normally where
> the things will be once installed in the target. Do we really need to
> do this change?

I agree it's probably not how PREFIX is intended to be used. But after 
all the project doesnt seem to support cross-compile/install properly as 
you can see by the need to explicitly set INSTALL_ROOT to a different 
path for staging/target.

I had an earlier solution where I made a patch to the quazip .pro file, 
but I wasnt entirely sure if it's correct. So I figured with this 
solution I dont need to do any upstream work ;-), which I'm not 100% 
sure about.


Andreas

> 
> Thanks,
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency
  2020-02-18  9:43     ` Andreas Naumann
@ 2020-02-18 14:58       ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-02-18 14:58 UTC (permalink / raw)
  To: buildroot

On Tue, 18 Feb 2020 10:43:17 +0100
Andreas Naumann <dev@andin.de> wrote:

> > This looks like a fix we should apply today. Why doesn't this trigger
> > any autobuilder failure?  
> 
> Probably because qwt is built after qt5svg (more or less by chance). 
> However, in per-package mode this becomes a problem because the libs are 
> not copied to the qwt per-package staging.

Ah yes, indeed. It's still a good bug fix that we can apply to master
now, independently of the rest of the series.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility
  2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
                   ` (27 preceding siblings ...)
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 28/28] package/qt5charts: " Andreas Naumann
@ 2020-02-18 21:33 ` Peter Seiderer
  2020-02-19 14:46   ` Andreas Naumann
  28 siblings, 1 reply; 98+ messages in thread
From: Peter Seiderer @ 2020-02-18 21:33 UTC (permalink / raw)
  To: buildroot

Hello Andreas,

On Mon, 17 Feb 2020 22:23:22 +0100, Andreas Naumann <anaumann@ultratronik.de> wrote:


> - qtwebengine locales appear in usr/translations/qtwebengine_locales/
> instead of usr/translations/qtwebengine_locales/qtwebengine_locales/

And this perfect as the qtwebengine searches for locales *.pak files
exactly under this location e.g.:

	/usr/translations/qtwebengine_locales/en-US.pak

The double path is a buildroot qt5webengine package install mistake...,
patch fixing this will follow soon...

Regards,
Peter

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

* [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility
  2020-02-18 21:33 ` [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Peter Seiderer
@ 2020-02-19 14:46   ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-02-19 14:46 UTC (permalink / raw)
  To: buildroot

Hi Peter,

Am 18.02.20 um 22:33 schrieb Peter Seiderer:
> Hello Andreas,
> 
> On Mon, 17 Feb 2020 22:23:22 +0100, Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
> 
>> - qtwebengine locales appear in usr/translations/qtwebengine_locales/
>> instead of usr/translations/qtwebengine_locales/qtwebengine_locales/
> 
> And this perfect as the qtwebengine searches for locales *.pak files
> exactly under this location e.g.:
> 
> 	/usr/translations/qtwebengine_locales/en-US.pak
> 
> The double path is a buildroot qt5webengine package install mistake...,

That's what I'm saying. And the generic qmake infra would fix it.

regards,
Andreas

> patch fixing this will follow soon...
> 
> Regards,
> Peter
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

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

* [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency Andreas Naumann
  2020-02-17 21:56   ` Thomas Petazzoni
@ 2020-02-19 19:16   ` Thomas Petazzoni
  1 sibling, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-02-19 19:16 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:28 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qwt/qwt.mk | 1 +
>  1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen Andreas Naumann
@ 2020-03-09 21:21   ` Thomas Petazzoni
  2020-03-09 22:42     ` Peter Seiderer
  2020-03-10 17:02     ` Andreas Naumann
  0 siblings, 2 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-09 21:21 UTC (permalink / raw)
  To: buildroot

Hello Andreas,

On Mon, 17 Feb 2020 22:23:23 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> 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.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qt5/qt5base/qt5base.mk | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index 774c771bc9..c662921b8f 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_STATIC_LIBS),y)
> +QT5BASE_CONFIGURE_OPTS += -static
> +else
> +QT5BASE_CONFIGURE_OPTS += -shared
> +endif

From package/qt5/Config.in:

menuconfig BR2_PACKAGE_QT5
        bool "Qt5"
        depends on BR2_INSTALL_LIBSTDCPP
        depends on BR2_USE_WCHAR
        depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
        depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
        depends on !BR2_ARM_CPU_ARMV4 # needs ARMv5+
        # no built-in double-conversion support
        depends on !BR2_arc && !BR2_nios2 && !BR2_xtensa
        depends on !BR2_STATIC_LIBS

So Qt5 cannot be enabled when BR2_STATIC_LIBS=y. See also:

commit 2215b8a75edea384182f0511b6649306e60b55d1
Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date:   Wed Aug 26 17:06:18 2015 +0200

    qt5: disable for static-only builds
    
    Even though we have some specific code to support building Qt5 for
    static-only configurations, it doesn't work. The first problem is that
    our custom qmake.conf always passes -ldl, which makes a number of Qt5
    config.tests fail at configure time. Once this problem is fixed by
    removing -ldl from QMAKE_LIBS and adding it to QMAKE_LIBS_DYNLOAD
    instead, the next problem is that the plugin infrastructure of Qt5
    assumes that Linux has dynamic library support: the qlibrary_unix.cpp
    file includes <dlfcn.h>, and the only condition for this file to not
    be included is:
    
    Until recently, building Qt5 statically was working because our C
    library was not built static-only: it provided <dlfcn.h> and
    libdl.so. But now that we have a really static only toolchain, Qt5 no
    longer builds.
    
    The easiest solution is to simply make Qt5 depend on dynamic library
    support.
    
    Fixes:
    
       http://autobuild.buildroot.net/results/538/538e0325adba9fabbe4ec8e550fbb6a7219f5e7a/
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

So I don't think this patch is necessary, unless I missed something.
How did you test it?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 02/28] core/pkg-infra: Add generic qmake package infrastructure
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 02/28] core/pkg-infra: Add generic qmake package infrastructure Andreas Naumann
@ 2020-03-09 22:10   ` Thomas Petazzoni
  2020-03-10 17:10     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-09 22:10 UTC (permalink / raw)
  To: buildroot

Hello Andreas,

On Mon, 17 Feb 2020 22:23:24 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> This provides generic functions for Qt5 qmake based packages. It will make it
> possible to remove lots of redefinition of QT5_xxx_{CONFIGURE|BUILD|
> INSTALL_STATGING}_CMDS. Additionally it provides a generic target install
> method which will make most of the package specific commands obsolete.
> 
> 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.
> The cleanup of many files we dont want in target is deferred to the
> target-finalize step. In addition to what's being removed already, we also have
> to cleanup some Qt5 specific files (prl) and the documentation directory.
> 
> This approach was chosen over copying all files recorded in the pkg-files-list
> after some discussion which Thomas Petazzoni summed up:
> "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."
> 
> 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.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

I've applied to master, after doing some small changes, see below.

> +An additional variable, specific to the QMake infrastructure, can
> +also be defined.
> +
> +* +LIBFOO_QMAKE_OPTS+, to specify additional options to pass to the
> +  +qmake+ script at every step of the package build process: configure,
> +  build and installation. By default, empty.

This option doesn't exist in your qmake-package infra, only CONF_OPTS
exists, so I've dropped this QMAKE_OPTS description.

> +define inner-qmake-package
> +
> +$(2)_CONF_ENV			?=
> +$(2)_CONF_OPTS			?=
> +$(2)_MAKE_ENV			?=
> +$(2)_MAKE_OPTS			?=
> +$(2)_INSTALL_STAGING_OPTS	?= install
> +$(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)

I've added a:

$(2)_DEPENDENCIES += qt5base

here, since all packages that use qmake-package need qmake, and qmake
is provided by qt5base.

Of course, I have then dropped the addition of qt5base as an explicit
dependency in the next patches.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 03/28] qt5: Convert straightforward packages to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 03/28] qt5: Convert straightforward packages to qmake infra Andreas Naumann
@ 2020-03-09 22:12   ` Thomas Petazzoni
  2020-03-10 18:09     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-09 22:12 UTC (permalink / raw)
  To: buildroot

Hello Andreas,

On Mon, 17 Feb 2020 22:23:25 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> This converts all qmake packages to the new infra for which no custom
> environments, option or additional hooks are needed.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

I've applied to master, after:

 (1) Splitting the qextserialport change to its own patch, since this
     package is not in package/qt5

 (2) Rebasing on master, where changes occurred with the removal of Qt
     5.6 support.

 (3) Dropping the explicit qt5base dependency, since it is now implied
     by the qmake-package infrastructure.

Do not hesitate to carefully review the patches I have pushed, it was a
lot of mechanical change, so a second review will certainly be good.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 04/28] package/qt5base: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 04/28] package/qt5base: Convert " Andreas Naumann
@ 2020-03-09 22:29   ` Thomas Petazzoni
  2020-03-10 18:20     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-09 22:29 UTC (permalink / raw)
  To: buildroot

Hello Andreas,

On Mon, 17 Feb 2020 22:23:26 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Convert build, staging and target install to the qmake infra commands.
> This removes a lot of conditional code because we solely rely on all install
> rules being properly generated according to the configured options.
> 
> Of course we keep the configure command/logic as is, because qmake does not
> yet exist.
> 
> Handling of the custom qt.conf is now done in the post staging hook.
> 
> Todo: Check if font install for 5.6 is still working.

This Todo is no longer relevant, as support for Qt 5.6 has been removed.

> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qt5/qt5base/qt5base.mk | 81 +---------------------------------
>  1 file changed, 2 insertions(+), 79 deletions(-)

I've applied this patch to master, after fixing the conflicts when
applying.

I also added a preliminary patch that changes pkg-qmake.mk to only add
qt5base as a dependency when the package is *not* qt5base, to avoid a
circular dependency.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
  2020-03-09 21:21   ` Thomas Petazzoni
@ 2020-03-09 22:42     ` Peter Seiderer
  2020-03-10  8:13       ` Thomas Petazzoni
  2020-03-10 17:02     ` Andreas Naumann
  1 sibling, 1 reply; 98+ messages in thread
From: Peter Seiderer @ 2020-03-09 22:42 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Mon, 9 Mar 2020 22:21:54 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:


> From package/qt5/Config.in:
>
> menuconfig BR2_PACKAGE_QT5
>         bool "Qt5"
>         depends on BR2_INSTALL_LIBSTDCPP
>         depends on BR2_USE_WCHAR
>         depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
>         depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
>         depends on !BR2_ARM_CPU_ARMV4 # needs ARMv5+
>         # no built-in double-conversion support
>         depends on !BR2_arc && !BR2_nios2 && !BR2_xtensa
>         depends on !BR2_STATIC_LIBS
>

That is funny, depends on !BR2_nios2 because of double conversion,
just fixed by 'package/qt5base: fix double-conversion compile for nios2' ([1]),
which was a autobuild failure..., but I think QT5 was enabled via
package/pinentry/Config.in without the '!BR2_arc && !BR2_nios2 && !BR2_xtensa'
dependency....

Seems !BR2_nios2 can be dropped immediately from QT5 and !BR2_xtensa' after
back porting the second part from [2]...

Regards,
Peter


[1] https://git.buildroot.net/buildroot/commit/?id=e2fdb41f711db8894f9c5c83f32250728d4c3aa9
[2] https://github.com/google/double-conversion/commit/a54561be5588ac9b16d3c20760b9b554168bb8aa

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

* [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
  2020-03-09 22:42     ` Peter Seiderer
@ 2020-03-10  8:13       ` Thomas Petazzoni
  2020-03-10  8:17         ` Peter Seiderer
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-10  8:13 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 9 Mar 2020 23:42:33 +0100
Peter Seiderer <ps.report@gmx.net> wrote:

> That is funny, depends on !BR2_nios2 because of double conversion,
> just fixed by 'package/qt5base: fix double-conversion compile for nios2' ([1]),
> which was a autobuild failure..., but I think QT5 was enabled via
> package/pinentry/Config.in without the '!BR2_arc && !BR2_nios2 && !BR2_xtensa'
> dependency....
> 
> Seems !BR2_nios2 can be dropped immediately from QT5 and !BR2_xtensa' after
> back porting the second part from [2]...

Indeed. Will you send some patches ?

Thanks for spotting this!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
  2020-03-10  8:13       ` Thomas Petazzoni
@ 2020-03-10  8:17         ` Peter Seiderer
  0 siblings, 0 replies; 98+ messages in thread
From: Peter Seiderer @ 2020-03-10  8:17 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Tue, 10 Mar 2020 09:13:10 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
>
> On Mon, 9 Mar 2020 23:42:33 +0100
> Peter Seiderer <ps.report@gmx.net> wrote:
>
> > That is funny, depends on !BR2_nios2 because of double conversion,
> > just fixed by 'package/qt5base: fix double-conversion compile for nios2' ([1]),
> > which was a autobuild failure..., but I think QT5 was enabled via
> > package/pinentry/Config.in without the '!BR2_arc && !BR2_nios2 && !BR2_xtensa'
> > dependency....
> >
> > Seems !BR2_nios2 can be dropped immediately from QT5 and !BR2_xtensa' after
> > back porting the second part from [2]...
>
> Indeed. Will you send some patches ?

Yes...

Regards,
Peter

>
> Thanks for spotting this!
>
> Thomas

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

* [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen
  2020-03-09 21:21   ` Thomas Petazzoni
  2020-03-09 22:42     ` Peter Seiderer
@ 2020-03-10 17:02     ` Andreas Naumann
  1 sibling, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-10 17:02 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 09.03.20 22:21, Thomas Petazzoni wrote:

> 
> So I don't think this patch is necessary, unless I missed something. 
> How did you test it?

I had in my original set (and tested it only back then). I didnt know if
Qt static build would ever be reenabled so I kept it. But it isnt
needed, so no problem omitting it.

regards,
Andreas

> 
> Thanks!
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 02/28] core/pkg-infra: Add generic qmake package infrastructure
  2020-03-09 22:10   ` Thomas Petazzoni
@ 2020-03-10 17:10     ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-10 17:10 UTC (permalink / raw)
  To: buildroot

Hi,

On 09.03.20 23:10, Thomas Petazzoni wrote:
> Hello Andreas,
> 
> On Mon, 17 Feb 2020 22:23:24 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> This provides generic functions for Qt5 qmake based packages. It will make it
>> possible to remove lots of redefinition of QT5_xxx_{CONFIGURE|BUILD|
>> INSTALL_STATGING}_CMDS. Additionally it provides a generic target install
>> method which will make most of the package specific commands obsolete.
>>
>> 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.
>> The cleanup of many files we dont want in target is deferred to the
>> target-finalize step. In addition to what's being removed already, we also have
>> to cleanup some Qt5 specific files (prl) and the documentation directory.
>>
>> This approach was chosen over copying all files recorded in the pkg-files-list
>> after some discussion which Thomas Petazzoni summed up:
>> "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."
>>
>> 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.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> 
> I've applied to master, after doing some small changes, see below.
> 
>> +An additional variable, specific to the QMake infrastructure, can
>> +also be defined.
>> +
>> +* +LIBFOO_QMAKE_OPTS+, to specify additional options to pass to the
>> +  +qmake+ script at every step of the package build process: configure,
>> +  build and installation. By default, empty.
> 
> This option doesn't exist in your qmake-package infra, only CONF_OPTS
> exists, so I've dropped this QMAKE_OPTS description.

of course, thanks.

> 
>> +define inner-qmake-package
>> +
>> +$(2)_CONF_ENV			?=
>> +$(2)_CONF_OPTS			?=
>> +$(2)_MAKE_ENV			?=
>> +$(2)_MAKE_OPTS			?=
>> +$(2)_INSTALL_STAGING_OPTS	?= install
>> +$(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)
> 
> I've added a:
> 
> $(2)_DEPENDENCIES += qt5base
> 
> here, since all packages that use qmake-package need qmake, and qmake
> is provided by qt5base.

I wasnt sure which way to go, but this is fine also.

regards,
Andreas

> 
> Of course, I have then dropped the addition of qt5base as an explicit
> dependency in the next patches.
> 
> Thanks!
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 03/28] qt5: Convert straightforward packages to qmake infra
  2020-03-09 22:12   ` Thomas Petazzoni
@ 2020-03-10 18:09     ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-10 18:09 UTC (permalink / raw)
  To: buildroot

Hi,

On 09.03.20 23:12, Thomas Petazzoni wrote:
> Hello Andreas,
> 
> On Mon, 17 Feb 2020 22:23:25 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> This converts all qmake packages to the new infra for which no custom
>> environments, option or additional hooks are needed.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> 
> I've applied to master, after:
> 
>   (1) Splitting the qextserialport change to its own patch, since this
>       package is not in package/qt5
> 
>   (2) Rebasing on master, where changes occurred with the removal of Qt
>       5.6 support.
> 
>   (3) Dropping the explicit qt5base dependency, since it is now implied
>       by the qmake-package infrastructure.
> 
> Do not hesitate to carefully review the patches I have pushed, it was a
> lot of mechanical change, so a second review will certainly be good.

As far as I could see it should fine.

Thanks,
Andreas



> 
> Thanks!
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 04/28] package/qt5base: Convert to qmake infra
  2020-03-09 22:29   ` Thomas Petazzoni
@ 2020-03-10 18:20     ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-10 18:20 UTC (permalink / raw)
  To: buildroot

Hi,

On 09.03.20 23:29, Thomas Petazzoni wrote:
> Hello Andreas,
> 
> On Mon, 17 Feb 2020 22:23:26 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> Convert build, staging and target install to the qmake infra commands.
>> This removes a lot of conditional code because we solely rely on all install
>> rules being properly generated according to the configured options.
>>
>> Of course we keep the configure command/logic as is, because qmake does not
>> yet exist.
>>
>> Handling of the custom qt.conf is now done in the post staging hook.
>>
>> Todo: Check if font install for 5.6 is still working.
> 
> This Todo is no longer relevant, as support for Qt 5.6 has been removed.
> 
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
>> ---
>>   package/qt5/qt5base/qt5base.mk | 81 +---------------------------------
>>   1 file changed, 2 insertions(+), 79 deletions(-)
> 
> I've applied this patch to master, after fixing the conflicts when
> applying.
> 
> I also added a preliminary patch that changes pkg-qmake.mk to only add
> qt5base as a dependency when the package is *not* qt5base, to avoid a
> circular dependency.

Ah yes, I didnt think of this when you changed patch 02. Now I'm really 
curious as to what the autobuilders say..

regards,
Andreas


> 
> Thanks!
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 05/28] package/qwt: Partially convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 05/28] package/qwt: Partially convert " Andreas Naumann
@ 2020-03-11 21:19   ` Thomas Petazzoni
  2020-03-14 20:58     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 21:19 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 17 Feb 2020 22:23:27 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

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

PRE_CONFIGURE_CMD is not a great name of a hook, as it doesn't say what
it does. So I renamed to QWT_TWEAK_QWTCONFIG_PRI, and applied.

Also, why can this package use INSTALL_ROOT in a "normal" way, i.e
INSTALL_ROOT=$(STAGING_DIR) and INSTALL_ROOT=$(TARGET_DIR) ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 07/28] package/qt5tools: Partially convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 07/28] package/qt5tools: Partially convert to qmake infra Andreas Naumann
@ 2020-03-11 21:22   ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 21:22 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:29 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Use generic configure command but for now keep custom build and
> install logic.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qt5/qt5tools/qt5tools.mk | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Applied to master, after dropping the qt5base dependency.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 08/28] package/qt5virtualkeyboard: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 08/28] package/qt5virtualkeyboard: Convert " Andreas Naumann
@ 2020-03-11 21:35   ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 21:35 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:30 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> It seems the old method was missing some files from the install
> step since after the conversion the the following additional files
> appear in target after a build with all config options selected:
> usr/lib/qt/plugins/lipi_toolkit/libactivedtw.so
> usr/lib/qt/plugins/lipi_toolkit/libboxfld.so
> usr/lib/qt/plugins/lipi_toolkit/libl7.so
> usr/lib/qt/plugins/lipi_toolkit/liblipiengine.so
> usr/lib/qt/plugins/lipi_toolkit/liblogger.so
> usr/lib/qt/plugins/lipi_toolkit/libneuralnet.so
> usr/lib/qt/plugins/lipi_toolkit/libnn.so
> usr/lib/qt/plugins/lipi_toolkit/libnpen.so
> usr/lib/qt/plugins/lipi_toolkit/libpointfloat.so
> usr/lib/qt/plugins/lipi_toolkit/libpreproc.so
> usr/lib/qt/plugins/lipi_toolkit/libsubstroke.so
> usr/lib/qt/plugins/virtualkeyboard/libqtvirtualkeyboard_lipi.so
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  .../qt5virtualkeyboard/qt5virtualkeyboard.mk  | 63 ++-----------------
>  1 file changed, 4 insertions(+), 59 deletions(-)

Applied to master after fixing the conflicts and dropping the qt5base
dependency. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 09/28] package/quazip: Convert to qmake infra
  2020-02-18 10:00     ` Andreas Naumann
@ 2020-03-11 21:42       ` Thomas Petazzoni
  2020-03-14 21:52         ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 21:42 UTC (permalink / raw)
  To: buildroot

On Tue, 18 Feb 2020 11:00:07 +0100
Andreas Naumann <dev@andin.de> wrote:

> > A prefix of $(STAGING_DIR)/usr looks wrong, as prefix is normally where
> > the things will be once installed in the target. Do we really need to
> > do this change?  
> 
> I agree it's probably not how PREFIX is intended to be used. But after 
> all the project doesnt seem to support cross-compile/install properly as 
> you can see by the need to explicitly set INSTALL_ROOT to a different 
> path for staging/target.

Well, in fact the current install procedure for quazip is perfect, as
you don't have to do the horrible rsync dance that we have to do for
other Qt packages. The fact that INSTALL_ROOT is different for staging
and target is *perfect*, it is exactly how INSTALL_ROOT should be have
in the first place: like DESTDIR.

So I'd really like to see more research done on this package, to
understand why we need to bogus PREFIX= variable, and make sure it
behaves like other packages.

It would in fact be ideal if all other Qt packages could properly
support INSTALL_ROOT like quazip does.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 10/28] package/qt5wayland: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 10/28] package/qt5wayland: " Andreas Naumann
@ 2020-03-11 21:48   ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 21:48 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:32 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Straightforward conversion except for the wayland-compositor configure
> option.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qt5/qt5wayland/qt5wayland.mk | 56 +---------------------------
>  1 file changed, 2 insertions(+), 54 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 11/28] package/qt5webchannel: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 11/28] package/qt5webchannel: " Andreas Naumann
@ 2020-03-11 21:49   ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 21:49 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:33 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> The install of the javascript is custom and thus needs to be kept.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qt5/qt5webchannel/qt5webchannel.mk | 39 ++--------------------
>  1 file changed, 2 insertions(+), 37 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 12/28] package/qt5webkit: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 12/28] package/qt5webkit: " Andreas Naumann
@ 2020-03-11 21:55   ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 21:55 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:34 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Mostly straightforward conversion.
> The jsc binary was not installed automatically. Unsure of its significance
> the custom install command is kept in a hook.
> 
> Note:
> The generic install creates QtWebProcess in /usr/libexec/ instead of /usr/bin.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qt5/qt5webkit/qt5webkit.mk | 29 +++++++----------------------
>  1 file changed, 7 insertions(+), 22 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 13/28] package/qt5webkit-examples: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 13/28] package/qt5webkit-examples: " Andreas Naumann
@ 2020-03-11 21:57   ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 21:57 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:35 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Straightforward conversion. Only conditional dependencies have to remain.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  .../qt5webkit-examples/qt5webkit-examples.mk  | 23 +------------------
>  1 file changed, 1 insertion(+), 22 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 14/28] package/qt5webengine: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 14/28] package/qt5webengine: " Andreas Naumann
@ 2020-03-11 22:01   ` Thomas Petazzoni
  2020-03-16 21:15     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 22:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 17 Feb 2020 22:23:36 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Mostly straightforward conversion but keeping custom config/build env
> to apply the python2 workaround.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

I've applied, but I have a comment, see below.

> +QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
> +QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)

I'm not really thrilled by this, and we had to do the same in
qt5webkit. This is modeled after the autotools-package infrastructure,
where normally environment variables passed to the ./configure script
don't need to be passed again at build time.

But if with qmake they are needed at both configure time and build
time, then perhaps we should change to have a single <pkg>_ENV
variable, passed at both configure and build time.

Let's see how many packages need this, and we'll adjust later if needed.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 15/28] package/qt-webkit-kiosk: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 15/28] package/qt-webkit-kiosk: " Andreas Naumann
@ 2020-03-11 22:04   ` Thomas Petazzoni
  2020-03-16 21:53     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 22:04 UTC (permalink / raw)
  To: buildroot

Hello Andreas,

On Mon, 17 Feb 2020 22:23:37 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Convert but keep the slightly complicated custom install step for now.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qt-webkit-kiosk/qt-webkit-kiosk.mk | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)

I've applied, but I have some comments below.

> 
> diff --git a/package/qt-webkit-kiosk/qt-webkit-kiosk.mk 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
>  
> -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 is not needed, as this is the default, and check-package complains
about this.

> +QT_WEBKIT_KIOSK_CONF_OPTS = PREFIX=/usr

Do you know why specifically for this package we need to pass
PREFIX=/usr, and not for any other qmake-based package ?

>  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

Any reason for these custom installation commands, rather than using
the package-provided installation logic ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 16/28] package/qt5cinex: Convert to qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 16/28] package/qt5cinex: " Andreas Naumann
@ 2020-03-11 22:06   ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 22:06 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:38 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Keep custom install logic because qt5cinex has no built-in install target.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/qt5cinex/qt5cinex.mk | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 17/28] core/pkg-infra: Fix package file statistics for parallel build
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 17/28] core/pkg-infra: Fix package file statistics for parallel build Andreas Naumann
@ 2020-03-11 22:07   ` Thomas Petazzoni
  2020-03-16 21:54     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 22:07 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 17 Feb 2020 22:23:39 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> When activating top level parallel build, multiple processes may
> try to modify the various *files-list* files in the common build/
> directory at the same time. This can cause racy build failures.
> 
> The fix here is to use flock to ensure exclusive execution of the
> statistics gathering code. For this to work it is assumed that the
> target/staging/host directories are isolated, which is true for
> per-package builds.
> For standard sequential builds, the locking is of course unnecessary
> but no conditional handling is implemented  since the runtime cost is
> expected to be next to nothing.
> 
> For flock to work, the statistics gathering code must be run in a
> single subshell. Otherwise the lockfile descriptor would be closed
> after the subshell (= the Makefile line where it was opened) ends
> and thus the lock would be released before even entering the critical
> code section.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

This is no longer needed: we have taken a different approach in commit
0e2be4db8ab01d479177a3a187c22525752195ae, where we make the logic
per-package, and collect the overall data in target-finalize.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make Andreas Naumann
@ 2020-03-11 22:25   ` Thomas Petazzoni
  2020-03-12 13:00     ` Arnout Vandecappelle
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 22:25 UTC (permalink / raw)
  To: buildroot

Hello,

Let's add Arnout in the loop, for the make sorcery.

On Mon, 17 Feb 2020 22:23:40 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Setting -O in top level make somehow interferes with the explicit setting of
> -jX in the cmake bootstrap script. Avoid passing down MAKEFLAGS in the configure
> case.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

This commit log was a bit vague on what the issue was. If I understand
correctly, what you see is that the "make" process running to build
host-cmake is constantly entering/leaving its build directory, like
this:

make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_rpm.c.o
make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_none.c.o
make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
[ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_program.c.o
make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'

Reading
https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html,
it seems like it is expected for -Otarget to behave like this. However,
if you use -Orecurse, it works as expected: the entire output of the
sub-make is buffered, and output in one-go when the make target at the
Buildroot level completes.

So I'm not sure we want to prevent -Otarget from doing what it does: we
should probably instead use -Orecurse.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build Andreas Naumann
@ 2020-03-11 22:30   ` Thomas Petazzoni
  2020-03-16 22:32     ` Andreas Naumann
  2020-07-01 21:56   ` Yann E. MORIN
  1 sibling, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-11 22:30 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 17 Feb 2020 22:23:43 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Since python-sip is not built by the qmake infra, we need to explicitly
> integrate the qt.conf fixup needed for successful per-package build and
> consistently use qmake via QT5_QMAKE variable.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>  package/python-sip/python-sip.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/python-sip/python-sip.mk b/package/python-sip/python-sip.mk
> index 1d6c205396..7ae2d43e1e 100644
> --- a/package/python-sip/python-sip.mk
> +++ b/package/python-sip/python-sip.mk
> @@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
>  endef
>  
>  define PYTHON_SIP_CONFIGURE_CMDS
> +	$(QT5_QT_CONF_FIXUP)
>  	(cd $(@D); \
>  		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
>  			--bindir $(TARGET_DIR)/usr/bin \
> @@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
>  			--sipdir $(TARGET_DIR)/usr/share/sip \
>  			--sysroot $(STAGING_DIR)/usr \
>  			--use-qmake && \
> -		$(HOST_DIR)/bin/qmake)
> +		$(QT5_QMAKE))

Isn't this change a fix, independent from the per-package support ?

QT5_QMAKE is defined as follows:

QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++

So it means that python-sip was not using the
devices/linux-buildroot-g++ spec file ? If that's the case, then this
is something that should be fixed separately from the per-package
support I believe.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency Andreas Naumann
@ 2020-03-12  8:15   ` Thomas Petazzoni
  2020-03-16 22:40     ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-12  8:15 UTC (permalink / raw)
  To: buildroot

On Mon, 17 Feb 2020 22:23:45 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> Fixes a build failure.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

Could you provide the Buildroot configuration that exhibits the issue?
I've been trying to create a configuration that builds qt5webengine
with X.org enabled, and no matter what I do, the OpenGL provider I use
selects libxdamage, so I don't have a configuration that combines
qt5webengine and X.org, but without having libxdamage.

Also, what was the build failure ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-11 22:25   ` Thomas Petazzoni
@ 2020-03-12 13:00     ` Arnout Vandecappelle
  2020-03-12 13:22       ` Thomas Petazzoni
  2020-03-16 22:15       ` Andreas Naumann
  0 siblings, 2 replies; 98+ messages in thread
From: Arnout Vandecappelle @ 2020-03-12 13:00 UTC (permalink / raw)
  To: buildroot



On 11/03/2020 23:25, Thomas Petazzoni wrote:
> Hello,
> 
> Let's add Arnout in the loop, for the make sorcery.

 Not much sorcery going on here...

> On Mon, 17 Feb 2020 22:23:40 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> Setting -O in top level make somehow interferes with the explicit setting of
>> -jX in the cmake bootstrap script. Avoid passing down MAKEFLAGS in the configure
>> case.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> 
> This commit log was a bit vague on what the issue was. If I understand
> correctly, what you see is that the "make" process running to build
> host-cmake is constantly entering/leaving its build directory, like
> this:
> 
> make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
> [ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_rpm.c.o
> make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
> make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
> [ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_none.c.o
> make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
> make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
> [ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_program.c.o
> make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
> 
> Reading
> https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html,
> it seems like it is expected for -Otarget to behave like this.

Indeed, looks exactly like expected.

> However,
> if you use -Orecurse, it works as expected: the entire output of the
> sub-make is buffered, and output in one-go when the make target at the
> Buildroot level completes.
> 
> So I'm not sure we want to prevent -Otarget from doing what it does: we
> should probably instead use -Orecurse.


 Where do we pass -Otarget to begin with?

 There could be something to be set for globall resetting MAKEFLAGS and taking
control over the make flags entirely from Buildroot infra when calling into
package build systems. However, this is a bit complicated in make, and I'm not
entirely convinced we really want that...

 Regards,
 Arnout

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-12 13:00     ` Arnout Vandecappelle
@ 2020-03-12 13:22       ` Thomas Petazzoni
  2020-03-16 22:15       ` Andreas Naumann
  1 sibling, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-12 13:22 UTC (permalink / raw)
  To: buildroot

On Thu, 12 Mar 2020 14:00:24 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:

> > Reading
> > https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html,
> > it seems like it is expected for -Otarget to behave like this.  
> 
> Indeed, looks exactly like expected.
> 
> > However,
> > if you use -Orecurse, it works as expected: the entire output of the
> > sub-make is buffered, and output in one-go when the make target at the
> > Buildroot level completes.
> > 
> > So I'm not sure we want to prevent -Otarget from doing what it does: we
> > should probably instead use -Orecurse.  
> 
> 
>  Where do we pass -Otarget to begin with?

We don't. But I guess Andreas is using "make -Otarget" as it is
using/testing top-level parallel build and it doesn't want messed up
build log.

>  There could be something to be set for globall resetting MAKEFLAGS and taking
> control over the make flags entirely from Buildroot infra when calling into
> package build systems. However, this is a bit complicated in make, and I'm not
> entirely convinced we really want that...

And I assume we wouldn't want to solve on that on a per-package basis,
but rather more globally for all packages.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 05/28] package/qwt: Partially convert to qmake infra
  2020-03-11 21:19   ` Thomas Petazzoni
@ 2020-03-14 20:58     ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-14 20:58 UTC (permalink / raw)
  To: buildroot

Hi,

On 11.03.20 22:19, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon, 17 Feb 2020 22:23:27 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> -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
> 
> PRE_CONFIGURE_CMD is not a great name of a hook, as it doesn't say what
> it does. So I renamed to QWT_TWEAK_QWTCONFIG_PRI, and applied.

Sounds better, yes.

> 
> Also, why can this package use INSTALL_ROOT in a "normal" way, i.e
> INSTALL_ROOT=$(STAGING_DIR) and INSTALL_ROOT=$(TARGET_DIR) ?

I guess the qwt project does not install anything in host so there's no 
need for us to separate the host from the target files. Which is why we 
cant use the INSTALL_ROOT method for other qt modules (and keep things 
generic).
I didnt entirely understand the additional modification in the staging 
install so just kept the install steps as is. Looking into it now I see 
a 'rm -Rf $(TARGET_DIR)/usr/mkspecs' in the target install which makes 
my assumption above invalid. So yes, maybe the install steps could be 
simplified by using the new pkg-qmake method.

best regards,
Andreas




> 
> Best regards,
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 09/28] package/quazip: Convert to qmake infra
  2020-03-11 21:42       ` Thomas Petazzoni
@ 2020-03-14 21:52         ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-14 21:52 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 11.03.20 22:42, Thomas Petazzoni wrote:
> On Tue, 18 Feb 2020 11:00:07 +0100
> Andreas Naumann <dev@andin.de> wrote:
> 
>>> A prefix of $(STAGING_DIR)/usr looks wrong, as prefix is normally where
>>> the things will be once installed in the target. Do we really need to
>>> do this change?
>>
>> I agree it's probably not how PREFIX is intended to be used. But after
>> all the project doesnt seem to support cross-compile/install properly as
>> you can see by the need to explicitly set INSTALL_ROOT to a different
>> path for staging/target.
> 
> Well, in fact the current install procedure for quazip is perfect, as
> you don't have to do the horrible rsync dance that we have to do for
> other Qt packages. The fact that INSTALL_ROOT is different for staging
> and target is *perfect*, it is exactly how INSTALL_ROOT should be have
> in the first place: like DESTDIR.

I couldn't agree more, if INSTALL_ROOT would not touch the destination 
for host-files the whole thing would be much easier. But, it isnt that 
quazip works better than other packages. It's just simpler because it 
doesnt have any files for host.

> 
> So I'd really like to see more research done on this package, to
> understand why we need to bogus PREFIX= variable, and make sure it
> behaves like other packages.

Again, the quazip.pro uses PREFIX directly as install destination, so 
it's not aware of the sysroot/staging pathes for cross-compiles. This 
could probably be changed by patching it to use QT_INSTALL_PREFIX (which 
is prefixed with the staging path, if set). I dont know if that would 
break other things or require more changes in the project file.

> 
> It would in fact be ideal if all other Qt packages could properly
> support INSTALL_ROOT like quazip does.

See above. It's not the packages fault but how qmake uses INSTALL_ROOT.


best regards,
Andreas


> 
> Best regards,
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 14/28] package/qt5webengine: Convert to qmake infra
  2020-03-11 22:01   ` Thomas Petazzoni
@ 2020-03-16 21:15     ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-16 21:15 UTC (permalink / raw)
  To: buildroot

Hi,

On 11.03.20 23:01, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon, 17 Feb 2020 22:23:36 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> Mostly straightforward conversion but keeping custom config/build env
>> to apply the python2 workaround.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> 
> I've applied, but I have a comment, see below.
> 
>> +QT5WEBENGINE_CONF_ENV = $(QT5WEBENGINE_ENV)
>> +QT5WEBENGINE_MAKE_ENV = $(QT5WEBENGINE_ENV)
> 
> I'm not really thrilled by this, and we had to do the same in
> qt5webkit. This is modeled after the autotools-package infrastructure,
> where normally environment variables passed to the ./configure script
> don't need to be passed again at build time.
> 
> But if with qmake they are needed at both configure time and build
> time, then perhaps we should change to have a single <pkg>_ENV
> variable, passed at both configure and build time.

Actually I dont know which of the env settings are needed at configure 
time and which at build time or both. I've just kept the logic as it was.

regards,
Andreas

> 
> Let's see how many packages need this, and we'll adjust later if needed.
> 
> Best regards,
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 15/28] package/qt-webkit-kiosk: Convert to qmake infra
  2020-03-11 22:04   ` Thomas Petazzoni
@ 2020-03-16 21:53     ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-16 21:53 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 11.03.20 23:04, Thomas Petazzoni wrote:
> Hello Andreas,
> 
> On Mon, 17 Feb 2020 22:23:37 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> Convert but keep the slightly complicated custom install step for now.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
>> ---
>>   package/qt-webkit-kiosk/qt-webkit-kiosk.mk | 11 +++--------
>>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> I've applied, but I have some comments below.
> 
>>
>> diff --git a/package/qt-webkit-kiosk/qt-webkit-kiosk.mk 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
>>   
>> -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 is not needed, as this is the default, and check-package complains
> about this.
> 

Ok.

>> +QT_WEBKIT_KIOSK_CONF_OPTS = PREFIX=/usr
> 
> Do you know why specifically for this package we need to pass
> PREFIX=/usr, and not for any other qmake-based package ?

Well, it's the same for quazip and other application projects I've seen: 
They dont use the default install paths of the corresponding qmake 
(QT_INSTALL_PREFIX|DATA|DOCS|LIBS|BINS|...), but define their own. This 
is fair enough but usually results in ignoring the knowledge about 
sysroot/staging destination which qmake does have. This information then 
has to be put into the INSTALL_ROOT variable in case of cross-compile.

> 
>>   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
> 
> Any reason for these custom installation commands, rather than using
> the package-provided installation logic ?

Uh, I dont remember. Probably the default didnt work or me being lazy to 
not having to test even more.

regards,
Andreas

> 
> Thanks!
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 17/28] core/pkg-infra: Fix package file statistics for parallel build
  2020-03-11 22:07   ` Thomas Petazzoni
@ 2020-03-16 21:54     ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-16 21:54 UTC (permalink / raw)
  To: buildroot

Hi,

On 11.03.20 23:07, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon, 17 Feb 2020 22:23:39 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> When activating top level parallel build, multiple processes may
>> try to modify the various *files-list* files in the common build/
>> directory at the same time. This can cause racy build failures.
>>
>> The fix here is to use flock to ensure exclusive execution of the
>> statistics gathering code. For this to work it is assumed that the
>> target/staging/host directories are isolated, which is true for
>> per-package builds.
>> For standard sequential builds, the locking is of course unnecessary
>> but no conditional handling is implemented  since the runtime cost is
>> expected to be next to nothing.
>>
>> For flock to work, the statistics gathering code must be run in a
>> single subshell. Otherwise the lockfile descriptor would be closed
>> after the subshell (= the Makefile line where it was opened) ends
>> and thus the lock would be released before even entering the critical
>> code section.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> 
> This is no longer needed: we have taken a different approach in commit
> 0e2be4db8ab01d479177a3a187c22525752195ae, where we make the logic
> per-package, and collect the overall data in target-finalize.

I'm very glad as I wasnt too happy about this.

regards,
Andreas

> 
> Thanks,
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-12 13:00     ` Arnout Vandecappelle
  2020-03-12 13:22       ` Thomas Petazzoni
@ 2020-03-16 22:15       ` Andreas Naumann
  2020-03-17  6:08         ` Thomas Petazzoni
  1 sibling, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-03-16 22:15 UTC (permalink / raw)
  To: buildroot

Hi,

On 12.03.20 14:00, Arnout Vandecappelle wrote:
> 
> 
> On 11/03/2020 23:25, Thomas Petazzoni wrote:
>> Hello,
>>
>> Let's add Arnout in the loop, for the make sorcery.
> 
>   Not much sorcery going on here...
> 
>> On Mon, 17 Feb 2020 22:23:40 +0100
>> Andreas Naumann <anaumann@ultratronik.de> wrote:
>>
>>> Setting -O in top level make somehow interferes with the explicit setting of
>>> -jX in the cmake bootstrap script. Avoid passing down MAKEFLAGS in the configure
>>> case.
>>>
>>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
>>
>> This commit log was a bit vague on what the issue was. If I understand

The issue was that the cmake configure step stopped with an error if I 
used the -O option. I dont think it was related to which output strategy 
was used.

>> correctly, what you see is that the "make" process running to build
>> host-cmake is constantly entering/leaving its build directory, like
>> this:
>>
>> make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
>> [ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_rpm.c.o
>> make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
>> make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
>> [ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_none.c.o
>> make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
>> make[3]: Entering directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
>> [ 50%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_read_support_filter_program.c.o
>> make[3]: Leaving directory '/home/thomas/projets/buildroot/output/build/host-cmake-3.15.5'
>>
>> Reading
>> https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html,
>> it seems like it is expected for -Otarget to behave like this.
> 
> Indeed, looks exactly like expected. >
>> However,
>> if you use -Orecurse, it works as expected: the entire output of the
>> sub-make is buffered, and output in one-go when the make target at the
>> Buildroot level completes.

I dont mind the entering/leaving info. Rather I thought -Orecurse would 
buffer everything to the end of the buildroot process, which is not what 
I wanted.

>>
>> So I'm not sure we want to prevent -Otarget from doing what it does: we
>> should probably instead use -Orecurse.
> 
> 
>   Where do we pass -Otarget to begin with?

I did after brmake.

> 
>   There could be something to be set for globall resetting MAKEFLAGS and taking
> control over the make flags entirely from Buildroot infra when calling into
> package build systems. However, this is a bit complicated in make, and I'm not
> entirely convinced we really want that...

Hmm, I have not seen problems anywhere else with the -O option. Just in 
this case the configure step died. After some fiddling I found out it's 
connected to what the bootstrap script does with the option 
--parallel=$(PARALLEL_JOBS). If the --parallel option was not used then 
-Oxxx was not a problem, but of course, the build used one core only.


regards,
Andreas




> 
>   Regards,
>   Arnout
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

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

* [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build
  2020-03-11 22:30   ` Thomas Petazzoni
@ 2020-03-16 22:32     ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-16 22:32 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 11.03.20 23:30, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon, 17 Feb 2020 22:23:43 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> Since python-sip is not built by the qmake infra, we need to explicitly
>> integrate the qt.conf fixup needed for successful per-package build and
>> consistently use qmake via QT5_QMAKE variable.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
>> ---
>>   package/python-sip/python-sip.mk | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/python-sip/python-sip.mk b/package/python-sip/python-sip.mk
>> index 1d6c205396..7ae2d43e1e 100644
>> --- a/package/python-sip/python-sip.mk
>> +++ b/package/python-sip/python-sip.mk
>> @@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
>>   endef
>>   
>>   define PYTHON_SIP_CONFIGURE_CMDS
>> +	$(QT5_QT_CONF_FIXUP)
>>   	(cd $(@D); \
>>   		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
>>   			--bindir $(TARGET_DIR)/usr/bin \
>> @@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
>>   			--sipdir $(TARGET_DIR)/usr/share/sip \
>>   			--sysroot $(STAGING_DIR)/usr \
>>   			--use-qmake && \
>> -		$(HOST_DIR)/bin/qmake)
>> +		$(QT5_QMAKE))
> 
> Isn't this change a fix, independent from the per-package support ?

The QT5_QT_CONF_FIXUP is needed so python-sip doesnt litter qt5base 
during install, see patch 19. So no, this is per-package specific.

> 
> QT5_QMAKE is defined as follows:
> 
> QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
> 
> So it means that python-sip was not using the
> devices/linux-buildroot-g++ spec file ? If that's the case, then this

Well, our qmake QMAKE_XSPEC is set to devices/linux-buildroot-g++ per 
default anyway so there was no problem in not explicitly setting it.
We do however need to use QT5_QMAKE to fix the problems described in 
patch 20.


best regards,
Andreas



> is something that should be fixed separately from the per-package
> support I believe.
> 
> Best regards,
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency
  2020-03-12  8:15   ` Thomas Petazzoni
@ 2020-03-16 22:40     ` Andreas Naumann
  2020-03-22 21:58       ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-03-16 22:40 UTC (permalink / raw)
  To: buildroot

Hi,

On 12.03.20 09:15, Thomas Petazzoni wrote:
> On Mon, 17 Feb 2020 22:23:45 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> Fixes a build failure.
>>
>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> 
> Could you provide the Buildroot configuration that exhibits the issue?

it was imx6-sabresd_qt5_defconfig plus everything Qt I could find. See 
cover letter near the end.

> I've been trying to create a configuration that builds qt5webengine
> with X.org enabled, and no matter what I do, the OpenGL provider I use
> selects libxdamage, so I don't have a configuration that combines
> qt5webengine and X.org, but without having libxdamage.

Maybe this was fixed with e79ee3b, I will try again.


regards,
Andreas

> 
> Also, what was the build failure ?
> 
> Thanks!
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-16 22:15       ` Andreas Naumann
@ 2020-03-17  6:08         ` Thomas Petazzoni
  2020-03-17 19:02           ` Asaf Kahlon
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-17  6:08 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 16 Mar 2020 23:15:24 +0100
Andreas Naumann <dev@andin.de> wrote:

> >> This commit log was a bit vague on what the issue was. If I understand  
> 
> The issue was that the cmake configure step stopped with an error if I 
> used the -O option. I dont think it was related to which output strategy 
> was used.

I have not been able to reproduce the CMake configure step failure
then. Are you still able to reproduce this? If so, could you provide
more details about the setup: make version being, exact command line,
Buildroot version, etc ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-17  6:08         ` Thomas Petazzoni
@ 2020-03-17 19:02           ` Asaf Kahlon
  2020-03-18 15:35             ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Asaf Kahlon @ 2020-03-17 19:02 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, Mar 17, 2020 at 8:08 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Mon, 16 Mar 2020 23:15:24 +0100
> Andreas Naumann <dev@andin.de> wrote:
>
> > >> This commit log was a bit vague on what the issue was. If I understand
> >
> > The issue was that the cmake configure step stopped with an error if I
> > used the -O option. I dont think it was related to which output strategy
> > was used.
>
> I have not been able to reproduce the CMake configure step failure
> then. Are you still able to reproduce this? If so, could you provide
> more details about the setup: make version being, exact command line,
> Buildroot version, etc ?

I had this problem too, but currently I can't reproduce it.
I'm still trying to reproduce and will update, but for the meantime:
* My Buildroot version is 2020.02
* The command I used was: make -j9 --output-sync=target
* The CMake configure step failed. On the CMake log I saw the following message:
   ccache: invalid option -- 'O'
It seems like somehow the -O flag (==output-sync) was passed directly to ccache.

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

Regards,
Asaf.

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-17 19:02           ` Asaf Kahlon
@ 2020-03-18 15:35             ` Andreas Naumann
  2020-03-18 18:59               ` Asaf Kahlon
  0 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-03-18 15:35 UTC (permalink / raw)
  To: buildroot

Hi,

On 17.03.20 20:02, Asaf Kahlon wrote:
> Hello,
> 
> On Tue, Mar 17, 2020 at 8:08 AM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
>>
>> Hello,
>>
>> On Mon, 16 Mar 2020 23:15:24 +0100
>> Andreas Naumann <dev@andin.de> wrote:
>>
>>>>> This commit log was a bit vague on what the issue was. If I understand
>>>
>>> The issue was that the cmake configure step stopped with an error if I
>>> used the -O option. I dont think it was related to which output strategy
>>> was used.
>>
>> I have not been able to reproduce the CMake configure step failure
>> then. Are you still able to reproduce this? If so, could you provide
>> more details about the setup: make version being, exact command line,
>> Buildroot version, etc ?
> 
> I had this problem too, but currently I can't reproduce it.
> I'm still trying to reproduce and will update, but for the meantime:
> * My Buildroot version is 2020.02
> * The command I used was: make -j9 --output-sync=target
> * The CMake configure step failed. On the CMake log I saw the following message:
>     ccache: invalid option -- 'O'
> It seems like somehow the -O flag (==output-sync) was passed directly to ccache.

I'm not using ccache at the moment and I dont get a sensible error 
message. But seeing your error message I recognize it because probably I 
used ccache back when I made the patch.

Now after testing again with master (0f0868a) I can state the following:

Build breaks during configure (bootstrap) phase when running
*  make -j2 -Oline host-cmake
*  make -j2 -Otarget host-cmake
with
   Error when bootstrapping CMake:
   Problem while running make
   ---------------------------------------------
   Log of errors: 
/home/yocto/anaumann/buildroot-qmake-v6/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake_bootstrap.log

Looking at the logfile I cant figure out what the problem is.

The build succeeds with
*  make -j2 host-cmake
*  make -j2 -Onone host-cmake
*  make -j2 -Orecurse host-cmake

My assumption is that the problem lies in passing certain MAKEFLAGS for 
a parallel build while not passing -jxxx itself but using the 
--parallel=$(PARALLEL_JOBS) option. The bootstrap script then somehow 
reassembles the -jxxx option and certain ${cmake_make_flags} in an 
incompatible way (at least for -Oline and -Otarget).

I use GNU Make 4.1.

best regards,
Andreas


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

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-18 15:35             ` Andreas Naumann
@ 2020-03-18 18:59               ` Asaf Kahlon
  2020-03-18 21:03                 ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Asaf Kahlon @ 2020-03-18 18:59 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, Mar 18, 2020 at 5:35 PM Andreas Naumann <dev@andin.de> wrote:
>
> Hi,
>
> On 17.03.20 20:02, Asaf Kahlon wrote:
> > Hello,
> >
> > On Tue, Mar 17, 2020 at 8:08 AM Thomas Petazzoni
> > <thomas.petazzoni@bootlin.com> wrote:
> >>
> >> Hello,
> >>
> >> On Mon, 16 Mar 2020 23:15:24 +0100
> >> Andreas Naumann <dev@andin.de> wrote:
> >>
> >>>>> This commit log was a bit vague on what the issue was. If I understand
> >>>
> >>> The issue was that the cmake configure step stopped with an error if I
> >>> used the -O option. I dont think it was related to which output strategy
> >>> was used.
> >>
> >> I have not been able to reproduce the CMake configure step failure
> >> then. Are you still able to reproduce this? If so, could you provide
> >> more details about the setup: make version being, exact command line,
> >> Buildroot version, etc ?
> >
> > I had this problem too, but currently I can't reproduce it.
> > I'm still trying to reproduce and will update, but for the meantime:
> > * My Buildroot version is 2020.02
> > * The command I used was: make -j9 --output-sync=target
> > * The CMake configure step failed. On the CMake log I saw the following message:
> >     ccache: invalid option -- 'O'
> > It seems like somehow the -O flag (==output-sync) was passed directly to ccache.
>
> I'm not using ccache at the moment and I dont get a sensible error
> message. But seeing your error message I recognize it because probably I
> used ccache back when I made the patch.
>
> Now after testing again with master (0f0868a) I can state the following:
>
> Build breaks during configure (bootstrap) phase when running
> *  make -j2 -Oline host-cmake
> *  make -j2 -Otarget host-cmake
> with
>    Error when bootstrapping CMake:
>    Problem while running make
>    ---------------------------------------------
>    Log of errors:
> /home/yocto/anaumann/buildroot-qmake-v6/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake_bootstrap.log
>
> Looking at the logfile I cant figure out what the problem is.
>
> The build succeeds with
> *  make -j2 host-cmake
> *  make -j2 -Onone host-cmake
> *  make -j2 -Orecurse host-cmake
>
> My assumption is that the problem lies in passing certain MAKEFLAGS for
> a parallel build while not passing -jxxx itself but using the
> --parallel=$(PARALLEL_JOBS) option. The bootstrap script then somehow
> reassembles the -jxxx option and certain ${cmake_make_flags} in an
> incompatible way (at least for -Oline and -Otarget).
>
> I use GNU Make 4.1.

This line made me suspect the make version.
I use make 4.2.1 and it always works for me.
I tried to reproduce it on a docker with make 4.1 and it instantly reproduced.
When I installed on the docker container Make 4.2.1 - it worked.
Can this be a bug in Make?

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

Regards,
Asaf.

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-18 18:59               ` Asaf Kahlon
@ 2020-03-18 21:03                 ` Andreas Naumann
  2020-03-19 11:40                   ` Asaf Kahlon
  0 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-03-18 21:03 UTC (permalink / raw)
  To: buildroot

Hi,

On 18.03.20 19:59, Asaf Kahlon wrote:
> Hello,
> 
> On Wed, Mar 18, 2020 at 5:35 PM Andreas Naumann <dev@andin.de> wrote:
>>
>> Hi,
>>
>> On 17.03.20 20:02, Asaf Kahlon wrote:
>>> Hello,
>>>
>>> On Tue, Mar 17, 2020 at 8:08 AM Thomas Petazzoni
>>> <thomas.petazzoni@bootlin.com> wrote:
>>>>
>>>> Hello,
>>>>
>>>> On Mon, 16 Mar 2020 23:15:24 +0100
>>>> Andreas Naumann <dev@andin.de> wrote:
>>>>
>>>>>>> This commit log was a bit vague on what the issue was. If I understand
>>>>>
>>>>> The issue was that the cmake configure step stopped with an error if I
>>>>> used the -O option. I dont think it was related to which output strategy
>>>>> was used.
>>>>
>>>> I have not been able to reproduce the CMake configure step failure
>>>> then. Are you still able to reproduce this? If so, could you provide
>>>> more details about the setup: make version being, exact command line,
>>>> Buildroot version, etc ?
>>>
>>> I had this problem too, but currently I can't reproduce it.
>>> I'm still trying to reproduce and will update, but for the meantime:
>>> * My Buildroot version is 2020.02
>>> * The command I used was: make -j9 --output-sync=target
>>> * The CMake configure step failed. On the CMake log I saw the following message:
>>>      ccache: invalid option -- 'O'
>>> It seems like somehow the -O flag (==output-sync) was passed directly to ccache.
>>
>> I'm not using ccache at the moment and I dont get a sensible error
>> message. But seeing your error message I recognize it because probably I
>> used ccache back when I made the patch.
>>
>> Now after testing again with master (0f0868a) I can state the following:
>>
>> Build breaks during configure (bootstrap) phase when running
>> *  make -j2 -Oline host-cmake
>> *  make -j2 -Otarget host-cmake
>> with
>>     Error when bootstrapping CMake:
>>     Problem while running make
>>     ---------------------------------------------
>>     Log of errors:
>> /home/yocto/anaumann/buildroot-qmake-v6/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake_bootstrap.log
>>
>> Looking at the logfile I cant figure out what the problem is.
>>
>> The build succeeds with
>> *  make -j2 host-cmake
>> *  make -j2 -Onone host-cmake
>> *  make -j2 -Orecurse host-cmake
>>
>> My assumption is that the problem lies in passing certain MAKEFLAGS for
>> a parallel build while not passing -jxxx itself but using the
>> --parallel=$(PARALLEL_JOBS) option. The bootstrap script then somehow
>> reassembles the -jxxx option and certain ${cmake_make_flags} in an
>> incompatible way (at least for -Oline and -Otarget).
>>
>> I use GNU Make 4.1.
> 
> This line made me suspect the make version.
> I use make 4.2.1 and it always works for me.
> I tried to reproduce it on a docker with make 4.1 and it instantly reproduced.
> When I installed on the docker container Make 4.2.1 - it worked.
> Can this be a bug in Make?

I tried 4.2.1 as well and the issue is gone. In the changelog for 4.2 at 
https://lists.gnu.org/archive/html/info-gnu/2016-05/msg00013.html I found:
* main.c(main): Disable output sync without parallel builds.
To me it seems like this could be the culprit. The question is, what 
should we do with this? Check for Make version < 4.2 && -j && -O and 
give a warning? Maybe this is a bit too much.

regards,
Andreas

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

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-18 21:03                 ` Andreas Naumann
@ 2020-03-19 11:40                   ` Asaf Kahlon
  2020-03-19 12:49                     ` Thomas Petazzoni
  0 siblings, 1 reply; 98+ messages in thread
From: Asaf Kahlon @ 2020-03-19 11:40 UTC (permalink / raw)
  To: buildroot

Hi,

On Wed, Mar 18, 2020 at 11:03 PM Andreas Naumann <dev@andin.de> wrote:
>
> Hi,
>
> On 18.03.20 19:59, Asaf Kahlon wrote:
> > Hello,
> >
> > On Wed, Mar 18, 2020 at 5:35 PM Andreas Naumann <dev@andin.de> wrote:
> >>
> >> Hi,
> >>
> >> On 17.03.20 20:02, Asaf Kahlon wrote:
> >>> Hello,
> >>>
> >>> On Tue, Mar 17, 2020 at 8:08 AM Thomas Petazzoni
> >>> <thomas.petazzoni@bootlin.com> wrote:
> >>>>
> >>>> Hello,
> >>>>
> >>>> On Mon, 16 Mar 2020 23:15:24 +0100
> >>>> Andreas Naumann <dev@andin.de> wrote:
> >>>>
> >>>>>>> This commit log was a bit vague on what the issue was. If I understand
> >>>>>
> >>>>> The issue was that the cmake configure step stopped with an error if I
> >>>>> used the -O option. I dont think it was related to which output strategy
> >>>>> was used.
> >>>>
> >>>> I have not been able to reproduce the CMake configure step failure
> >>>> then. Are you still able to reproduce this? If so, could you provide
> >>>> more details about the setup: make version being, exact command line,
> >>>> Buildroot version, etc ?
> >>>
> >>> I had this problem too, but currently I can't reproduce it.
> >>> I'm still trying to reproduce and will update, but for the meantime:
> >>> * My Buildroot version is 2020.02
> >>> * The command I used was: make -j9 --output-sync=target
> >>> * The CMake configure step failed. On the CMake log I saw the following message:
> >>>      ccache: invalid option -- 'O'
> >>> It seems like somehow the -O flag (==output-sync) was passed directly to ccache.
> >>
> >> I'm not using ccache at the moment and I dont get a sensible error
> >> message. But seeing your error message I recognize it because probably I
> >> used ccache back when I made the patch.
> >>
> >> Now after testing again with master (0f0868a) I can state the following:
> >>
> >> Build breaks during configure (bootstrap) phase when running
> >> *  make -j2 -Oline host-cmake
> >> *  make -j2 -Otarget host-cmake
> >> with
> >>     Error when bootstrapping CMake:
> >>     Problem while running make
> >>     ---------------------------------------------
> >>     Log of errors:
> >> /home/yocto/anaumann/buildroot-qmake-v6/output/build/host-cmake-3.15.5/Bootstrap.cmk/cmake_bootstrap.log
> >>
> >> Looking at the logfile I cant figure out what the problem is.
> >>
> >> The build succeeds with
> >> *  make -j2 host-cmake
> >> *  make -j2 -Onone host-cmake
> >> *  make -j2 -Orecurse host-cmake
> >>
> >> My assumption is that the problem lies in passing certain MAKEFLAGS for
> >> a parallel build while not passing -jxxx itself but using the
> >> --parallel=$(PARALLEL_JOBS) option. The bootstrap script then somehow
> >> reassembles the -jxxx option and certain ${cmake_make_flags} in an
> >> incompatible way (at least for -Oline and -Otarget).
> >>
> >> I use GNU Make 4.1.
> >
> > This line made me suspect the make version.
> > I use make 4.2.1 and it always works for me.
> > I tried to reproduce it on a docker with make 4.1 and it instantly reproduced.
> > When I installed on the docker container Make 4.2.1 - it worked.
> > Can this be a bug in Make?
>
> I tried 4.2.1 as well and the issue is gone. In the changelog for 4.2 at
> https://lists.gnu.org/archive/html/info-gnu/2016-05/msg00013.html I found:
> * main.c(main): Disable output sync without parallel builds.
Actually, this commit was not the one which fixes the bug (although I
also suspected it
because of the commit title).
I did a git-bisect from 4.1 to 4.2 and found out the commit was fb7a7ad
(Extract jobserver implementation into OS-specific files.)

> To me it seems like this could be the culprit. The question is, what
> should we do with this? Check for Make version < 4.2 && -j && -O and
> give a warning? Maybe this is a bit too much.
We now check for make>4.0. Do we want to bump it?
Maybe some of the core Buildroot maintainers can give their advice here.

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

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-19 11:40                   ` Asaf Kahlon
@ 2020-03-19 12:49                     ` Thomas Petazzoni
  2020-03-19 13:53                       ` Asaf Kahlon
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-19 12:49 UTC (permalink / raw)
  To: buildroot

On Thu, 19 Mar 2020 13:40:36 +0200
Asaf Kahlon <asafka7@gmail.com> wrote:

> > To me it seems like this could be the culprit. The question is, what
> > should we do with this? Check for Make version < 4.2 && -j && -O and
> > give a warning? Maybe this is a bit too much.  
> We now check for make>4.0. Do we want to bump it?
> Maybe some of the core Buildroot maintainers can give their advice here.

We don't require make 4.0, we only require make 3.81.

The logic in support/dependencies/check-host-make.mk to check for make
4.0 is only for those few packages that do need make >= 4.0. For such
packages, if the version of make installed system-wide is < 4.0, then
we build our own host-make. But the overall Buildroot build is still
executed by the system-wide make, which may be < 4.0.

Requiring make > 4.0 on the host system is too strict, especially
considering that the issue we have here only happens in very specific
conditions: ccache support enabled, and passing of custom -O flags that
are only useful for top-level parallel build, which is itself an
experimental feature.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-19 12:49                     ` Thomas Petazzoni
@ 2020-03-19 13:53                       ` Asaf Kahlon
  2020-03-19 14:00                         ` Thomas Petazzoni
  0 siblings, 1 reply; 98+ messages in thread
From: Asaf Kahlon @ 2020-03-19 13:53 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, Mar 19, 2020 at 2:49 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Thu, 19 Mar 2020 13:40:36 +0200
> Asaf Kahlon <asafka7@gmail.com> wrote:
>
> > > To me it seems like this could be the culprit. The question is, what
> > > should we do with this? Check for Make version < 4.2 && -j && -O and
> > > give a warning? Maybe this is a bit too much.
> > We now check for make>4.0. Do we want to bump it?
> > Maybe some of the core Buildroot maintainers can give their advice here.
>
> We don't require make 4.0, we only require make 3.81.
>
> The logic in support/dependencies/check-host-make.mk to check for make
> 4.0 is only for those few packages that do need make >= 4.0. For such
> packages, if the version of make installed system-wide is < 4.0, then
> we build our own host-make. But the overall Buildroot build is still
> executed by the system-wide make, which may be < 4.0.

You're right, thanks for the correction.

>
> Requiring make > 4.0 on the host system is too strict, especially
> considering that the issue we have here only happens in very specific
> conditions: ccache support enabled, and passing of custom -O flags that
> are only useful for top-level parallel build, which is itself an
> experimental feature.

Just as a side note - the problem isn't related to ccache. We
reproduced it with -O
and top-level parallel build.
In addition, if you have any suggestion how to address that case -
I'll be more than happy
to help.

>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Asaf.

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-19 13:53                       ` Asaf Kahlon
@ 2020-03-19 14:00                         ` Thomas Petazzoni
  2020-03-22 20:46                           ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-19 14:00 UTC (permalink / raw)
  To: buildroot

On Thu, 19 Mar 2020 15:53:23 +0200
Asaf Kahlon <asafka7@gmail.com> wrote:

> > Requiring make > 4.0 on the host system is too strict, especially
> > considering that the issue we have here only happens in very specific
> > conditions: ccache support enabled, and passing of custom -O flags that
> > are only useful for top-level parallel build, which is itself an
> > experimental feature.  
> 
> Just as a side note - the problem isn't related to ccache. We
> reproduced it with -O and top-level parallel build.

Sorry, I mixed things up, and thought it was ccache related.

> In addition, if you have any suggestion how to address that case -
> I'll be more than happy to help.

I don't have any really good suggestion. But it's really a corner case:
only happens with make 4.1 if I understand correctly, and only when you
pass some variants of the -O option.

The "make -Orecurse" option, which is the most relevant for top-level
parallel build, does not exhibit the issue.

So essentially I simply wouldn't fix the problem. If you really want to
fix it, maybe we can have some fancy logic in the main Makefile to
detect that one of the problematic -O option is passed, and the make
version is not appropriate, and then error out.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make
  2020-03-19 14:00                         ` Thomas Petazzoni
@ 2020-03-22 20:46                           ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-03-22 20:46 UTC (permalink / raw)
  To: buildroot

Hi,

On 19.03.20 15:00, Thomas Petazzoni wrote:
> On Thu, 19 Mar 2020 15:53:23 +0200
> Asaf Kahlon <asafka7@gmail.com> wrote:
> 
>>> Requiring make > 4.0 on the host system is too strict, especially
>>> considering that the issue we have here only happens in very specific
>>> conditions: ccache support enabled, and passing of custom -O flags that
>>> are only useful for top-level parallel build, which is itself an
>>> experimental feature.
>>
>> Just as a side note - the problem isn't related to ccache. We
>> reproduced it with -O and top-level parallel build.
> 
> Sorry, I mixed things up, and thought it was ccache related.
> 
>> In addition, if you have any suggestion how to address that case -
>> I'll be more than happy to help.
> 
> I don't have any really good suggestion. But it's really a corner case:
> only happens with make 4.1 if I understand correctly, and only when you
> pass some variants of the -O option.
> 
> The "make -Orecurse" option, which is the most relevant for top-level
> parallel build, does not exhibit the issue.
> 
> So essentially I simply wouldn't fix the problem. If you really want to

That's ok for me since it really is a corner case.


regards,
Andreas



> fix it, maybe we can have some fancy logic in the main Makefile to
> detect that one of the problematic -O option is passed, and the make
> version is not appropriate, and then error out.
> 
> Thomas
> 

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

* [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency
  2020-03-16 22:40     ` Andreas Naumann
@ 2020-03-22 21:58       ` Andreas Naumann
  2020-03-22 22:03         ` Thomas Petazzoni
  0 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-03-22 21:58 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 16.03.20 23:40, Andreas Naumann wrote:
> Hi,
> 
> On 12.03.20 09:15, Thomas Petazzoni wrote:
>> On Mon, 17 Feb 2020 22:23:45 +0100
>> Andreas Naumann <anaumann@ultratronik.de> wrote:
>>
>>> Fixes a build failure.
>>>
>>> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
>>
>> Could you provide the Buildroot configuration that exhibits the issue?
> 
> it was imx6-sabresd_qt5_defconfig plus everything Qt I could find. See 
> cover letter near the end.
> 
>> I've been trying to create a configuration that builds qt5webengine
>> with X.org enabled, and no matter what I do, the OpenGL provider I use
>> selects libxdamage, so I don't have a configuration that combines
>> qt5webengine and X.org, but without having libxdamage.

I now realize my configuration had mesa3d without 
BR2_PACKAGE_MESA3D_OPENGL_GLX. Once selected, it pulls in libxdamage and 
it gets build before mesa. So the first part of my patch might really 
not be needed.

The second part (the dependency) however is needed because otherwise it 
wont be available in the per-package sysroot of qt5webengine. I guess I 
should have pointed that out in the commit message. Do you want me to 
resend?

> 
> Maybe this was fixed with e79ee3b, I will try again.

So no, this was another issue.


regards,
Andreas




> 
> 
> regards,
> Andreas
> 
>>
>> Also, what was the build failure ?
>>
>> Thanks!
>>
>> Thomas
>>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency
  2020-03-22 21:58       ` Andreas Naumann
@ 2020-03-22 22:03         ` Thomas Petazzoni
  0 siblings, 0 replies; 98+ messages in thread
From: Thomas Petazzoni @ 2020-03-22 22:03 UTC (permalink / raw)
  To: buildroot

On Sun, 22 Mar 2020 22:58:19 +0100
Andreas Naumann <dev@andin.de> wrote:

> I now realize my configuration had mesa3d without 
> BR2_PACKAGE_MESA3D_OPENGL_GLX. Once selected, it pulls in libxdamage and 
> it gets build before mesa. So the first part of my patch might really 
> not be needed.
> 
> The second part (the dependency) however is needed because otherwise it 
> wont be available in the per-package sysroot of qt5webengine. I guess I 
> should have pointed that out in the commit message. Do you want me to 
> resend?

Yes, please. Could you also include in the commit log the defconfig
that allows to reproduce the issue ?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra Andreas Naumann
@ 2020-04-10 20:25   ` Yann E. MORIN
  2020-07-01 19:01   ` Yann E. MORIN
  2020-07-20  6:14   ` Peter Korsgaard
  2 siblings, 0 replies; 98+ messages in thread
From: Yann E. MORIN @ 2020-04-10 20:25 UTC (permalink / raw)
  To: buildroot

Andreas, All,

On 2020-02-17 22:23 +0100, Andreas Naumann spake thusly:
> Qmake configured packages will, by default, use the absolute HostPrefix/Sysroot
> pathes set during configuration/building of qt5base for their install
> destinations.
> For the per-package host/staging infrastructure, this causes non-qt5base
> packages to litter the qt5base folders. In addition, buildroots target-install
> step subsequently fails because the respective files are missing from the
> per-package sysroot of the package itself.
> 
> Fortunately, qmake's built-in pathes can be overridden by placing a custom
> qt.conf next to the qmake binary. This is already used to facilitate SDK
> relocation. So for per-package path manipulation we can reuse that method, but
> need to change the host/sysroot values according to each per-package
> path.

Neat! :-)

> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
[--SNIP--]
> diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
> index d94d9cc99f..eb2a749678 100644
> --- a/package/qt5/qt5.mk
> +++ b/package/qt5/qt5.mk
> @@ -17,5 +17,20 @@ QT5_SITE = https://download.qt.io/archive/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)
>  
>  include $(sort $(wildcard package/qt5/*/*.mk))
>  
> +# The file "qt.conf" can be used to override the hard-coded paths that are
> +# compiled into the Qt library. We need it to make "qmake" relocatable and
> +# tweak the per-package install pathes
> +define QT5_INSTALL_QT_CONF
> +	rm -f $(HOST_DIR)/bin/qt.conf && \

This rm is superfluous, since you're overwriting the file anyway...

> +	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
> +		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
                                     ^
Here -------------------------------/

No need to resend jsut for that, it can be fixed locally when applying.
Otherwise:

Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> +endef
> +
> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> +define QT5_QT_CONF_FIXUP
> +        $(QT5_INSTALL_QT_CONF)
> +endef
> +endif
> +
>  # Variable for other Qt applications to use
>  QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index 03f984ef8c..960a802b3b 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -352,13 +352,6 @@ define QT5BASE_CONFIGURE_CMDS
>  	)
>  endef
>  
> -# The file "qt.conf" can be used to override the hard-coded paths that are
> -# compiled into the Qt library. We need it to make "qmake" relocatable.
> -define QT5BASE_INSTALL_QT_CONF
> -	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
> -		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
> -endef
> -
> -QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_INSTALL_QT_CONF
> +QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
>  
>  $(eval $(qmake-package))
> -- 
> 2.25.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure Andreas Naumann
@ 2020-06-19 10:22   ` Louis-Paul CORDIER
  2020-07-01 21:15     ` Yann E. MORIN
  0 siblings, 1 reply; 98+ messages in thread
From: Louis-Paul CORDIER @ 2020-06-19 10:22 UTC (permalink / raw)
  To: buildroot


On 2/17/20 10:23 PM, Andreas Naumann wrote:
> Per default qmake uses the pkg-config binary and search path detected by qt5base
> and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages
> not contained in qt5base not being detected.
> To overcome this, set the correct pathes in the global QMAKE variable.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> ---
>   package/qt5/qt5.mk | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
> index eb2a749678..c3b9f69c3f 100644
> --- a/package/qt5/qt5.mk
> +++ b/package/qt5/qt5.mk
> @@ -33,4 +33,6 @@ endef
>   endif
>   
>   # Variable for other Qt applications to use
> -QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
> +QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
> +	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
> +	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
> 

Andreas, all,

I attached 2 additional patches, that fix compile issue on x86 platform 
(see 
http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html). I 
based my work on top of 2020.05 tag, plus:

- [v6,19/28] core/pkg-infra: Add per-package support in qmake infra 
(https://patchwork.ozlabs.org/project/buildroot/patch/20200217212350.29750-20-anaumann at ultratronik.de/)
- [v6,20/28] qt5: Fix pkgconfig search path for per-package 
infrastructure 
(https://patchwork.ozlabs.org/project/buildroot/patch/20200217212350.29750-21-anaumann at ultratronik.de/)

Description of my patches:

1. The first one is fixing the absolute path added in .pri and .pc files 
when building qt5base. When using sysroot, thos abolute path are 
breaking the compilation because they are pointing to directories 
outside the sysroot.

2. The second one is fixing .cmake files that also contains absolute 
paths after qt5base installation

I'm now able to use full parallel build with per-package with Qt5.

Thank you for your hard work Andreas,

BR,
Louis-Paul CORDIER
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-core-pkg-infra-Fix-pkg-config-and-.pri-absolute-path.patch
Type: text/x-patch
Size: 1889 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200619/9c71f155/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-package-qt5base-fix-absolute-path-generated-in-.cmak.patch
Type: text/x-patch
Size: 1085 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200619/9c71f155/attachment-0001.bin>

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

* [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra Andreas Naumann
  2020-04-10 20:25   ` Yann E. MORIN
@ 2020-07-01 19:01   ` Yann E. MORIN
  2020-07-20  6:14   ` Peter Korsgaard
  2 siblings, 0 replies; 98+ messages in thread
From: Yann E. MORIN @ 2020-07-01 19:01 UTC (permalink / raw)
  To: buildroot

Andreas, All,

Sorry for the long delay in looking (again) at this complex series...
I'll try and apply as much as I can in the following days...

On 2020-02-17 22:23 +0100, Andreas Naumann spake thusly:
> Qmake configured packages will, by default, use the absolute HostPrefix/Sysroot
> pathes set during configuration/building of qt5base for their install
> destinations.
> For the per-package host/staging infrastructure, this causes non-qt5base
> packages to litter the qt5base folders. In addition, buildroots target-install
> step subsequently fails because the respective files are missing from the
> per-package sysroot of the package itself.
> 
> Fortunately, qmake's built-in pathes can be overridden by placing a custom
> qt.conf next to the qmake binary. This is already used to facilitate SDK
> relocation. So for per-package path manipulation we can reuse that method, but
> need to change the host/sysroot values according to each per-package
> path.
> 
> Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

I did the slight ammendment I already pointed out earlier, and applied
to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/pkg-qmake.mk           |  1 +
>  package/qt5/qt5.mk             | 15 +++++++++++++++
>  package/qt5/qt5base/qt5base.mk |  9 +--------
>  3 files changed, 17 insertions(+), 8 deletions(-)
> 
> diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
> index 53ac3e4a1c..3aa0dd7101 100644
> --- a/package/pkg-qmake.mk
> +++ b/package/pkg-qmake.mk
> @@ -46,6 +46,7 @@ $(2)_INSTALL_TARGET_OPTS	?= $$($(2)_INSTALL_STAGING_OPTS)
>  #
>  ifndef $(2)_CONFIGURE_CMDS
>  define $(2)_CONFIGURE_CMDS
> +	$$(QT5_QT_CONF_FIXUP)
>  	cd $$($(2)_BUILDDIR) && \
>  	$$(TARGET_MAKE_ENV) $$($(2)_CONF_ENV) $$(QT5_QMAKE) $$($(2)_CONF_OPTS)
>  endef
> diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
> index d94d9cc99f..eb2a749678 100644
> --- a/package/qt5/qt5.mk
> +++ b/package/qt5/qt5.mk
> @@ -17,5 +17,20 @@ QT5_SITE = https://download.qt.io/archive/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)
>  
>  include $(sort $(wildcard package/qt5/*/*.mk))
>  
> +# The file "qt.conf" can be used to override the hard-coded paths that are
> +# compiled into the Qt library. We need it to make "qmake" relocatable and
> +# tweak the per-package install pathes
> +define QT5_INSTALL_QT_CONF
> +	rm -f $(HOST_DIR)/bin/qt.conf && \
> +	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
> +		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
> +endef
> +
> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> +define QT5_QT_CONF_FIXUP
> +        $(QT5_INSTALL_QT_CONF)
> +endef
> +endif
> +
>  # Variable for other Qt applications to use
>  QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index 03f984ef8c..960a802b3b 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -352,13 +352,6 @@ define QT5BASE_CONFIGURE_CMDS
>  	)
>  endef
>  
> -# The file "qt.conf" can be used to override the hard-coded paths that are
> -# compiled into the Qt library. We need it to make "qmake" relocatable.
> -define QT5BASE_INSTALL_QT_CONF
> -	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
> -		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
> -endef
> -
> -QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_INSTALL_QT_CONF
> +QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
>  
>  $(eval $(qmake-package))
> -- 
> 2.25.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-06-19 10:22   ` Louis-Paul CORDIER
@ 2020-07-01 21:15     ` Yann E. MORIN
  2020-07-01 21:54       ` Yann E. MORIN
  0 siblings, 1 reply; 98+ messages in thread
From: Yann E. MORIN @ 2020-07-01 21:15 UTC (permalink / raw)
  To: buildroot

Louis-Paul, Andreas, All,

Thank you both for working on this difficult topic. :-)

(removing Julien C., as his email is hitting a closed door..)

On 2020-06-19 12:22 +0200, Louis-Paul CORDIER spake thusly:
> On 2/17/20 10:23 PM, Andreas Naumann wrote:
> >Per default qmake uses the pkg-config binary and search path detected by qt5base
> >and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages
> >not contained in qt5base not being detected.
> >To overcome this, set the correct pathes in the global QMAKE variable.
> >
> >Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> >---
> >  package/qt5/qt5.mk | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
> >index eb2a749678..c3b9f69c3f 100644
> >--- a/package/qt5/qt5.mk
> >+++ b/package/qt5/qt5.mk
> >@@ -33,4 +33,6 @@ endef
> >  endif
> >  # Variable for other Qt applications to use
> >-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
> >+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
> >+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
> >+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
> >
> I attached 2 additional patches, that fix compile issue on x86 platform (see
> http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html). I based
> my work on top of 2020.05 tag [...]
[--SNIP--]
> 1. The first one is fixing the absolute path added in .pri and .pc files
> when building qt5base. When using sysroot, thos abolute path are breaking
> the compilation because they are pointing to directories outside the
> sysroot.

As I read that description, I can see that some keywords are matching
with the original commit mesage.

Most notabley, the originalcommit states "mkspecs/qconfig.pri" while
your are talking about "absolute path added in .pri [..] files".

So, am I allowed to take the following shortcut :

    the patch from Louis-Paul supersedes the one from Andreas, as it
    fixes the issue at the root, rther than work around it
?

As for the .pc files, I think the fix should be generalised out of the
Qt world, maybe... Fopr example, we already fix the /la files in
package/pkg-generic at 324

So, as far as I can see (which can be quite short, in some cases), we
should introduce a similar generic .pc fixup.

Also, please see a little comment below...

> 2. The second one is fixing .cmake files that also contains absolute paths
> after qt5base installation

Ditto, maybe all .cmake files should be fixed, not just the ones by
Qt5, no?

> I'm now able to use full parallel build with per-package with Qt5.

This is really sounding good! :-)

Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see
an updated and consolidated series reposted to the list, that aggregates
both your developments.

Would you be willing to do that, please?

Regards,
Yann E. MORIN.

> 
> Thank you for your hard work Andreas,
> 
> BR,
> Louis-Paul CORDIER

> From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
> From: Louis-Paul Cordier <lpdev@cordier.org>
> Date: Fri, 19 Jun 2020 11:01:21 +0200
> Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri absolute path
> 
> Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
> ---
>  package/pkg-qmake.mk | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
> index 27727119d7..49fe185d4a 100644
> --- a/package/pkg-qmake.mk
> +++ b/package/pkg-qmake.mk
> @@ -20,6 +20,22 @@
>  #
>  ################################################################################
>  
> +# When per-package is enabled, and qmake project is configured to generate 
> +# pkg-config compatible package, absolute path are generated for "prefix" field 
> +# of .pc files. In order to keep per-package isolation with sysroot'in, it is 
> +# needed to remove those absolute path. Same apply for mkspecs files.
> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> +define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> +	$(Q)find $(STAGING_DIR)/ -name "*.pc" \
> +	| xargs --no-run-if-empty \
> +	$(SED) "s:$(STAGING_DIR)::g"
> +
> +	$(Q)find $(HOST_DIR)/ -name "*.pri" \
> +		| xargs --no-run-if-empty \
> +		$(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
> +endef
> +endif
> +
>  ################################################################################
>  # inner-qmake-package -- defines how the configuration, compilation and
>  # installation of a qmake package should be done, implements a few hooks
> @@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
>  endef
>  endif
>  
> +

Spurious empty line.

>  #
>  # Staging installation step. Only define it if not already defined by
>  # the package .mk file.
> @@ -76,6 +93,8 @@ define $(2)_INSTALL_STAGING_CMDS
>  endef
>  endif
>  
> +$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> +
>  #
>  # Target installation step. Only define it if not already defined by
>  # the package .mk file.
> -- 
> 2.26.2
> 

> From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
> From: Louis-Paul Cordier <lpdev@cordier.org>
> Date: Fri, 19 Jun 2020 12:05:19 +0200
> Subject: [PATCH 2/2] package/qt5base: fix absolute path generated in .cmake
>  config files
> 
> Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
> ---
>  package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index ec56287ed0..3d30c41d0e 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -310,4 +310,17 @@ endef
>  
>  QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
>  
> +
> +# CMake config files generated by Qt5 might break per-package isolation because
> +# of absolute path generated.
> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> +define QT5BASE_CMAKECONFIG_FIXUP
> +	$(Q)find $(STAGING_DIR)/ -name "*.cmake" \
> +		| xargs --no-run-if-empty \
> +		$(SED) "s:$(STAGING_DIR)::g"
> +endef
> +endif
> +
> +QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
> +
>  $(eval $(qmake-package))
> -- 
> 2.26.2
> 

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


-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-07-01 21:15     ` Yann E. MORIN
@ 2020-07-01 21:54       ` Yann E. MORIN
  2020-07-02 17:38         ` Yann E. MORIN
  2020-07-22 19:48         ` LP C
  0 siblings, 2 replies; 98+ messages in thread
From: Yann E. MORIN @ 2020-07-01 21:54 UTC (permalink / raw)
  To: buildroot

Louis-Paul, Andeas, All,

On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:
> On 2020-06-19 12:22 +0200, Louis-Paul CORDIER spake thusly:
> > On 2/17/20 10:23 PM, Andreas Naumann wrote:
> > >Per default qmake uses the pkg-config binary and search path detected by qt5base
> > >and set in mkspecs/qconfig.pri. For per-package infra, this leads to packages
> > >not contained in qt5base not being detected.
> > >To overcome this, set the correct pathes in the global QMAKE variable.
> > >
> > >Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
> > >---
> > >  package/qt5/qt5.mk | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > >diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
> > >index eb2a749678..c3b9f69c3f 100644
> > >--- a/package/qt5/qt5.mk
> > >+++ b/package/qt5/qt5.mk
> > >@@ -33,4 +33,6 @@ endef
> > >  endif
> > >  # Variable for other Qt applications to use
> > >-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
> > >+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++ \
> > >+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
> > >+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
> > >
> > I attached 2 additional patches, that fix compile issue on x86 platform (see
> > http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html). I based
> > my work on top of 2020.05 tag [...]
> [--SNIP--]
> > 1. The first one is fixing the absolute path added in .pri and .pc files
> > when building qt5base. When using sysroot, thos abolute path are breaking
> > the compilation because they are pointing to directories outside the
> > sysroot.
> 
> As I read that description, I can see that some keywords are matching
> with the original commit mesage.
> 
> Most notabley, the originalcommit states "mkspecs/qconfig.pri" while
> your are talking about "absolute path added in .pri [..] files".
> 
> So, am I allowed to take the following shortcut :
> 
>     the patch from Louis-Paul supersedes the one from Andreas, as it
>     fixes the issue at the root, rther than work around it
> ?

So, patch 19 in the series is in master now, but patch 20 (this one)
not yet. So, on master, I did a build with PPD, and right after qt5base,
was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD
directory read-only, and built qt5declarative. It worked. :-)

    $ make qt5base-depends
    $ sed magic from L-P's patch
    $ chmod -R a-w per-package/qt5base/
    $ make qt5dceclarative

Woot! :-)

So, yeath it looks like this patch 20 is not needed if the .pri and .pc
(and .cmake) are properly fixed.

Still, I'll let you guys validate that point, and maybe repost the
agregated series.

Thanks again! :-)

[0] I did not apply the patch from Louis-Paul, because I wanted to
observe the build step by step, and see how the files were before/after
the fixes.

Regards,
Yann E. MORIN.

> As for the .pc files, I think the fix should be generalised out of the
> Qt world, maybe... Fopr example, we already fix the /la files in
> package/pkg-generic at 324
> 
> So, as far as I can see (which can be quite short, in some cases), we
> should introduce a similar generic .pc fixup.
> 
> Also, please see a little comment below...
> 
> > 2. The second one is fixing .cmake files that also contains absolute paths
> > after qt5base installation
> 
> Ditto, maybe all .cmake files should be fixed, not just the ones by
> Qt5, no?
> 
> > I'm now able to use full parallel build with per-package with Qt5.
> 
> This is really sounding good! :-)
> 
> Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see
> an updated and consolidated series reposted to the list, that aggregates
> both your developments.
> 
> Would you be willing to do that, please?
> 
> Regards,
> Yann E. MORIN.
> 
> > 
> > Thank you for your hard work Andreas,
> > 
> > BR,
> > Louis-Paul CORDIER
> 
> > From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
> > From: Louis-Paul Cordier <lpdev@cordier.org>
> > Date: Fri, 19 Jun 2020 11:01:21 +0200
> > Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri absolute path
> > 
> > Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
> > ---
> >  package/pkg-qmake.mk | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> > 
> > diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
> > index 27727119d7..49fe185d4a 100644
> > --- a/package/pkg-qmake.mk
> > +++ b/package/pkg-qmake.mk
> > @@ -20,6 +20,22 @@
> >  #
> >  ################################################################################
> >  
> > +# When per-package is enabled, and qmake project is configured to generate 
> > +# pkg-config compatible package, absolute path are generated for "prefix" field 
> > +# of .pc files. In order to keep per-package isolation with sysroot'in, it is 
> > +# needed to remove those absolute path. Same apply for mkspecs files.
> > +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> > +define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> > +	$(Q)find $(STAGING_DIR)/ -name "*.pc" \
> > +	| xargs --no-run-if-empty \
> > +	$(SED) "s:$(STAGING_DIR)::g"
> > +
> > +	$(Q)find $(HOST_DIR)/ -name "*.pri" \
> > +		| xargs --no-run-if-empty \
> > +		$(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
> > +endef
> > +endif
> > +
> >  ################################################################################
> >  # inner-qmake-package -- defines how the configuration, compilation and
> >  # installation of a qmake package should be done, implements a few hooks
> > @@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
> >  endef
> >  endif
> >  
> > +
> 
> Spurious empty line.
> 
> >  #
> >  # Staging installation step. Only define it if not already defined by
> >  # the package .mk file.
> > @@ -76,6 +93,8 @@ define $(2)_INSTALL_STAGING_CMDS
> >  endef
> >  endif
> >  
> > +$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> > +
> >  #
> >  # Target installation step. Only define it if not already defined by
> >  # the package .mk file.
> > -- 
> > 2.26.2
> > 
> 
> > From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
> > From: Louis-Paul Cordier <lpdev@cordier.org>
> > Date: Fri, 19 Jun 2020 12:05:19 +0200
> > Subject: [PATCH 2/2] package/qt5base: fix absolute path generated in .cmake
> >  config files
> > 
> > Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
> > ---
> >  package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> > index ec56287ed0..3d30c41d0e 100644
> > --- a/package/qt5/qt5base/qt5base.mk
> > +++ b/package/qt5/qt5base/qt5base.mk
> > @@ -310,4 +310,17 @@ endef
> >  
> >  QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
> >  
> > +
> > +# CMake config files generated by Qt5 might break per-package isolation because
> > +# of absolute path generated.
> > +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> > +define QT5BASE_CMAKECONFIG_FIXUP
> > +	$(Q)find $(STAGING_DIR)/ -name "*.cmake" \
> > +		| xargs --no-run-if-empty \
> > +		$(SED) "s:$(STAGING_DIR)::g"
> > +endef
> > +endif
> > +
> > +QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
> > +
> >  $(eval $(qmake-package))
> > -- 
> > 2.26.2
> > 
> 
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> 
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build Andreas Naumann
  2020-03-11 22:30   ` Thomas Petazzoni
@ 2020-07-01 21:56   ` Yann E. MORIN
  1 sibling, 0 replies; 98+ messages in thread
From: Yann E. MORIN @ 2020-07-01 21:56 UTC (permalink / raw)
  To: buildroot

Andreas, All,

On 2020-02-17 22:23 +0100, Andreas Naumann spake thusly:
> Since python-sip is not built by the qmake infra, we need to explicitly
> integrate the qt.conf fixup needed for successful per-package build and
> consistently use qmake via QT5_QMAKE variable.

And why can't we make it use the qmake infra now that we have it?

Regards,
Yann E. MORIN.

> ---
>  package/python-sip/python-sip.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/python-sip/python-sip.mk b/package/python-sip/python-sip.mk
> index 1d6c205396..7ae2d43e1e 100644
> --- a/package/python-sip/python-sip.mk
> +++ b/package/python-sip/python-sip.mk
> @@ -38,6 +38,7 @@ define HOST_PYTHON_SIP_INSTALL_CMDS
>  endef
>  
>  define PYTHON_SIP_CONFIGURE_CMDS
> +	$(QT5_QT_CONF_FIXUP)
>  	(cd $(@D); \
>  		$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/bin/python configure.py \
>  			--bindir $(TARGET_DIR)/usr/bin \
> @@ -46,7 +47,7 @@ define PYTHON_SIP_CONFIGURE_CMDS
>  			--sipdir $(TARGET_DIR)/usr/share/sip \
>  			--sysroot $(STAGING_DIR)/usr \
>  			--use-qmake && \
> -		$(HOST_DIR)/bin/qmake)
> +		$(QT5_QMAKE))
>  endef
>  
>  define PYTHON_SIP_BUILD_CMDS
> -- 
> 2.25.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-07-01 21:54       ` Yann E. MORIN
@ 2020-07-02 17:38         ` Yann E. MORIN
  2020-07-22 19:48         ` LP C
  1 sibling, 0 replies; 98+ messages in thread
From: Yann E. MORIN @ 2020-07-02 17:38 UTC (permalink / raw)
  To: buildroot

Louis-Paul, Andreas, All,

On 2020-07-01 23:54 +0200, Yann E. MORIN spake thusly:
> On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:
[--SNIP--]
> So, patch 19 in the series is in master now, but patch 20 (this one)
> not yet. So, on master, I did a build with PPD, and right after qt5base,
> was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD
> directory read-only, and built qt5declarative. It worked. :-)
> 
>     $ make qt5base-depends
>     $ sed magic from L-P's patch
>     $ chmod -R a-w per-package/qt5base/
>     $ make qt5dceclarative
> 
> Woot! :-)

So I was a bit too tired yesterday evening. This chmod can't work,
otherwise the per-package directory for qt5declarative would also be
read-only.

And it worked because I had a hack that restores the +w on the current
per-package directory. And since this is a rsync --link-dest, then we
only have hard-links, and thus the ppd of dependencies are turned back
to read-write...

Damn...

Still this is a nice set of patches.

That gave me an idea for a paranoid PPD, though... hack-hack-hack...

Regards,
Yann E. MORIN.

> So, yeath it looks like this patch 20 is not needed if the .pri and .pc
> (and .cmake) are properly fixed.
> 
> Still, I'll let you guys validate that point, and maybe repost the
> agregated series.
> 
> Thanks again! :-)
> 
> [0] I did not apply the patch from Louis-Paul, because I wanted to
> observe the build step by step, and see how the files were before/after
> the fixes.
> 
> Regards,
> Yann E. MORIN.
> 
> > As for the .pc files, I think the fix should be generalised out of the
> > Qt world, maybe... Fopr example, we already fix the /la files in
> > package/pkg-generic at 324
> > 
> > So, as far as I can see (which can be quite short, in some cases), we
> > should introduce a similar generic .pc fixup.
> > 
> > Also, please see a little comment below...
> > 
> > > 2. The second one is fixing .cmake files that also contains absolute paths
> > > after qt5base installation
> > 
> > Ditto, maybe all .cmake files should be fixed, not just the ones by
> > Qt5, no?
> > 
> > > I'm now able to use full parallel build with per-package with Qt5.
> > 
> > This is really sounding good! :-)
> > 
> > Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see
> > an updated and consolidated series reposted to the list, that aggregates
> > both your developments.
> > 
> > Would you be willing to do that, please?
> > 
> > Regards,
> > Yann E. MORIN.
> > 
> > > 
> > > Thank you for your hard work Andreas,
> > > 
> > > BR,
> > > Louis-Paul CORDIER
> > 
> > > From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
> > > From: Louis-Paul Cordier <lpdev@cordier.org>
> > > Date: Fri, 19 Jun 2020 11:01:21 +0200
> > > Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri absolute path
> > > 
> > > Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
> > > ---
> > >  package/pkg-qmake.mk | 19 +++++++++++++++++++
> > >  1 file changed, 19 insertions(+)
> > > 
> > > diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
> > > index 27727119d7..49fe185d4a 100644
> > > --- a/package/pkg-qmake.mk
> > > +++ b/package/pkg-qmake.mk
> > > @@ -20,6 +20,22 @@
> > >  #
> > >  ################################################################################
> > >  
> > > +# When per-package is enabled, and qmake project is configured to generate 
> > > +# pkg-config compatible package, absolute path are generated for "prefix" field 
> > > +# of .pc files. In order to keep per-package isolation with sysroot'in, it is 
> > > +# needed to remove those absolute path. Same apply for mkspecs files.
> > > +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> > > +define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> > > +	$(Q)find $(STAGING_DIR)/ -name "*.pc" \
> > > +	| xargs --no-run-if-empty \
> > > +	$(SED) "s:$(STAGING_DIR)::g"
> > > +
> > > +	$(Q)find $(HOST_DIR)/ -name "*.pri" \
> > > +		| xargs --no-run-if-empty \
> > > +		$(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
> > > +endef
> > > +endif
> > > +
> > >  ################################################################################
> > >  # inner-qmake-package -- defines how the configuration, compilation and
> > >  # installation of a qmake package should be done, implements a few hooks
> > > @@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
> > >  endef
> > >  endif
> > >  
> > > +
> > 
> > Spurious empty line.
> > 
> > >  #
> > >  # Staging installation step. Only define it if not already defined by
> > >  # the package .mk file.
> > > @@ -76,6 +93,8 @@ define $(2)_INSTALL_STAGING_CMDS
> > >  endef
> > >  endif
> > >  
> > > +$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
> > > +
> > >  #
> > >  # Target installation step. Only define it if not already defined by
> > >  # the package .mk file.
> > > -- 
> > > 2.26.2
> > > 
> > 
> > > From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
> > > From: Louis-Paul Cordier <lpdev@cordier.org>
> > > Date: Fri, 19 Jun 2020 12:05:19 +0200
> > > Subject: [PATCH 2/2] package/qt5base: fix absolute path generated in .cmake
> > >  config files
> > > 
> > > Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
> > > ---
> > >  package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
> > >  1 file changed, 13 insertions(+)
> > > 
> > > diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> > > index ec56287ed0..3d30c41d0e 100644
> > > --- a/package/qt5/qt5base/qt5base.mk
> > > +++ b/package/qt5/qt5base/qt5base.mk
> > > @@ -310,4 +310,17 @@ endef
> > >  
> > >  QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
> > >  
> > > +
> > > +# CMake config files generated by Qt5 might break per-package isolation because
> > > +# of absolute path generated.
> > > +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> > > +define QT5BASE_CMAKECONFIG_FIXUP
> > > +	$(Q)find $(STAGING_DIR)/ -name "*.cmake" \
> > > +		| xargs --no-run-if-empty \
> > > +		$(SED) "s:$(STAGING_DIR)::g"
> > > +endef
> > > +endif
> > > +
> > > +QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
> > > +
> > >  $(eval $(qmake-package))
> > > -- 
> > > 2.26.2
> > > 
> > 
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot at busybox.net
> > > http://lists.busybox.net/mailman/listinfo/buildroot
> > 
> > 
> > -- 
> > .-----------------.--------------------.------------------.--------------------.
> > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > '------------------------------^-------^------------------^--------------------'
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra
  2020-02-17 21:23 ` [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra Andreas Naumann
  2020-04-10 20:25   ` Yann E. MORIN
  2020-07-01 19:01   ` Yann E. MORIN
@ 2020-07-20  6:14   ` Peter Korsgaard
  2 siblings, 0 replies; 98+ messages in thread
From: Peter Korsgaard @ 2020-07-20  6:14 UTC (permalink / raw)
  To: buildroot

>>>>> "Andreas" == Andreas Naumann <anaumann@ultratronik.de> writes:

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

 > Fortunately, qmake's built-in pathes can be overridden by placing a custom
 > qt.conf next to the qmake binary. This is already used to facilitate SDK
 > relocation. So for per-package path manipulation we can reuse that method, but
 > need to change the host/sysroot values according to each per-package
 > path.

 > Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>

Committed to 2020.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-07-01 21:54       ` Yann E. MORIN
  2020-07-02 17:38         ` Yann E. MORIN
@ 2020-07-22 19:48         ` LP C
  2020-07-22 20:26           ` Yann E. MORIN
  1 sibling, 1 reply; 98+ messages in thread
From: LP C @ 2020-07-22 19:48 UTC (permalink / raw)
  To: buildroot

Hi all,

I'm very glad that this serie has finally ended. Thank you very much
Andreas for the serie.

I'm still experiencing some issues while compiling Buildroot with Centos
devtoolset 7 and I need to investigate further (qmake-pkg mode of
buildroot seems to honor devtoolset compiler instead of the
cross-compile toolchain for an x86 build)

On Jul 1 2020, at 11:54 pm, Yann E. MORIN <yann.morin.1998@free.fr> wrote:

> Louis-Paul, Andeas, All,
> 
> On 2020-07-01 23:15 +0200, Yann E. MORIN spake thusly:
>> On 2020-06-19 12:22 +0200, Louis-Paul CORDIER spake thusly:
>> > On 2/17/20 10:23 PM, Andreas Naumann wrote:
>> > >Per default qmake uses the pkg-config binary and search path
>> detected by qt5base
>> > >and set in mkspecs/qconfig.pri. For per-package infra, this leads
>> to packages
>> > >not contained in qt5base not being detected.
>> > >To overcome this, set the correct pathes in the global QMAKE variable.
>> > >
>> > >Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
>> > >---
>> > >  package/qt5/qt5.mk | 4 +++-
>> > >  1 file changed, 3 insertions(+), 1 deletion(-)
>> > >
>> > >diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
>> > >index eb2a749678..c3b9f69c3f 100644
>> > >--- a/package/qt5/qt5.mk
>> > >+++ b/package/qt5/qt5.mk
>> > >@@ -33,4 +33,6 @@ endef
>> > >  endif
>> > >  # Variable for other Qt applications to use
>> > >-QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec devices/linux-buildroot-g++
>> > >+QT5_QMAKE = $(HOST_DIR)/bin/qmake -spec
>> devices/linux-buildroot-g++ \
>> > >+	PKG_CONFIG_SYSROOT_DIR=$(STAGING_DIR) \
>> > >+	PKG_CONFIG_LIBDIR=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
>> > >
>> > I attached 2 additional patches, that fix compile issue on x86
>> platform (see
>> >
>> http://lists.busybox.net/pipermail/buildroot/2020-June/285123.html).
>> I based
>> > my work on top of 2020.05 tag [...]
>> [--SNIP--]
>> > 1. The first one is fixing the absolute path added in .pri and .pc files
>> > when building qt5base. When using sysroot, thos abolute path are breaking
>> > the compilation because they are pointing to directories outside the
>> > sysroot.
>> 
>> As I read that description, I can see that some keywords are matching
>> with the original commit mesage.
>> 
>> Most notabley, the originalcommit states "mkspecs/qconfig.pri" while
>> your are talking about "absolute path added in .pri [..] files".
>> 
>> So, am I allowed to take the following shortcut :
>> 
>>     the patch from Louis-Paul supersedes the one from Andreas, as it
>>     fixes the issue at the root, rther than work around it
>> ?
> 
> So, patch 19 in the series is in master now, but patch 20 (this one)
> not yet. So, on master, I did a build with PPD, and right after qt5base,
> was built, I applied Louis-Paul's tweaks [0], marked the qt5base PPD
> directory read-only, and built qt5declarative. It worked. :-)
> 
>    $ make qt5base-depends
>    $ sed magic from L-P's patch
>    $ chmod -R a-w per-package/qt5base/
>    $ make qt5dceclarative
> 
> Woot! :-)
> 
> So, yeath it looks like this patch 20 is not needed if the .pri and .pc
> (and .cmake) are properly fixed.
> 
> Still, I'll let you guys validate that point, and maybe repost the
> agregated series.
>
> Thanks again! :-)
> 
> [0] I did not apply the patch from Louis-Paul, because I wanted to
> observe the build step by step, and see how the files were before/after
> the fixes.
> 
> Regards,
> Yann E. MORIN.
> 
>> As for the .pc files, I think the fix should be generalised out of the
>> Qt world, maybe... Fopr example, we already fix the /la files in
>> package/pkg-generic at 324
>> 
>> So, as far as I can see (which can be quite short, in some cases), we
>> should introduce a similar generic .pc fixup.
>> 

I totally agree with this. I can add this on my todo list if you wish.

>> Also, please see a little comment below...
>> 
>> > 2. The second one is fixing .cmake files that also contains
>> absolute paths
>> > after qt5base installation
>> 
>> Ditto, maybe all .cmake files should be fixed, not just the ones by
>> Qt5, no?

See my comment above.

>> 
>> > I'm now able to use full parallel build with per-package with Qt5.
>> 
>> This is really sounding good! :-)
>> 
>> Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see
>> an updated and consolidated series reposted to the list, that aggregates
>> both your developments.
>> 
>> Would you be willing to do that, please?

I'm really crowded under the snow those days (you know, when you come
back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or
Discord). I spent way too much of my personal time to fix Qt5 parallel build.

>> 
>> Regards,
>> Yann E. MORIN.
>> 
>> > 
>> > Thank you for your hard work Andreas,
>> > 
>> > BR,
>> > Louis-Paul CORDIER
>> 
>> > From bc08430ebb5d76bdd0b45b8339761c85c7a48800 Mon Sep 17 00:00:00 2001
>> > From: Louis-Paul Cordier <lpdev@cordier.org>
>> > Date: Fri, 19 Jun 2020 11:01:21 +0200
>> > Subject: [PATCH 1/2] core/pkg-infra: Fix pkg-config and .pri
>> absolute path
>> > 
>> > Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
>> > ---
>> >  package/pkg-qmake.mk | 19 +++++++++++++++++++
>> >  1 file changed, 19 insertions(+)
>> > 
>> > diff --git a/package/pkg-qmake.mk b/package/pkg-qmake.mk
>> > index 27727119d7..49fe185d4a 100644
>> > --- a/package/pkg-qmake.mk
>> > +++ b/package/pkg-qmake.mk
>> > @@ -20,6 +20,22 @@
>> >  #
>> >  ################################################################################
>> >  
>> > +# When per-package is enabled, and qmake project is configured to
>> generate 
>> > +# pkg-config compatible package, absolute path are generated for
>> "prefix" field 
>> > +# of .pc files. In order to keep per-package isolation with
>> sysroot'in, it is 
>> > +# needed to remove those absolute path. Same apply for mkspecs files.
>> > +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
>> > +define PKG_QMAKE_FIXUP_ABSOLUTE_PATH
>> > +	$(Q)find $(STAGING_DIR)/ -name "*.pc" \
>> > +	| xargs --no-run-if-empty \
>> > +	$(SED) "s:$(STAGING_DIR)::g"
>> > +
>> > +	$(Q)find $(HOST_DIR)/ -name "*.pri" \
>> > +		| xargs --no-run-if-empty \
>> > +		$(SED) "s:$(STAGING_DIR):\$$\$$\[QT_SYSROOT\]:g"
>> > +endef
>> > +endif
>> > +
>> >  ################################################################################
>> >  # inner-qmake-package -- defines how the configuration,
>> compilation and
>> >  # installation of a qmake package should be done, implements a few hooks
>> > @@ -66,6 +82,7 @@ define $(2)_BUILD_CMDS
>> >  endef
>> >  endif
>> >  
>> > +
>> 
>> Spurious empty line.
>> 
>> >  #
>> >  # Staging installation step. Only define it if not already defined by
>> >  # the package .mk file.
>> > @@ -76,6 +93,8 @@ define $(2)_INSTALL_STAGING_CMDS
>> >  endef
>> >  endif
>> >  
>> > +$(2)_POST_INSTALL_STAGING_HOOKS += PKG_QMAKE_FIXUP_ABSOLUTE_PATH
>> > +
>> >  #
>> >  # Target installation step. Only define it if not already defined by
>> >  # the package .mk file.
>> > -- 
>> > 2.26.2
>> > 
>> 
>> > From 517307628cd76079952e606061990c2fd8df0d84 Mon Sep 17 00:00:00 2001
>> > From: Louis-Paul Cordier <lpdev@cordier.org>
>> > Date: Fri, 19 Jun 2020 12:05:19 +0200
>> > Subject: [PATCH 2/2] package/qt5base: fix absolute path generated
>> in .cmake
>> >  config files
>> > 
>> > Signed-off-by: Louis-Paul Cordier <lpdev@cordier.org>
>> > ---
>> >  package/qt5/qt5base/qt5base.mk | 13 +++++++++++++
>> >  1 file changed, 13 insertions(+)
>> > 
>> > diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
>> > index ec56287ed0..3d30c41d0e 100644
>> > --- a/package/qt5/qt5base/qt5base.mk
>> > +++ b/package/qt5/qt5base/qt5base.mk
>> > @@ -310,4 +310,17 @@ endef
>> >  
>> >  QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5_INSTALL_QT_CONF
>> >  
>> > +
>> > +# CMake config files generated by Qt5 might break per-package
>> isolation because
>> > +# of absolute path generated.
>> > +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
>> > +define QT5BASE_CMAKECONFIG_FIXUP
>> > +	$(Q)find $(STAGING_DIR)/ -name "*.cmake" \
>> > +		| xargs --no-run-if-empty \
>> > +		$(SED) "s:$(STAGING_DIR)::g"
>> > +endef
>> > +endif
>> > +
>> > +QT5BASE_POST_INSTALL_STAGING_HOOKS += QT5BASE_CMAKECONFIG_FIXUP
>> > +
>> >  $(eval $(qmake-package))
>> > -- 
>> > 2.26.2
>> > 
>> 
>> > _______________________________________________
>> > buildroot mailing list
>> > buildroot at busybox.net
>> > http://lists.busybox.net/mailman/listinfo/buildroot
>> 
>> 
>> -- 
>> .-----------------.--------------------.------------------.--------------------.
>> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
>> conspiracy: |
>> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___     
>>          |
>> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/ 
>> There is no  |
>> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v  
>> conspiracy.  |
>> '------------------------------^-------^------------------^--------------------'
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
> conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___      
>         |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/ 
> There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v  
> conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-07-22 19:48         ` LP C
@ 2020-07-22 20:26           ` Yann E. MORIN
  2020-07-23 10:29             ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Yann E. MORIN @ 2020-07-22 20:26 UTC (permalink / raw)
  To: buildroot

Louis-Paul, All,

On 2020-07-22 21:48 +0200, LP C spake thusly:
> I'm very glad that this serie has finally ended.

Oh, no, no! The series is not applied to master at all!

I've just provided some feedback while trying your patches. The original
patches from 20 onward have not been applied...

[--SNIP--]
> >> As for the .pc files, I think the fix should be generalised out of the
> >> Qt world, maybe... Fopr example, we already fix the /la files in
> >> package/pkg-generic at 324
> >> So, as far as I can see (which can be quite short, in some cases), we
> >> should introduce a similar generic .pc fixup.
> I totally agree with this. I can add this on my todo list if you wish.

I'd like to, please.

[--SNIP--]
> >> > I'm now able to use full parallel build with per-package with Qt5.
> >> 
> >> This is really sounding good! :-)
> >> 
> >> Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see
> >> an updated and consolidated series reposted to the list, that aggregates
> >> both your developments.
> >> 
> >> Would you be willing to do that, please?
> 
> I'm really crowded under the snow those days (you know, when you come
> back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or
> Discord).

Thomas P. and I are always logged in on IRC. I look from ~07:30+0200 to
~22:00+0200, and Thomas has similar presence. Not sure about Andreas and
Peter, though...

> I spent way too much of my personal time to fix Qt5 parallel build.

I know this can be a lot of work, and that people have a life outside of
Buildroot (and even outside of computers, amazing! ;-] ), but having
people, like you, who understand what is going on, and are interested in
fixing the issue, is the only way to make progress on such topics.

By the way, we're having a virtual developper day next Monday,
2020-07-27, the whole day. If you are willing to join:
    https://elinux.org/Buildroot:VirtualDeveloperDaysSummer2020

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-07-22 20:26           ` Yann E. MORIN
@ 2020-07-23 10:29             ` Andreas Naumann
  2020-07-23 20:17               ` Yann E. MORIN
  0 siblings, 1 reply; 98+ messages in thread
From: Andreas Naumann @ 2020-07-23 10:29 UTC (permalink / raw)
  To: buildroot

Hi Yann, Louis-Paul, all

first of all sorry for not responding for such a long time. There are 
just too many things on my table and yes, I also have a life outside the 
computer (kids, bees, wife should probably come first ...).

However, I'm still interested in the set and veeery happy that #19 was 
finally merged. Thanks everyone for reviewing and testing!

So Louis Paul, would it be possible you send your fix as a separate 
patch and once this is in, I resend what's left from the series?

If IRC is needed for further coordination i can join, but I'm a bit 
hesitant because I can hardly handle the four different messengers that 
I'm using already.


regards,
Andreas



On 22.07.20 22:26, Yann E. MORIN wrote:
> Louis-Paul, All,
> 
> On 2020-07-22 21:48 +0200, LP C spake thusly:
>> I'm very glad that this serie has finally ended.
> 
> Oh, no, no! The series is not applied to master at all!
> 
> I've just provided some feedback while trying your patches. The original
> patches from 20 onward have not been applied...
> 
> [--SNIP--]
>>>> As for the .pc files, I think the fix should be generalised out of the
>>>> Qt world, maybe... Fopr example, we already fix the /la files in
>>>> package/pkg-generic at 324
>>>> So, as far as I can see (which can be quite short, in some cases), we
>>>> should introduce a similar generic .pc fixup.
>> I totally agree with this. I can add this on my todo list if you wish.
> 
> I'd like to, please.
> 
> [--SNIP--]
>>>>> I'm now able to use full parallel build with per-package with Qt5.
>>>>
>>>> This is really sounding good! :-)
>>>>
>>>> Andreas, Louis-Paul, I know I may be asking a lot, but I'd love to see
>>>> an updated and consolidated series reposted to the list, that aggregates
>>>> both your developments.
>>>>
>>>> Would you be willing to do that, please?
>>
>> I'm really crowded under the snow those days (you know, when you come
>> back from holidays ;) ). I'm ok to do it but in a teamwork (IRC or
>> Discord).
> 
> Thomas P. and I are always logged in on IRC. I look from ~07:30+0200 to
> ~22:00+0200, and Thomas has similar presence. Not sure about Andreas and
> Peter, though...
> 
>> I spent way too much of my personal time to fix Qt5 parallel build.
> 
> I know this can be a lot of work, and that people have a life outside of
> Buildroot (and even outside of computers, amazing! ;-] ), but having
> people, like you, who understand what is going on, and are interested in
> fixing the issue, is the only way to make progress on such topics.
> 
> By the way, we're having a virtual developper day next Monday,
> 2020-07-27, the whole day. If you are willing to join:
>      https://elinux.org/Buildroot:VirtualDeveloperDaysSummer2020
> 
> Regards,
> Yann E. MORIN.
> 

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-07-23 10:29             ` Andreas Naumann
@ 2020-07-23 20:17               ` Yann E. MORIN
  2020-07-24  7:17                 ` Andreas Naumann
  0 siblings, 1 reply; 98+ messages in thread
From: Yann E. MORIN @ 2020-07-23 20:17 UTC (permalink / raw)
  To: buildroot

Andreas, All,

On 2020-07-23 12:29 +0200, Andreas Naumann spake thusly:
> first of all sorry for not responding for such a long time. There are just
> too many things on my table and yes, I also have a life outside the computer
> (kids, bees, wife should probably come first ...).

Yes, this is perfectly understandable. :-)
(my comment was just a joke; a bad one, I agree.)

> However, I'm still interested in the set and veeery happy that #19 was
> finally merged. Thanks everyone for reviewing and testing!
> 
> So Louis Paul, would it be possible you send your fix as a separate patch
> and once this is in, I resend what's left from the series?

Yes, we can address it in smaller, independent pieces, as long as they
make sense on their own.

I think there were two major thinks in the orioginal series:

  - making the qmake infra parallel-safe

  - fixing individual packages that are not using the qmake infra

Maybe we can first concentrate on fixing the infra, and then handle
packages.

> If IRC is needed for further coordination i can join, but I'm a bit hesitant
> because I can hardly handle the four different messengers that I'm using
> already.

Well, IRC is mostly for quick back-n-forth discussions to clarify
things, and to organise the work. It's not mandatory to join.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure
  2020-07-23 20:17               ` Yann E. MORIN
@ 2020-07-24  7:17                 ` Andreas Naumann
  0 siblings, 0 replies; 98+ messages in thread
From: Andreas Naumann @ 2020-07-24  7:17 UTC (permalink / raw)
  To: buildroot

Hi,

On 23.07.20 22:17, Yann E. MORIN wrote:
> Andreas, All,
> 
> On 2020-07-23 12:29 +0200, Andreas Naumann spake thusly:
>> first of all sorry for not responding for such a long time. There are just
>> too many things on my table and yes, I also have a life outside the computer
>> (kids, bees, wife should probably come first ...).
> 
> Yes, this is perfectly understandable. :-)
> (my comment was just a joke; a bad one, I agree.)
> 
>> However, I'm still interested in the set and veeery happy that #19 was
>> finally merged. Thanks everyone for reviewing and testing!
>>
>> So Louis Paul, would it be possible you send your fix as a separate patch
>> and once this is in, I resend what's left from the series?
> 
> Yes, we can address it in smaller, independent pieces, as long as they
> make sense on their own.
> 
> I think there were two major thinks in the orioginal series:
> 
>    - making the qmake infra parallel-safe
> 
>    - fixing individual packages that are not using the qmake infra
> 
> Maybe we can first concentrate on fixing the infra, and then handle
> packages.

I guess #20 is the last generic one, the rework from Louis Paul being 
even more generic.

The individual ones #24-#28 are probably still applicable. If somebody 
wants to have a look at it...

For some of the other ones I owe a response or have already agreed on a 
rework.

> 
>> If IRC is needed for further coordination i can join, but I'm a bit hesitant
>> because I can hardly handle the four different messengers that I'm using
>> already.
> 
> Well, IRC is mostly for quick back-n-forth discussions to clarify
> things, and to organise the work. It's not mandatory to join.

Yes of course. I see how it goes.

regards,
Andreas


> 
> Regards,
> Yann E. MORIN.
> 

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

end of thread, other threads:[~2020-07-24  7:17 UTC | newest]

Thread overview: 98+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 21:23 [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 01/28] package/qt5base: Do not build shared libs if BR2_STATIC_LIBS is chosen Andreas Naumann
2020-03-09 21:21   ` Thomas Petazzoni
2020-03-09 22:42     ` Peter Seiderer
2020-03-10  8:13       ` Thomas Petazzoni
2020-03-10  8:17         ` Peter Seiderer
2020-03-10 17:02     ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 02/28] core/pkg-infra: Add generic qmake package infrastructure Andreas Naumann
2020-03-09 22:10   ` Thomas Petazzoni
2020-03-10 17:10     ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 03/28] qt5: Convert straightforward packages to qmake infra Andreas Naumann
2020-03-09 22:12   ` Thomas Petazzoni
2020-03-10 18:09     ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 04/28] package/qt5base: Convert " Andreas Naumann
2020-03-09 22:29   ` Thomas Petazzoni
2020-03-10 18:20     ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 05/28] package/qwt: Partially convert " Andreas Naumann
2020-03-11 21:19   ` Thomas Petazzoni
2020-03-14 20:58     ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 06/28] package/qwt: Add missing qt5svg dependency Andreas Naumann
2020-02-17 21:56   ` Thomas Petazzoni
2020-02-18  9:43     ` Andreas Naumann
2020-02-18 14:58       ` Thomas Petazzoni
2020-02-19 19:16   ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 07/28] package/qt5tools: Partially convert to qmake infra Andreas Naumann
2020-03-11 21:22   ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 08/28] package/qt5virtualkeyboard: Convert " Andreas Naumann
2020-03-11 21:35   ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 09/28] package/quazip: " Andreas Naumann
2020-02-17 21:57   ` Thomas Petazzoni
2020-02-18 10:00     ` Andreas Naumann
2020-03-11 21:42       ` Thomas Petazzoni
2020-03-14 21:52         ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 10/28] package/qt5wayland: " Andreas Naumann
2020-03-11 21:48   ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 11/28] package/qt5webchannel: " Andreas Naumann
2020-03-11 21:49   ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 12/28] package/qt5webkit: " Andreas Naumann
2020-03-11 21:55   ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 13/28] package/qt5webkit-examples: " Andreas Naumann
2020-03-11 21:57   ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 14/28] package/qt5webengine: " Andreas Naumann
2020-03-11 22:01   ` Thomas Petazzoni
2020-03-16 21:15     ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 15/28] package/qt-webkit-kiosk: " Andreas Naumann
2020-03-11 22:04   ` Thomas Petazzoni
2020-03-16 21:53     ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 16/28] package/qt5cinex: " Andreas Naumann
2020-03-11 22:06   ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 17/28] core/pkg-infra: Fix package file statistics for parallel build Andreas Naumann
2020-03-11 22:07   ` Thomas Petazzoni
2020-03-16 21:54     ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 18/28] package/cmake: Fix for using -O in top-level make Andreas Naumann
2020-03-11 22:25   ` Thomas Petazzoni
2020-03-12 13:00     ` Arnout Vandecappelle
2020-03-12 13:22       ` Thomas Petazzoni
2020-03-16 22:15       ` Andreas Naumann
2020-03-17  6:08         ` Thomas Petazzoni
2020-03-17 19:02           ` Asaf Kahlon
2020-03-18 15:35             ` Andreas Naumann
2020-03-18 18:59               ` Asaf Kahlon
2020-03-18 21:03                 ` Andreas Naumann
2020-03-19 11:40                   ` Asaf Kahlon
2020-03-19 12:49                     ` Thomas Petazzoni
2020-03-19 13:53                       ` Asaf Kahlon
2020-03-19 14:00                         ` Thomas Petazzoni
2020-03-22 20:46                           ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 19/28] core/pkg-infra: Add per-package support in qmake infra Andreas Naumann
2020-04-10 20:25   ` Yann E. MORIN
2020-07-01 19:01   ` Yann E. MORIN
2020-07-20  6:14   ` Peter Korsgaard
2020-02-17 21:23 ` [Buildroot] [PATCH v6 20/28] qt5: Fix pkgconfig search path for per-package infrastructure Andreas Naumann
2020-06-19 10:22   ` Louis-Paul CORDIER
2020-07-01 21:15     ` Yann E. MORIN
2020-07-01 21:54       ` Yann E. MORIN
2020-07-02 17:38         ` Yann E. MORIN
2020-07-22 19:48         ` LP C
2020-07-22 20:26           ` Yann E. MORIN
2020-07-23 10:29             ` Andreas Naumann
2020-07-23 20:17               ` Yann E. MORIN
2020-07-24  7:17                 ` Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 21/28] package/python-sip: Fix qmake usage for per-package build Andreas Naumann
2020-03-11 22:30   ` Thomas Petazzoni
2020-03-16 22:32     ` Andreas Naumann
2020-07-01 21:56   ` Yann E. MORIN
2020-02-17 21:23 ` [Buildroot] [PATCH v6 22/28] package/python-pyqt5: " Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 23/28] package/qt5webengine: add libXdamage as XCB dependency Andreas Naumann
2020-03-12  8:15   ` Thomas Petazzoni
2020-03-16 22:40     ` Andreas Naumann
2020-03-22 21:58       ` Andreas Naumann
2020-03-22 22:03         ` Thomas Petazzoni
2020-02-17 21:23 ` [Buildroot] [PATCH v6 24/28] package/qt5webengine: Add optional dependency on qt5quickcontrols2 Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 25/28] package/qt5webengine: Add optional dependency on qt5location Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 26/28] package/qt5virtualkeyboard: Add optional dependency on qt5quickcontrols2 Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 27/28] package/qt53d: Add optional dependency on qt5multimedia Andreas Naumann
2020-02-17 21:23 ` [Buildroot] [PATCH v6 28/28] package/qt5charts: " Andreas Naumann
2020-02-18 21:33 ` [Buildroot] [PATCH v6 00/28] Qt5 qmake infra and per-package compatibility Peter Seiderer
2020-02-19 14:46   ` Andreas Naumann

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