From 746ed64373c5073a59ee2a17c3a01df6c432778e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 22 Mar 2019 15:09:57 +0100 Subject: [PATCH] readd our python3-pyqt5 for thud MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- conf/layer.conf | 2 +- extends-meta-qt5/python-pyqt5_%.bbappend | 18 ----- extends-meta-qt5/python3-pyqt5_%.bbappend | 18 ----- ...e-to-find-python3-sip-code-generator.patch | 31 ++++++++ recipes-bindings/python3-pyqt5_5.9.2.bb | 76 +++++++++++++++++++ recipes-bindings/sip3_4.19.8.bb | 44 +++++++++++ 6 files changed, 152 insertions(+), 37 deletions(-) delete mode 100644 extends-meta-qt5/python-pyqt5_%.bbappend delete mode 100644 extends-meta-qt5/python3-pyqt5_%.bbappend create mode 100644 recipes-bindings/python3-pyqt5/0001-Make-sure-to-find-python3-sip-code-generator.patch create mode 100644 recipes-bindings/python3-pyqt5_5.9.2.bb create mode 100644 recipes-bindings/sip3_4.19.8.bb diff --git a/conf/layer.conf b/conf/layer.conf index b80b48e5..b84d12ab 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -2,7 +2,7 @@ BBPATH .= ":${LAYERDIR}" # recipes -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*/*.bb ${LAYERDIR}/recipes-*/*/*/*/*.bb" +BBFILES += "${LAYERDIR}/recipes-*/*.bb ${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*/*.bb ${LAYERDIR}/recipes-*/*/*/*/*.bb" # appends BBFILES += "${LAYERDIR}/extends-*/*.bb ${LAYERDIR}/extends-*/*.bbappend" diff --git a/extends-meta-qt5/python-pyqt5_%.bbappend b/extends-meta-qt5/python-pyqt5_%.bbappend deleted file mode 100644 index b7b5582d..00000000 --- a/extends-meta-qt5/python-pyqt5_%.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -DISABLED_FEATURES = "" - -PACKAGECONFIG_append = " \ - sql \ - \ - qtlocation \ - qtmultimedia \ - qtdeclarative \ - qtsensors \ - qtserialport \ - qtsvg \ - qtwebchannel \ - qtwebengine \ - qtwebkit \ - qtwebsockets \ - qtx11extras \ - qtxmlpatterns \ -" diff --git a/extends-meta-qt5/python3-pyqt5_%.bbappend b/extends-meta-qt5/python3-pyqt5_%.bbappend deleted file mode 100644 index b7b5582d..00000000 --- a/extends-meta-qt5/python3-pyqt5_%.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -DISABLED_FEATURES = "" - -PACKAGECONFIG_append = " \ - sql \ - \ - qtlocation \ - qtmultimedia \ - qtdeclarative \ - qtsensors \ - qtserialport \ - qtsvg \ - qtwebchannel \ - qtwebengine \ - qtwebkit \ - qtwebsockets \ - qtx11extras \ - qtxmlpatterns \ -" diff --git a/recipes-bindings/python3-pyqt5/0001-Make-sure-to-find-python3-sip-code-generator.patch b/recipes-bindings/python3-pyqt5/0001-Make-sure-to-find-python3-sip-code-generator.patch new file mode 100644 index 00000000..d0286e08 --- /dev/null +++ b/recipes-bindings/python3-pyqt5/0001-Make-sure-to-find-python3-sip-code-generator.patch @@ -0,0 +1,31 @@ +From f583921012ed1f4e853f41d4fd3d95d1a819ac03 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sat, 4 Aug 2018 02:48:14 +0200 +Subject: [PATCH] Make sure to find python3 sip code generator +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Andreas Müller +--- + configure.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.py b/configure.py +index a263efb..daefc0e 100644 +--- a/configure.py ++++ b/configure.py +@@ -522,7 +522,7 @@ class TargetConfiguration: + self.qtconf_prefix = '' + self.qt_shared = False + self.qt_version = 0 +- self.sip = self._find_exe('sip5', 'sip') ++ self.sip = self._find_exe('sip3') + self.sip_h_version = None + self.sip_inc_dir = self.py_venv_inc_dir + self.static = False +-- +2.14.4 + diff --git a/recipes-bindings/python3-pyqt5_5.9.2.bb b/recipes-bindings/python3-pyqt5_5.9.2.bb new file mode 100644 index 00000000..f0deb894 --- /dev/null +++ b/recipes-bindings/python3-pyqt5_5.9.2.bb @@ -0,0 +1,76 @@ +SUMMARY = "Python Qt5 Bindings" +AUTHOR = "Phil Thomson @ riverbank.co.uk" +HOMEPAGE = "http://riverbankcomputing.co.uk" +SECTION = "devel/python" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "\ + https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-${PV}/PyQt5_gpl-${PV}.tar.gz \ + file://0001-Make-sure-to-find-python3-sip-code-generator.patch \ +" +SRC_URI[md5sum] = "33d6d2ab8183da17ac18b8132a4b278e" +SRC_URI[sha256sum] = "c190dac598c97b0113ca5e7a37c71c623f02d1d713088addfacac4acfa4b8394" + +PE = "1" + +inherit qmake5 python3native + +DEPENDS += "sip3-native sip3 qtbase python3" +DEPENDS_append_class-target = "qtsvg" + +S = "${WORKDIR}/PyQt5_gpl-${PV}" +B = "${S}" + +DISABLED_FEATURES = "PyQt_Desktop_OpenGL" + +DISABLED_FEATURES_append_arm = " PyQt_qreal_double" + +PYQT_MODULES = "QtCore QtGui QtNetwork QtWidgets QtSvg" +PYQT_MODULES_class-native = "QtCore" +PYQT_MODULES_aarch64 = "QtCore QtGui QtNetwork QtWidgets QtSvg" + +# full paths +SYSROOTDIR = "${STAGING_DIR_HOST}" +SYSROOTDIR_class-native = "${STAGING_DIR_NATIVE}" +INCLUDEDIR = "${STAGING_INCDIR}" +INCLUDEDIR_class-native = "${STAGING_INCDIR_NATIVE}" +LIBDIR = "${STAGING_LIBDIR}" +LIBDIR_class-native = "${STAGING_LIBDIR_NATIVE}" +PYTHONEXEC="${bindir}/${PYTHON_PN}" +PYTHONEXEC_class-native="${PYTHON}" + +do_configure() { + echo "py_platform = linux" > pyqt.cfg + echo "py_inc_dir = ${INCLUDEDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" >> pyqt.cfg + echo "py_pylib_dir = ${LIBDIR}/python${PYTHON_BASEVERSION}" >> pyqt.cfg + echo "py_pylib_lib = python${PYTHON_BASEVERSION}${PYTHON_ABI}" >> pyqt.cfg + echo "pyqt_module_dir = ${D}/${PYTHON_SITEPACKAGES_DIR}" >> pyqt.cfg + echo "pyqt_bin_dir = ${D}/${bindir}" >> pyqt.cfg + echo "pyqt_sip_dir = ${D}/${datadir}/sip/PyQt5" >> pyqt.cfg + echo "pyuic_interpreter = ${PYTHONEXEC}" >> pyqt.cfg + echo "pyqt_disabled_features = ${DISABLED_FEATURES}" >> pyqt.cfg + echo "qt_shared = True" >> pyqt.cfg + QT_VERSION=`${OE_QMAKE_QMAKE} -query QT_VERSION` + echo "[Qt $QT_VERSION]" >> pyqt.cfg + echo "pyqt_modules = ${PYQT_MODULES}" >> pyqt.cfg + echo yes | python3 configure.py --verbose --qmake ${OE_QMAKE_QMAKE} --configuration pyqt.cfg --sysroot ${SYSROOTDIR} +} + +do_install() { + oe_runmake install +} + +do_install_class-native() { + oe_runmake install +} + +RDEPENDS_${PN}_append_class-target = " python3-core python3-sip" + +FILES_${PN} += " \ + ${libdir}/${PYTHON_DIR}/site-packages \ + ${datadir}/sip/PyQt5 \ +" + +BBCLASSEXTEND += "native nativesdk" + diff --git a/recipes-bindings/sip3_4.19.8.bb b/recipes-bindings/sip3_4.19.8.bb new file mode 100644 index 00000000..a51f77c3 --- /dev/null +++ b/recipes-bindings/sip3_4.19.8.bb @@ -0,0 +1,44 @@ +SUMMARY = "SIP is a C++/Python Wrapper Generator" +HOMEPAGE = "http://www.riverbankcomputing.co.uk/sip" +SECTION = "devel" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://LICENSE-GPL2;md5=e91355d8a6f8bd8f7c699d62863c7303" + +inherit python3-dir + +DEPENDS = "python3" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/pyqt/sip/sip-${PV}/sip-${PV}.tar.gz" +SRC_URI[md5sum] = "0625fb20347d4ff1b5da551539be0727" +SRC_URI[sha256sum] = "7eaf7a2ea7d4d38a56dd6d2506574464bddf7cf284c960801679942377c297bc" +BPN = "sip" + +BBCLASSEXTEND = "native" + +PACKAGES += "python3-sip" + +do_configure_prepend_class-target() { + echo "py_platform = linux" > sip.cfg + echo "py_inc_dir = %(sysroot)/${includedir}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" >> sip.cfg + echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg + echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg + echo "sip_module_dir = ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages" >> sip.cfg + echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg + python3 configure.py --configuration sip.cfg --sysroot ${STAGING_DIR_HOST} CC="${CC}" CXX="${CXX}" LINK="${CXX}" STRIP="" LINK_SHLIB="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LFLAGS="${LDFLAGS}" +} +do_configure_prepend_class-native() { + echo "py_platform = linux" > sip.cfg + echo "py_inc_dir = ${includedir}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" >> sip.cfg + echo "sip_bin_dir = ${D}/${bindir}" >> sip.cfg + echo "sip_inc_dir = ${D}/${includedir}" >> sip.cfg + echo "sip_module_dir = ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages" >> sip.cfg + echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg + python3 configure.py --configuration sip.cfg --sysroot ${STAGING_DIR_NATIVE} +} +do_install() { + oe_runmake install + # avoid conflicts with sip for python2 + mv ${D}/${bindir}/sip ${D}/${bindir}/sip3 +} + +FILES_python3-sip = "${libdir}/${PYTHON_DIR}/site-packages/"