[Buildroot] [PATCH 1/1] package/python-pyqt5: Fix parallel build
Florent AUMAITRE
florent.aumaitre at medianesysteme.com
Tue Dec 14 11:13:30 UTC 2021
This patch fix build of python-pyqt5 package when parallel build is used
Signed-off-by: Florent AUMAITRE <florent.aumaitre at 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
More information about the buildroot
mailing list