aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@cold-front.org>2023-05-04 17:42:54 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2023-06-12 18:08:46 +0200
commitd86e2e82c15d186141713515dfd1373013aaebd5 (patch)
tree2115beacaedcaaf25f213d335b4f102212623ca2
parentb1fd5592eb5924b0d611b865588ec17903b4d164 (diff)
Commit 88c8564eb58d28768165fde0d6ab9e88b42ddc8f, "qtwebkit: Fix build with ruby 3.2+", also removed pyqt5. Presumably because the recipe was still using an old version of sip that was removed from oe-core. This adds the recipe back with support for current sip v6. Closes #503 Signed-off-by: Justin Bronder <jsbronder@cold-front.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes-python/pyqt5/python3-pyqt5_5.15.9.bb97
1 files changed, 97 insertions, 0 deletions
diff --git a/recipes-python/pyqt5/python3-pyqt5_5.15.9.bb b/recipes-python/pyqt5/python3-pyqt5_5.15.9.bb
new file mode 100644
index 00000000..8e82f664
--- /dev/null
+++ b/recipes-python/pyqt5/python3-pyqt5_5.15.9.bb
@@ -0,0 +1,97 @@
+SUMMARY = "Python qt5 Bindings"
+HOMEPAGE = "https://www.riverbankcomputing.com/software/pyqt"
+SECTION = "devel/python"
+LICENSE = "GPL-3.0-only"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit pypi python3-dir python3native qmake5 qmake5_paths
+
+SRC_URI[sha256sum] = "dc41e8401a90dc3e2b692b411bd5492ab559ae27a27424eed4bd3915564ec4c0"
+PYPI_PACKAGE = "PyQt5"
+
+S = "${WORKDIR}/PyQt5-${PV}"
+
+DEPENDS = " \
+ python3 \
+ python3-ply-native \
+ python3-pyqt-builder-native \
+ python3-toml-native \
+ qtbase \
+ qtdeclarative \
+ qtquickcontrols2 \
+ sip \
+ sip-native \
+"
+
+DISABLED_FEATURES = " \
+ PyQt_Desktop_OpenGL \
+ PyQt_Accessibility \
+ PyQt_SessionManager \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '', 'PyQt_OpenGL', d)} \
+"
+
+PYQT_MODULES = " \
+ QtCore \
+ QtGui \
+ QtNetwork \
+ QtXml \
+ QtNetwork \
+ QtQml \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'QtQuick QtWidgets QtQuickWidgets', '', d)} \
+"
+
+do_configure:prepend() {
+ local i
+ local extra_args
+
+ cd ${S}
+
+ for i in ${DISABLED_FEATURES}; do
+ extra_args+=" --disabled-feature=${i}"
+ done
+
+ for i in ${PYQT_MODULES}; do
+ extra_args+=" --enable=${i}"
+ done
+
+ sip-build \
+ --verbose \
+ --confirm-license \
+ --scripts-dir="${bindir}" \
+ --build-dir="${B}" \
+ --target-dir="${PYTHON_SITEPACKAGES_DIR}" \
+ --qmake=${OE_QMAKE_QMAKE} \
+ --no-make \
+ --enable=pylupdate \
+ --enable=pyrcc \
+ --enable=Qt \
+ --enable=QtCore \
+ --no-dbus-python \
+ ${extra_args}
+
+ QMAKE_PROFILES=${B}/PyQt5.pro
+}
+
+do_compile:append() {
+ sed -i "s,${STAGING_DIR_TARGET},," ${B}/inventory.txt
+}
+
+do_install:append() {
+ sed -i "s,exec .*nativepython3,exec ${bindir}/python3," ${D}/${bindir}/*
+}
+
+pyqt_fix_sources() {
+ find ${PKGD}/usr/src/debug/${PN} -type f -exec sed -i "s,\(${B}\|${S}\),/usr/src/debug/${PN}/${PV},g" {} \;
+}
+PACKAGESPLITFUNCS += "pyqt_fix_sources"
+
+FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR} ${OE_QMAKE_PATH_PLUGINS}"
+RDEPENDS:${PN} = " \
+ python3-core \
+ python3-pyqt5-sip \
+ qtbase \
+ qtdeclarative \
+ qtquickcontrols2 \
+ qtquickcontrols2-mkspecs \
+ sip \
+"