Skip to contentSkip to conversation

qwt: Add recipe.

PATCH In review Philip Balister 2 participants 5 messages May 13, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 qwt: Add recipe.

* Build tested for raspberrypi3.

---
 recipes-qt/qwt/qwt-qt5.inc      | 47 +++++++++++++++++++++++++++++++++++++++++
 recipes-qt/qwt/qwt-qt5_6.1.3.bb |  8 +++++++
 2 files changed, 55 insertions(+)
 create mode 100644 recipes-qt/qwt/qwt-qt5.inc
 create mode 100644 recipes-qt/qwt/qwt-qt5_6.1.3.bb
recipes-qt/qwt/qwt-qt5.inc new file +47 -0
new file mode 100644
index 0000000..ee4fbd7
@@ -0,0 +1,47 @@
+DESCRIPTION = "Qt Widget Extension for Technical Applications"
+SECTION = "libs"
+
+# LGPLv2.1 + some exceptions
+LICENSE = "QWTv1.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dac2743472b0462ff3cfb4af42051c88"
+
+DEPENDS = "qtbase qtsvg qttools"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/qwt/qwt-${PV}.tar.bz2;name=qwt \
+          "
+#           file://qwt6.patch 
+#           file://qwt6-fix-linking-with-ld-gold.patch"
+
+S = "${WORKDIR}/qwt-${PV}"
+
+do_configure_prepend() {
+    cd ${S}
+    sed -i -e 's:RELEASE_SUFFIX      = :RELEASE_SUFFIX      = ${QT_LIBINFIX}:' *.pri
+    sed -i -e 's:qtAddLibrary(qwt:qtAddLibrary(qwt)${QT_LIBINFIX}:g' *.prf
+    sed -e 's/# QWT_CONFIG     += QwtExamples/QWT_CONFIG     += QwtExamples/g' -i qwtconfig.pri
+    sed -i -e 's:/usr/local/qwt-$$QWT_VERSION:${D}${prefix}:g' ${S}/*.pri
+}
+
+do_install() {
+    cd ${S}
+    oe_runmake -e install
+#    install -d ${D}${datadir}/doc/${PN}
+#    mv ${D}${prefix}/doc/* ${D}${datadir}/doc/${PN}/
+#    rmdir ${D}${prefix}/doc
+#    cd ${S}/examples
+#    install -d ${D}/${bindir}
+#    cd bin${QT_LIBINFIX}/
+#    for i in * ; do
+#        cp -pPR ${i} ${D}/${bindir}/${i}${QT_LIBINFIX}
+#    done
+#    install -d ${D}${libdir}/${QT_DIR_NAME}
+#    mv ${D}${prefix}/plugins ${D}${libdir}/${QT_DIR_NAME}
+}
+
+PACKAGES_prepend = "${PN}-examples ${PN}-features ${PN}-plugins "
+FILES_${PN}-examples = "${bindir}/*"
+FILES_${PN}-features = "${prefix}/features"
+FILES_${PN}-plugins = "${prefix}/plugins/designer/*.so"
+FILES_${PN}-dbg += "${prefix}/plugins/designer/.debug"
+FILES_${PN}-doc += "${prefix}/doc"
+
recipes-qt/qwt/qwt-qt5_6.1.3.bb new file +8 -0
new file mode 100644
index 0000000..626bd0a
@@ -0,0 +1,8 @@
+inherit qmake5
+
+require qwt-qt5.inc
+
+SRC_URI[qwt.md5sum] = "19d1f5fa5e22054d22ee3accc37c54ba"
+SRC_URI[qwt.sha256sum] = "f3ecd34e72a9a2b08422fb6c8e909ca76f4ce5fa77acad7a2883b701f4309733"
+
+RPROVIDES_${PN}-dev = "libqwt-qt5-dev"
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 python-pyqt5: Add recipe.

* Build tested on raspberrypi3
* I promise to chase the patch upstream.

---
 recipes-python/pyqt5/files/fix-sm.patch    | 17 ++++++++
 recipes-python/pyqt5/python-pyqt5_5.8.2.bb | 68 ++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 recipes-python/pyqt5/files/fix-sm.patch
 create mode 100644 recipes-python/pyqt5/python-pyqt5_5.8.2.bb
recipes-python/pyqt5/files/fix-sm.patch new file +17 -0
new file mode 100644
index 0000000..f2936a2
@@ -0,0 +1,17 @@
+--- PyQt5_gpl-5.8.2/sip/QtGui/qguiapplication.sip.orig	2017-05-13 13:28:42.523392315 -0400
++++ PyQt5_gpl-5.8.2/sip/QtGui/qguiapplication.sip	2017-05-13 13:30:08.081207211 -0400
+@@ -270,12 +270,14 @@
+ %End
+ 
+ public:
++%If (PyQt_SessionManager)
+ %If (Qt_5_6_0 -)
+     static bool isFallbackSessionManagementEnabled();
+ %End
+ %If (Qt_5_6_0 -)
+     static void setFallbackSessionManagementEnabled(bool);
+ %End
++%End
+ 
+ signals:
+ %If (Qt_5_6_0 -)
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

Re: [meta-qt5][PATCH 2/2] python-pyqt5: Add recipe.

Quoted 4 lines · Philip Balister

* Build tested on raspberrypi3
* I promise to chase the patch upstream.

Hi Philip,

I played around with this too - but did not finish and am happy to you put some progress on it.

Quoted 75 lines
---
 recipes-python/pyqt5/files/fix-sm.patch    | 17 ++++++++
 recipes-python/pyqt5/python-pyqt5_5.8.2.bb | 68 ++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 recipes-python/pyqt5/files/fix-sm.patch
 create mode 100644 recipes-python/pyqt5/python-pyqt5_5.8.2.bb
recipes-python/pyqt5/files/fix-sm.patch new file +17 -0
new file mode 100644
index 0000000..f2936a2
@@ -0,0 +1,17 @@
+--- PyQt5_gpl-5.8.2/sip/QtGui/qguiapplication.sip.orig 2017-05-13 13:28:42.523392315 -0400
++++ PyQt5_gpl-5.8.2/sip/QtGui/qguiapplication.sip      2017-05-13 13:30:08.081207211 -0400
+@@ -270,12 +270,14 @@
+ %End
+
+ public:
++%If (PyQt_SessionManager)
+ %If (Qt_5_6_0 -)
+     static bool isFallbackSessionManagementEnabled();
+ %End
+ %If (Qt_5_6_0 -)
+     static void setFallbackSessionManagementEnabled(bool);
+ %End
++%End
+
+ signals:
+ %If (Qt_5_6_0 -)
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +39 -0
new file mode 100644
index 0000000..b4c0a8d
@@ -0,0 +1,68 @@
+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 \
+"
+DEPENDS = "sip sip-native qtbase python"
+
+SRC_URI = "\
+    ${SOURCEFORGE_MIRROR}/pyqt/PyQt5_gpl-${PV}.tar.gz \
+    file://fix-sm.patch \
+"
+SRC_URI[md5sum] = "c3048e9d242f3e72fd393630da1d971a"
+SRC_URI[sha256sum] = "ebd70515b30bbd6098fee29e6271a6696b1183c5530ee30e6ba9aaab195536e8"
+
+S = "${WORKDIR}/PyQt5_gpl-${PV}"
+
+
+inherit qmake5 pythonnative python-dir distro_features_check
+# depends on qt4-x11-free
+REQUIRED_DISTRO_FEATURES = "x11"
+
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+DISABLED_FEATURES = "PyQt_Desktop_OpenGL PyQt_Accessibility PyQt_SessionManager"
+
+DISABLED_FEATURES_append_arm = " PyQt_qreal_double"
+
+PYQT_MODULES = "QtCore QtGui QtNetwork"
+PYQT_MODULES_aarch64 = "QtCore QtGui QtNetwork"
+
+do_configure_prepend() {
+    cd ${S}
+    echo "py_platform = linux" > pyqt.cfg

recipes-python/pyqt5/python-pyqt5_5.8.2.bb line 49

Quoted 10 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +10 -0
+    echo "py_inc_dir = %(sysroot)/$includedir/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "py_pylib_dir = %(sysroot)/${libdir}/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "py_pylib_lib = python%(py_major).%(py_minor)mu" >> pyqt.cfg
+    echo "pyqt_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> pyqt.cfg
+    echo "pyqt_bin_dir = ${D}/${bindir}" >> pyqt.cfg
+    echo "pyqt_sip_dir = ${D}/${datadir}/sip/PyQt5" >> pyqt.cfg
+    echo "pyuic_interpreter = ${D}/${bindir}/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "pyqt_disabled_features = ${DISABLED_FEATURES}" >> pyqt.cfg
+    echo "qt_shared = True" >> pyqt.cfg
+    echo "[Qt 5.7]" >> pyqt.cfg

^ How about

    QT_VERSION=`${OE_QMAKE_QMAKE} -query QT_VERSION`
    echo "[Qt $QT_VERSION]" >> pyqt.cfg

That worked for me

Quoted 5 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +5 -0
+    echo "pyqt_modules = ${PYQT_MODULES}" >> pyqt.cfg
+    echo yes | python configure.py --verbose --qmake  ${STAGING_BINDIR_NATIVE}/qt5/qmake --configuration pyqt.cfg --sysroot ${STAGING_DIR_HOST}
+}
+
+do_compile() {

recipes-python/pyqt5/python-pyqt5_5.8.2.bb line 64

Quoted 10 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +10 -0
+    cd ${S}
+    oe_runmake
+}
+
+do_install() {
+    cd ${S}
+    oe_runmake install
+}
+
+RDEPENDS_${PN} = "python-core python-sip"

^ I don't know your use case but do you think there is a chance to support python3?

Quoted 7 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +4 -1
+
+FILES_${PN} += "${libdir}/${PYTHON_DIR}/site-packages ${datadir}/sip/PyQt5/"
+FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/*/.debug/"
+
--

2.7.4

Best regards

Andreas

#3 lore raw

Re: [meta-qt5][PATCH 2/2] python-pyqt5: Add recipe.

Quoted 95 lines · Andreas Müller
Quoted 4 lines · Philip Balister

* Build tested on raspberrypi3
* I promise to chase the patch upstream.

Hi Philip,

I played around with this too - but did not finish and am happy to you put some progress on it.

Quoted 75 lines
---
 recipes-python/pyqt5/files/fix-sm.patch    | 17 ++++++++
 recipes-python/pyqt5/python-pyqt5_5.8.2.bb | 68 ++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 recipes-python/pyqt5/files/fix-sm.patch
 create mode 100644 recipes-python/pyqt5/python-pyqt5_5.8.2.bb
recipes-python/pyqt5/files/fix-sm.patch new file +17 -0
new file mode 100644
index 0000000..f2936a2
@@ -0,0 +1,17 @@
+--- PyQt5_gpl-5.8.2/sip/QtGui/qguiapplication.sip.orig 2017-05-13 13:28:42.523392315 -0400
++++ PyQt5_gpl-5.8.2/sip/QtGui/qguiapplication.sip      2017-05-13 13:30:08.081207211 -0400
+@@ -270,12 +270,14 @@
+ %End
+
+ public:
++%If (PyQt_SessionManager)
+ %If (Qt_5_6_0 -)
+     static bool isFallbackSessionManagementEnabled();
+ %End
+ %If (Qt_5_6_0 -)
+     static void setFallbackSessionManagementEnabled(bool);
+ %End
++%End
+
+ signals:
+ %If (Qt_5_6_0 -)
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +39 -0
new file mode 100644
index 0000000..b4c0a8d
@@ -0,0 +1,68 @@
+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 \
+"
+DEPENDS = "sip sip-native qtbase python"
+
+SRC_URI = "\
+    ${SOURCEFORGE_MIRROR}/pyqt/PyQt5_gpl-${PV}.tar.gz \
+    file://fix-sm.patch \
+"
+SRC_URI[md5sum] = "c3048e9d242f3e72fd393630da1d971a"
+SRC_URI[sha256sum] = "ebd70515b30bbd6098fee29e6271a6696b1183c5530ee30e6ba9aaab195536e8"
+
+S = "${WORKDIR}/PyQt5_gpl-${PV}"
+
+
+inherit qmake5 pythonnative python-dir distro_features_check
+# depends on qt4-x11-free
+REQUIRED_DISTRO_FEATURES = "x11"
+
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+DISABLED_FEATURES = "PyQt_Desktop_OpenGL PyQt_Accessibility PyQt_SessionManager"
+
+DISABLED_FEATURES_append_arm = " PyQt_qreal_double"
+
+PYQT_MODULES = "QtCore QtGui QtNetwork"
+PYQT_MODULES_aarch64 = "QtCore QtGui QtNetwork"
+
+do_configure_prepend() {
+    cd ${S}
+    echo "py_platform = linux" > pyqt.cfg

recipes-python/pyqt5/python-pyqt5_5.8.2.bb line 49

Quoted 10 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +10 -0
+    echo "py_inc_dir = %(sysroot)/$includedir/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "py_pylib_dir = %(sysroot)/${libdir}/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "py_pylib_lib = python%(py_major).%(py_minor)mu" >> pyqt.cfg
+    echo "pyqt_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> pyqt.cfg
+    echo "pyqt_bin_dir = ${D}/${bindir}" >> pyqt.cfg
+    echo "pyqt_sip_dir = ${D}/${datadir}/sip/PyQt5" >> pyqt.cfg
+    echo "pyuic_interpreter = ${D}/${bindir}/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "pyqt_disabled_features = ${DISABLED_FEATURES}" >> pyqt.cfg
+    echo "qt_shared = True" >> pyqt.cfg
+    echo "[Qt 5.7]" >> pyqt.cfg

^ How about

Quoted 3 lines
    QT_VERSION=`${OE_QMAKE_QMAKE} -query QT_VERSION`
    echo "[Qt $QT_VERSION]" >> pyqt.cfg

That worked for me

I'll give it a try and resubmit.

Quoted 9 lines
Quoted 9 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +9 -0
+    echo "pyqt_modules = ${PYQT_MODULES}" >> pyqt.cfg
+    echo yes | python configure.py --verbose --qmake  ${STAGING_BINDIR_NATIVE}/qt5/qmake --configuration pyqt.cfg --sysroot ${STAGING_DIR_HOST}
+}
+
+do_compile() {
+    cd ${S}
+    oe_runmake
+}
+
Quoted 8 lines

recipes-python/pyqt5/python-pyqt5_5.8.2.bb line 64

Quoted 6 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +6 -0
+do_install() {
+    cd ${S}
+    oe_runmake install
+}
+
+RDEPENDS_${PN} = "python-core python-sip"

^ I don't know your use case but do you think there is a chance to support python3?

I using this to support gnuradio, and one of the next things is get this all working with python3. Do we need to support both python2 and 3 for pyqt?

Thanks,

Philip

Quoted 11 lines
Quoted 7 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +4 -1
+
+FILES_${PN} += "${libdir}/${PYTHON_DIR}/site-packages ${datadir}/sip/PyQt5/"
+FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/*/.debug/"
+
--

2.7.4

Best regards

Andreas

#4 lore raw

Re: [meta-qt5][PATCH 2/2] python-pyqt5: Add recipe.

Quoted 121 lines · Philip Balister
Quoted 95 lines · Andreas Müller
Quoted 4 lines · Philip Balister

* Build tested on raspberrypi3
* I promise to chase the patch upstream.

Hi Philip,

I played around with this too - but did not finish and am happy to you put some progress on it.

Quoted 75 lines
---
 recipes-python/pyqt5/files/fix-sm.patch    | 17 ++++++++
 recipes-python/pyqt5/python-pyqt5_5.8.2.bb | 68 ++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 recipes-python/pyqt5/files/fix-sm.patch
 create mode 100644 recipes-python/pyqt5/python-pyqt5_5.8.2.bb
recipes-python/pyqt5/files/fix-sm.patch new file +17 -0
new file mode 100644
index 0000000..f2936a2
@@ -0,0 +1,17 @@
+--- PyQt5_gpl-5.8.2/sip/QtGui/qguiapplication.sip.orig 2017-05-13 13:28:42.523392315 -0400
++++ PyQt5_gpl-5.8.2/sip/QtGui/qguiapplication.sip      2017-05-13 13:30:08.081207211 -0400
+@@ -270,12 +270,14 @@
+ %End
+
+ public:
++%If (PyQt_SessionManager)
+ %If (Qt_5_6_0 -)
+     static bool isFallbackSessionManagementEnabled();
+ %End
+ %If (Qt_5_6_0 -)
+     static void setFallbackSessionManagementEnabled(bool);
+ %End
++%End
+
+ signals:
+ %If (Qt_5_6_0 -)
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +39 -0
new file mode 100644
index 0000000..b4c0a8d
@@ -0,0 +1,68 @@
+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 \
+"
+DEPENDS = "sip sip-native qtbase python"
+
+SRC_URI = "\
+    ${SOURCEFORGE_MIRROR}/pyqt/PyQt5_gpl-${PV}.tar.gz \
+    file://fix-sm.patch \
+"
+SRC_URI[md5sum] = "c3048e9d242f3e72fd393630da1d971a"
+SRC_URI[sha256sum] = "ebd70515b30bbd6098fee29e6271a6696b1183c5530ee30e6ba9aaab195536e8"
+
+S = "${WORKDIR}/PyQt5_gpl-${PV}"
+
+
+inherit qmake5 pythonnative python-dir distro_features_check
+# depends on qt4-x11-free
+REQUIRED_DISTRO_FEATURES = "x11"
+
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+DISABLED_FEATURES = "PyQt_Desktop_OpenGL PyQt_Accessibility PyQt_SessionManager"
+
+DISABLED_FEATURES_append_arm = " PyQt_qreal_double"
+
+PYQT_MODULES = "QtCore QtGui QtNetwork"
+PYQT_MODULES_aarch64 = "QtCore QtGui QtNetwork"
+
+do_configure_prepend() {
+    cd ${S}
+    echo "py_platform = linux" > pyqt.cfg

recipes-python/pyqt5/python-pyqt5_5.8.2.bb line 49

Quoted 10 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +10 -0
+    echo "py_inc_dir = %(sysroot)/$includedir/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "py_pylib_dir = %(sysroot)/${libdir}/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "py_pylib_lib = python%(py_major).%(py_minor)mu" >> pyqt.cfg
+    echo "pyqt_module_dir = ${D}/${libdir}/python%(py_major).%(py_minor)/site-packages" >> pyqt.cfg
+    echo "pyqt_bin_dir = ${D}/${bindir}" >> pyqt.cfg
+    echo "pyqt_sip_dir = ${D}/${datadir}/sip/PyQt5" >> pyqt.cfg
+    echo "pyuic_interpreter = ${D}/${bindir}/python%(py_major).%(py_minor)" >> pyqt.cfg
+    echo "pyqt_disabled_features = ${DISABLED_FEATURES}" >> pyqt.cfg
+    echo "qt_shared = True" >> pyqt.cfg
+    echo "[Qt 5.7]" >> pyqt.cfg

^ How about

Quoted 3 lines
    QT_VERSION=`${OE_QMAKE_QMAKE} -query QT_VERSION`
    echo "[Qt $QT_VERSION]" >> pyqt.cfg

That worked for me

I'll give it a try and resubmit.

Quoted 9 lines
Quoted 9 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +9 -0
+    echo "pyqt_modules = ${PYQT_MODULES}" >> pyqt.cfg
+    echo yes | python configure.py --verbose --qmake  ${STAGING_BINDIR_NATIVE}/qt5/qmake --configuration pyqt.cfg --sysroot ${STAGING_DIR_HOST}
+}
+
+do_compile() {
+    cd ${S}
+    oe_runmake
+}
+
Quoted 8 lines

recipes-python/pyqt5/python-pyqt5_5.8.2.bb line 64

Quoted 6 lines
recipes-python/pyqt5/python-pyqt5_5.8.2.bb new file +6 -0
+do_install() {
+    cd ${S}
+    oe_runmake install
+}
+
+RDEPENDS_${PN} = "python-core python-sip"

^ I don't know your use case but do you think there is a chance to support python3?

Quoted 2 lines

I using this to support gnuradio, and one of the next things is get this all working with python3. Do we need to support both python2 and 3 for pyqt?

I think it is not an easy task to support both. My personal preference would be python3 support only. Python2/3 was the point I started struggling for python-pyqt5. Would python3 support need python-sip replacement (causing trouble for meta-qt4)? Don't know how much time you want to invest - maybe we should start with python2 first...

Quoted 5 lines

Thanks,

Philip

Andreas