All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2/2] package/python-pyqt5: Fix parallel build
@ 2021-12-14 11:04 Florent AUMAITRE
  0 siblings, 0 replies; only message in thread
From: Florent AUMAITRE @ 2021-12-14 11:04 UTC (permalink / raw)
  To: buildroot; +Cc: Florent AUMAITRE, Asaf Kahlon, Manuel Vögele

This patch fix build of python-pyqt5 package when parallel build is used

Signed-off-by: Florent AUMAITRE <florent.aumaitre@medianesysteme.com>
---
 package/python-pyqt5/python-pyqt5.mk | 17 +++++++++++++++++
 package/python-pyqt5/qt.conf.in      |  7 +++++++
 2 files changed, 24 insertions(+)
 create mode 100644 package/python-pyqt5/qt.conf.in

diff --git a/package/python-pyqt5/python-pyqt5.mk b/package/python-pyqt5/python-pyqt5.mk
index 8f28c90d15..e54352f7dd 100644
--- a/package/python-pyqt5/python-pyqt5.mk
+++ b/package/python-pyqt5/python-pyqt5.mk
@@ -152,6 +152,23 @@ define PYTHON_PYQT5_GENERATE_QTDETAIL
 	)
 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 and
+# tweak the per-package install pathes
+define PYTHON_PYQT5_INSTALL_QT_CONF
+	rm -f $(HOST_DIR)/bin/qt.conf
+	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
+		$(PYTHON_PYQT5_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
+endef
+
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define PYTHON_PYQT5_QT_CONF_FIXUP
+	$(PYTHON_PYQT5_INSTALL_QT_CONF)
+endef
+endif
+
+PYTHON_PYQT5_PRE_CONFIGURE_HOOKS += PYTHON_PYQT5_QT_CONF_FIXUP
+
 PYTHON_PYQT5_CONF_OPTS = \
 	--bindir $(TARGET_DIR)/usr/bin \
 	--destdir $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT5_PYTHON_DIR)/site-packages \
diff --git a/package/python-pyqt5/qt.conf.in b/package/python-pyqt5/qt.conf.in
new file mode 100644
index 0000000000..2215cbd4e1
--- /dev/null
+++ b/package/python-pyqt5/qt.conf.in
@@ -0,0 +1,7 @@
+[Paths]
+Prefix=/usr
+HostPrefix=@@HOST_DIR@@
+Sysroot=@@STAGING_DIR@@
+Headers=/usr/include/qt5
+Plugins=/usr/lib/qt/plugins
+Examples=/usr/lib/qt/examples
-- 
2.17.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-14 11:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 11:04 [Buildroot] [PATCH 2/2] package/python-pyqt5: Fix parallel build Florent AUMAITRE

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.