Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/python-pyqt5: Fix parallel build
@ 2021-12-14 11:13 Florent AUMAITRE
  2021-12-26 23:00 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Florent AUMAITRE @ 2021-12-14 11:13 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] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/python-pyqt5: Fix parallel build
  2021-12-14 11:13 [Buildroot] [PATCH 1/1] package/python-pyqt5: Fix parallel build Florent AUMAITRE
@ 2021-12-26 23:00 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-12-26 23:00 UTC (permalink / raw)
  To: Florent AUMAITRE; +Cc: Manuel Vögele, Asaf Kahlon, buildroot

Hello Florent,

On Tue, 14 Dec 2021 12:13:30 +0100
Florent AUMAITRE <florent.aumaitre@medianesysteme.com> wrote:

> This patch fix build of python-pyqt5 package when parallel build is used
> 
> Signed-off-by: Florent AUMAITRE <florent.aumaitre@medianesysteme.com>

So in fact, if I understand correctly, python-pyqt5 needs the same
fixup as qt5base. Obviously, what we will be looking for is a solution
that does not involve duplicating the logic that we have in qt5.mk
into python-pyqt5.mk.

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

Could you try simply doing:

PYTHON_PYQT5_PRE_CONFIGURE_HOOKS += QT5_QT_CONF_FIXUP

this should automatically re-use the existing QT5_INSTALL_QT_CONF macro
from package/qt5/qt5.mk, which will re-generate the qt.conf file in
your package HOST_DIR.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-12-26 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14 11:13 [Buildroot] [PATCH 1/1] package/python-pyqt5: Fix parallel build Florent AUMAITRE
2021-12-26 23:00 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox