[meta-qt4] sip: re-add 4.19

Submitted by Andreas Müller on Nov. 30, 2018, 3:34 p.m. | Patch ID: 156767

Details

Message ID 20181130153459.28202-1-schnitzeltony@gmail.com
State New
Headers show

Commit Message

Andreas Müller Nov. 30, 2018, 3:34 p.m.
* Haven't tested this but it seems unlikely that python-pyqt builds properly
  with '--sip-module PyQt5.sip' in meta-oe's sip
* I plan to move reworked sip to meta-qt5 and remove meta-oe's version
* remove FILES_${PN} - not necessary
* add "STRIP="" for native configure to avoid 'already stripped' warning
* tested build of python-pyqt

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 recipes-qt4/recipes-python/sip_4.19.bb | 41 ++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 recipes-qt4/recipes-python/sip_4.19.bb

Patch hide | download patch | download mbox

diff --git a/recipes-qt4/recipes-python/sip_4.19.bb b/recipes-qt4/recipes-python/sip_4.19.bb
new file mode 100644
index 0000000..b43c2d2
--- /dev/null
+++ b/recipes-qt4/recipes-python/sip_4.19.bb
@@ -0,0 +1,41 @@ 
+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 python-dir
+
+DEPENDS = "python"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/pyqt/sip/sip-${PV}/sip-${PV}.tar.gz"
+SRC_URI[md5sum] = "be51a05065c9323b98a2ec2966c64e6a"
+SRC_URI[sha256sum] = "014bf55f653e0d8bcc582705ef4fbd61e0859a36e959ab46d8fa060cdf0b5e27"
+
+BBCLASSEXTEND = "native"
+
+PACKAGES += "python-sip"
+
+do_configure_prepend_class-target() {
+    echo "py_platform = linux" > sip.cfg
+    echo "py_inc_dir = %(sysroot)/${includedir}/python%(py_major).%(py_minor)" >> 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%(py_major).%(py_minor)/site-packages" >> sip.cfg
+    echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
+    python 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%(py_major).%(py_minor)" >> 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%(py_major).%(py_minor)/site-packages" >> sip.cfg
+    echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
+    python configure.py --configuration sip.cfg --sysroot ${STAGING_DIR_NATIVE} STRIP=""
+}
+do_install() {
+    oe_runmake install
+}
+
+FILES_python-sip = "${libdir}/${PYTHON_DIR}/site-packages/"

Comments

Armin Kuster Nov. 30, 2018, 4:28 p.m.
On 11/30/18 7:34 AM, Andreas Müller wrote:
> * Haven't tested this but it seems unlikely that python-pyqt builds properly
>   with '--sip-module PyQt5.sip' in meta-oe's sip

Why not fix the version in meta-oe?

- armin
> * I plan to move reworked sip to meta-qt5 and remove meta-oe's version
> * remove FILES_${PN} - not necessary
> * add "STRIP="" for native configure to avoid 'already stripped' warning
> * tested build of python-pyqt
>
> Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
> ---
>  recipes-qt4/recipes-python/sip_4.19.bb | 41 ++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 recipes-qt4/recipes-python/sip_4.19.bb
>
> diff --git a/recipes-qt4/recipes-python/sip_4.19.bb b/recipes-qt4/recipes-python/sip_4.19.bb
> new file mode 100644
> index 0000000..b43c2d2
> --- /dev/null
> +++ b/recipes-qt4/recipes-python/sip_4.19.bb
> @@ -0,0 +1,41 @@
> +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 python-dir
> +
> +DEPENDS = "python"
> +
> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/pyqt/sip/sip-${PV}/sip-${PV}.tar.gz"
> +SRC_URI[md5sum] = "be51a05065c9323b98a2ec2966c64e6a"
> +SRC_URI[sha256sum] = "014bf55f653e0d8bcc582705ef4fbd61e0859a36e959ab46d8fa060cdf0b5e27"
> +
> +BBCLASSEXTEND = "native"
> +
> +PACKAGES += "python-sip"
> +
> +do_configure_prepend_class-target() {
> +    echo "py_platform = linux" > sip.cfg
> +    echo "py_inc_dir = %(sysroot)/${includedir}/python%(py_major).%(py_minor)" >> 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%(py_major).%(py_minor)/site-packages" >> sip.cfg
> +    echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
> +    python 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%(py_major).%(py_minor)" >> 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%(py_major).%(py_minor)/site-packages" >> sip.cfg
> +    echo "sip_sip_dir = ${D}/${datadir}/sip" >> sip.cfg
> +    python configure.py --configuration sip.cfg --sysroot ${STAGING_DIR_NATIVE} STRIP=""
> +}
> +do_install() {
> +    oe_runmake install
> +}
> +
> +FILES_python-sip = "${libdir}/${PYTHON_DIR}/site-packages/"
Andreas Müller Nov. 30, 2018, 5:30 p.m.
On Fri, Nov 30, 2018 at 5:28 PM akuster <akuster@mvista.com> wrote:
>
>
>
> On 11/30/18 7:34 AM, Andreas Müller wrote:
> > * Haven't tested this but it seems unlikely that python-pyqt builds properly
> >   with '--sip-module PyQt5.sip' in meta-oe's sip
>
> Why not fix the version in meta-oe?
>
> - armin

* This version one was considered working form meta-qt4 commit log
* As far as I can remember later version causes trouble when not
setting '--sip-module'. That would cause further efforts. I don't use
meta-qt4 / python-pyqt - just want to avoid/fix breakage and not
invest in enhancements on a orphaned layer

Andreas
Philip Balister Dec. 1, 2018, 3:09 a.m.
On 11/30/2018 12:30 PM, Andreas Müller wrote:
> On Fri, Nov 30, 2018 at 5:28 PM akuster <akuster@mvista.com> wrote:
>>
>>
>>
>> On 11/30/18 7:34 AM, Andreas Müller wrote:
>>> * Haven't tested this but it seems unlikely that python-pyqt builds properly
>>>   with '--sip-module PyQt5.sip' in meta-oe's sip
>>
>> Why not fix the version in meta-oe?
>>
>> - armin
> 
> * This version one was considered working form meta-qt4 commit log
> * As far as I can remember later version causes trouble when not
> setting '--sip-module'. That would cause further efforts. I don't use
> meta-qt4 / python-pyqt - just want to avoid/fix breakage and not
> invest in enhancements on a orphaned layer

I suspect sip has very few actual users besides the qt4 and qt5 layers.

There is a bunch of fiddly stuff we need to work through and tying it to
specific qt versions should help.

Philip

> 
> Andreas
>