diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2012-08-01 14:19:43 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-10-02 19:29:38 +0200 |
commit | ab6cd2bb734ba738bdbacfbeb8558e89abf29748 (patch) | |
tree | 2e7bc1395ad306bbd31d61b00bdf63becc37a4e9 /meta-oe/recipes-devtools/python/python-pyqt_4.9.5.bb | |
parent | a76f29b40651c9c87b5d7d1a2f450a5b013c1bcf (diff) | |
download | meta-openembedded-ab6cd2bb734ba738bdbacfbeb8558e89abf29748.tar.gz |
python-pyqt: upgrade to 4.9.5
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/python/python-pyqt_4.9.5.bb')
-rw-r--r-- | meta-oe/recipes-devtools/python/python-pyqt_4.9.5.bb | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/python/python-pyqt_4.9.5.bb b/meta-oe/recipes-devtools/python/python-pyqt_4.9.5.bb new file mode 100644 index 000000000..9feab4df8 --- /dev/null +++ b/meta-oe/recipes-devtools/python/python-pyqt_4.9.5.bb | |||
@@ -0,0 +1,109 @@ | |||
1 | DESCRIPTION = "Python Qt4 Bindings" | ||
2 | HOMEPAGE = "http://riverbankcomputing.co.uk" | ||
3 | AUTHOR = "Phil Thomson @ riverbank.co.uk" | ||
4 | SECTION = "devel/python" | ||
5 | LICENSE = "GPLv2 & GPLv3 & GPL_EXCEPTION" | ||
6 | LIC_FILES_CHKSUM = "\ | ||
7 | file://GPL_EXCEPTION.TXT;md5=b73b0be471db679533dc94781c14af58 \ | ||
8 | file://GPL_EXCEPTION_ADDENDUM.TXT;md5=c1e04ec2aa0911061005a801abf81e40 \ | ||
9 | file://OPENSOURCE-NOTICE.TXT;md5=6ad9123620cc04a22c394753ad4767d7 \ | ||
10 | file://LICENSE.GPL2;md5=276c6b9cad5f85a3af3534299825feff \ | ||
11 | file://LICENSE.GPL3;md5=eda942b9c6ba7eb0f40fee79e94950d5 \ | ||
12 | " | ||
13 | |||
14 | DEPENDS = "sip-native python-sip" | ||
15 | RDEPENDS_${PN} = "python-core" | ||
16 | |||
17 | PYQT_OE_VERSION = "Qt_4_8_3" | ||
18 | |||
19 | SRC_URI = "\ | ||
20 | ${SOURCEFORGE_MIRROR}/pyqt/PyQt-x11-gpl-${PV}.tar.gz \ | ||
21 | file://pyqt-generated.patch;apply=no \ | ||
22 | " | ||
23 | SRC_URI[md5sum] = "e4cdd6619c63655f7510efb4df8462fb" | ||
24 | SRC_URI[sha256sum] = "75ff0a3a088ae22c4d6e8adb242f7e593104af93933cbdd9900bc7b06f46191e" | ||
25 | S = "${WORKDIR}/PyQt-x11-gpl-${PV}" | ||
26 | |||
27 | # arm and mips machines need some extra patches | ||
28 | SRC_URI_append_arm = "\ | ||
29 | file://qreal_float_support.diff \ | ||
30 | " | ||
31 | |||
32 | SRC_URI_append_mipsel = "\ | ||
33 | file://qreal_float_support.diff \ | ||
34 | " | ||
35 | |||
36 | inherit qt4x11 sip distutils-base | ||
37 | |||
38 | PARALLEL_MAKE = "" | ||
39 | |||
40 | QMAKE_PROFILES = "pyqt.pro" | ||
41 | # NOTE: has to match with MIN(qt version we have in OE, last known Qt version by SIP/PyQt) | ||
42 | EXTRA_SIPTAGS = "-tWS_X11 -t${PYQT_OE_VERSION} -xVendorID -xPyQt_SessionManager -xPyQt_Accessibility" | ||
43 | EXTRA_OEMAKE = " MAKEFLAGS= " | ||
44 | |||
45 | # arm and mips need extra params for the qreal issue | ||
46 | EXTRA_SIPTAGS_append_arm = " -x PyQt_qreal_double" | ||
47 | EXTRA_SIPTAGS_append_mipsel = " -x PyQt_qreal_double" | ||
48 | |||
49 | SIP_MODULES = "QtCore QtDeclarative QtGui QtNetwork QtSql QtSvg QtXml QtWebKit" | ||
50 | MAKE_MODULES = "qpy ${SIP_MODULES}" | ||
51 | |||
52 | EXTRA_QMAKEVARS_POST += "\ | ||
53 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/Qt \ | ||
54 | INCLUDEPATH+=${STAGING_INCDIR}/${PYTHON_DIR} \ | ||
55 | INCLUDEPATH+=../qpy/QtCore \ | ||
56 | INCLUDEPATH+=../qpy/QtGui \ | ||
57 | INCLUDEPATH+=../qpy/QtDeclarative \ | ||
58 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtCore \ | ||
59 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtGui \ | ||
60 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtDeclarative \ | ||
61 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtWebKit \ | ||
62 | INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/QtNetwork \ | ||
63 | " | ||
64 | FIX_QREAL = "\ | ||
65 | " | ||
66 | |||
67 | do_generate_prepend() { | ||
68 | for i in ${FIX_QREAL}; do | ||
69 | sed -i -e s,qreal,float,g sip/$i | ||
70 | done | ||
71 | } | ||
72 | |||
73 | do_configure_prepend() { | ||
74 | printf "TEMPLATE=subdirs\nSUBDIRS=${MAKE_MODULES}\n" >pyqt.pro | ||
75 | printf "TEMPLATE=subdirs\nSUBDIRS=QtCore QtDeclarative QtGui\n" >qpy/qpy.pro | ||
76 | ln -sf ./qpycore.pro qpy/QtCore/QtCore.pro | ||
77 | ln -sf ./qpydeclarative.pro qpy/QtDeclarative/QtDeclarative.pro | ||
78 | ln -sf ./qpygui.pro qpy/QtGui/QtGui.pro | ||
79 | echo "INCLUDEPATH+=${S}/QtCore" >>qpy/QtCore/QtCore.pro | ||
80 | echo "INCLUDEPATH+=${S}/QtGui" >>qpy/QtGui/QtGui.pro | ||
81 | echo "INCLUDEPATH+=${S}/QtDeclarative" >>qpy/QtDeclarative/QtDeclarative.pro | ||
82 | echo "LIBS+=-L../qpy/QtGui/ -lqpygui" >>QtGui/QtGui.pro | ||
83 | echo "LIBS+=-L../qpy/QtCore/ -lqpycore" >>QtCore/QtCore.pro | ||
84 | echo "LIBS+=-L../qpy/QtDeclarative/ -lqpydeclarative" >>QtDeclarative/QtDeclarative.pro | ||
85 | # hack for broken generated code (duplicated sipCpp declaration). | ||
86 | patch -p1 < ${WORKDIR}/pyqt-generated.patch | ||
87 | } | ||
88 | |||
89 | do_install() { | ||
90 | install -d ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4 | ||
91 | for module in ${SIP_MODULES} | ||
92 | do | ||
93 | echo "from PyQt4.${module} import *\n" >> ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4/Qt.py | ||
94 | install -m 0755 ${module}/lib${module}.so ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4/${module}.so | ||
95 | done | ||
96 | cp -pPR elementtree ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4/ | ||
97 | cp __init__.py ${D}${libdir}/${PYTHON_DIR}/site-packages/PyQt4/ | ||
98 | |||
99 | install -d ${STAGING_SIPDIR}/qt/ | ||
100 | install -d ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages | ||
101 | for module in ${SIP_MODULES} | ||
102 | do | ||
103 | install -m 0644 ${S}/sip/${module}/*.sip ${STAGING_SIPDIR}/qt/ | ||
104 | install -m 0755 ${module}/lib${module}.so ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/${module}.so | ||
105 | done | ||
106 | } | ||
107 | |||
108 | FILES_${PN} = "${libdir}/${PYTHON_DIR}/site-packages" | ||
109 | |||