[oe-commits] Simon Busch : python-pyside-embedded: add initial version of this recipe

git version control git at git.openembedded.org
Tue May 10 22:22:24 UTC 2011


Module: openembedded.git
Branch: master
Commit: e2ac55d5d37c4fb412e9fdd08ac0635306d34447
URL:    http://git.openembedded.org/?p=openembedded.git&a=commit;h=e2ac55d5d37c4fb412e9fdd08ac0635306d34447

Author: Simon Busch <morphis at gravedo.de>
Date:   Tue May  3 18:10:33 2011 +0200

python-pyside-embedded: add initial version of this recipe

Signed-off-by: Simon Busch <morphis at gravedo.de>

---

 .../cmake-add-modules-path.patch                   |   12 ++++
 .../no-accessibility-support.patch                 |   22 +++++++
 .../python-pyside-embedded/support-qws.patch       |   38 +++++++++++
 recipes/pyside/python-pyside-embedded_1.0.2.bb     |   10 +++
 recipes/pyside/python-pyside.inc                   |   66 ++++++++++++++++++++
 5 files changed, 148 insertions(+), 0 deletions(-)

diff --git a/recipes/pyside/python-pyside-embedded/cmake-add-modules-path.patch b/recipes/pyside/python-pyside-embedded/cmake-add-modules-path.patch
new file mode 100644
index 0000000..5da40fd
--- /dev/null
+++ b/recipes/pyside/python-pyside-embedded/cmake-add-modules-path.patch
@@ -0,0 +1,12 @@
+diff -Naur pyside-qt4.7+1.0.2-orig/CMakeLists.txt pyside-qt4.7+1.0.2/CMakeLists.txt
+--- pyside-qt4.7+1.0.2-orig/CMakeLists.txt	2011-04-28 22:43:01.000000000 +0200
++++ pyside-qt4.7+1.0.2/CMakeLists.txt	2011-05-02 06:12:39.834156001 +0200
+@@ -5,6 +5,8 @@
+ cmake_minimum_required(VERSION 2.6)
+ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Macros/
+                       ${CMAKE_MODULE_PATH})
++set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules/
++                      ${CMAKE_MODULE_PATH})
+ find_package(GeneratorRunner 0.6.9 REQUIRED)
+ find_package(Shiboken 1.0.2 REQUIRED)
+ find_package(Qt4 4.5.0 REQUIRED)
diff --git a/recipes/pyside/python-pyside-embedded/no-accessibility-support.patch b/recipes/pyside/python-pyside-embedded/no-accessibility-support.patch
new file mode 100644
index 0000000..cf3c367
--- /dev/null
+++ b/recipes/pyside/python-pyside-embedded/no-accessibility-support.patch
@@ -0,0 +1,22 @@
+diff -Naur pyside-qt4.7+1.0.2-orig/PySide/QtGui/CMakeLists.txt pyside-qt4.7+1.0.2/PySide/QtGui/CMakeLists.txt
+--- pyside-qt4.7+1.0.2-orig/PySide/QtGui/CMakeLists.txt	2011-04-28 22:43:01.000000000 +0200
++++ pyside-qt4.7+1.0.2/PySide/QtGui/CMakeLists.txt	2011-05-03 16:12:39.316884000 +0200
+@@ -90,7 +90,6 @@
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_paintcontext_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_selection_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstracttextdocumentlayout_wrapper.cpp
+-${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qaccessibleevent_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qactionevent_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qactiongroup_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qaction_wrapper.cpp
+diff -Naur pyside-qt4.7+1.0.2-orig/PySide/QtGui/typesystem_gui_common.xml pyside-qt4.7+1.0.2/PySide/QtGui/typesystem_gui_common.xml
+--- pyside-qt4.7+1.0.2-orig/PySide/QtGui/typesystem_gui_common.xml	2011-04-28 22:43:01.000000000 +0200
++++ pyside-qt4.7+1.0.2/PySide/QtGui/typesystem_gui_common.xml	2011-05-03 16:12:23.926884000 +0200
+@@ -2809,7 +2809,6 @@
+   </object-type>
+   <object-type name="QMouseEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::MouseButtonDblClick || %1-&gt;type() == QEvent::MouseButtonPress || %1-&gt;type() == QEvent::MouseButtonRelease || %1-&gt;type() == QEvent::MouseMove"/>
+   <object-type name="QPaintEvent" copyable= "false" polymorphic-id-expression="%1-&gt;type() == QEvent::Paint"/>
+-  <object-type name="QAccessibleEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::AccessibilityDescription || %1-&gt;type() == QEvent::AccessibilityHelp"/>
+   <object-type name="QGestureEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::Gesture || %1-&gt;type() == QEvent::GestureOverride">
+     <modify-function signature="activeGestures()const">
+       <modify-argument index="return">
diff --git a/recipes/pyside/python-pyside-embedded/support-qws.patch b/recipes/pyside/python-pyside-embedded/support-qws.patch
new file mode 100644
index 0000000..fed126f
--- /dev/null
+++ b/recipes/pyside/python-pyside-embedded/support-qws.patch
@@ -0,0 +1,38 @@
+diff -Naur pyside-qt4.7+1.0.2-orig/CMakeLists.txt pyside-qt4.7+1.0.2/CMakeLists.txt
+--- pyside-qt4.7+1.0.2-orig/CMakeLists.txt	2011-04-28 22:43:01.000000000 +0200
++++ pyside-qt4.7+1.0.2/CMakeLists.txt	2011-05-01 19:01:11.824051001 +0200
+@@ -105,6 +105,8 @@
+ elseif(Q_WS_SIMULATOR)
+     set(ENABLE_SIMULATOR "1")
+     set(AUTO_OS "simulator")
++elseif(Q_WS_QWS)
++    set(AUTO_OS "qws")
+ else()
+     message(FATAL_ERROR "OS not supported")
+ endif()
+diff -Naur pyside-qt4.7+1.0.2-orig/PySide/QtGui/typesystem_gui_qws.xml pyside-qt4.7+1.0.2/PySide/QtGui/typesystem_gui_qws.xml
+--- pyside-qt4.7+1.0.2-orig/PySide/QtGui/typesystem_gui_qws.xml	1970-01-01 01:00:00.000000000 +0100
++++ pyside-qt4.7+1.0.2/PySide/QtGui/typesystem_gui_qws.xml	2011-05-01 19:01:27.544051001 +0200
+@@ -0,0 +1,22 @@
++<?xml version="1.0"?>
++<!--
++    This file is part of PySide project.
++    Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
++    Contact: PySide team <contact at pyside.org>
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Lesser General Public
++    License as published by the Free Software Foundation; either
++    version 2.1 of the License, or (at your option) any later version.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Lesser General Public License for more details.
++
++    You should have received a copy of the GNU Lesser General Public
++    License along with this library; if not, write to the Free Software
++    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
++-->
++<typesystem package="PySide.QtGui">
++</typesystem>
diff --git a/recipes/pyside/python-pyside-embedded_1.0.2.bb b/recipes/pyside/python-pyside-embedded_1.0.2.bb
new file mode 100644
index 0000000..865d0b0
--- /dev/null
+++ b/recipes/pyside/python-pyside-embedded_1.0.2.bb
@@ -0,0 +1,10 @@
+require python-pyside.inc
+
+PR = "${INC_PR}.0"
+SRC_URI += " \
+ file://no-accessibility-support.patch \
+ file://support-qws.patch \
+"
+
+SRC_URI[code.md5sum] = "62d718a81fc7e7d19919f17fff5b43a6"
+SRC_URI[code.sha256sum] = "a74db2de659009364f61ec2f2751cbef0dd59410673795880ec3cc9f0f810960"
diff --git a/recipes/pyside/python-pyside.inc b/recipes/pyside/python-pyside.inc
new file mode 100644
index 0000000..c018925
--- /dev/null
+++ b/recipes/pyside/python-pyside.inc
@@ -0,0 +1,66 @@
+QTV = "4.7"
+DESCRIPTION = "Python Bindings for Qt ${QTV}"
+DEPENDS = "apiextractor-native generatorrunner-native libshiboken"
+RDEPENDS_${pn} = "python-core"
+PROVIDES = "python-pyside"
+INC_PR = "r0"
+
+SRC_URI = " \
+ http://www.pyside.org/files/pyside-qt${QTV}+${PV}.tar.bz2;name=code \
+ file://FindQt4.cmake \
+ file://MacroPushRequiredVars.cmake \
+"
+S = "${WORKDIR}/pyside-qt${QTV}+${PV}"
+
+RDEPENDS_${PN} = " \
+ python-lang \
+"
+
+export HOST_SYS
+export BUILD_SYS
+
+# NOTE this should be reworked when a x11 version of qt4 is needed
+inherit qt4e cmake pkgconfig python-dir
+
+EXTRA_OECMAKE = " \
+	-DQT_LIBRARY_DIR=${STAGING_TARGET_LIBDIR} \
+	-DQT_INSTALL_LIBS=${OE_QMAKE_LIBDIR_QT} \
+	-DQT_MOC_EXECUTABLE=${OE_QMAKE_MOC} \
+	-DQT_UIC_EXECUTABLE=${OE_QMAKE_UIC} \
+	-DQT_UIC3_EXECUTABLE=${OE_QMAKE_UIC3} \
+	-DQT_RCC_EXECUTABLE=${OE_QMAKE_RCC} \
+	-DQT_QMAKE_EXECUTABLE=${OE_QMAKE_QMAKE} \
+	-DQT_MKSPECS_DIR=${STAGING_DATADIR}/qt4/mkspecs \
+	-DQT_DBUSXML2CPP_EXECUTABLE=${OE_QMAKE_QDBUSXML2CPP} \
+	-DQT_DBUSCPP2XML_EXECUTABLE=${OE_QMAKE_QDBUSCPP2XML} \
+	-DQT_INCLUDE_DIR=${OE_QMAKE_INCDIR_QT} \
+	-DQT_QTCORE_INCLUDE_DIR=${OE_QMAKE_INCDIR_QT}/QtCore \
+	-DQT_LIBINFIX=${QT_LIBINFIX} \
+	-DQT_DIR_NAME=${QT_DIR_NAME} \
+	-DCMAKE_LIBRARY_PATH=${STAGING_TARGET_LIBDIR} \
+	-DCMAKE_TOOLCHAIN_SYSTEM_ROOT:PATH=${STAGING_DIR_TARGET} \
+	-DCMAKE_STAGING_DIR_TARGET:PATH=${STAGING_DIR_TARGET} \
+	-DCMAKE_STAGING_DIR_NATIVE:PATH=${STAGING_DIR_NATIVE} \
+"
+
+do_generate_toolchain_file_append() {
+	# even search in shiboken cmake modules path for modules
+	echo "set( CMAKE_MODULE_PATH ${STAGING_LIBDIR}/cmake/Shiboken-${PV} \${CMAKE_MODULE_PATH} )" >> ${WORKDIR}/toolchain.cmake
+	echo "set( CMAKE_MODULE_PATH ${S}/cmake/Modules \${CMAKE_MODULE_PATH} )" >> ${WORKDIR}/toolchain.cmake
+}
+
+do_configure_prepend() {
+	mkdir -p ${S}/cmake/Modules
+	cp ${WORKDIR}/FindQt4.cmake ${S}/cmake/Modules/FindQt4.cmake
+	cp ${WORKDIR}/MacroPushRequiredVars.cmake ${S}/cmake/Modules/MacroPushRequiredVars.cmake
+}
+
+FILES_${PN} =+ " \
+	${libdir}/${PYTHON_DIR}/site-packages/PySide/*.so \
+	${libdir}/${PYTHON_DIR}/site-packages/PySide/*.py \
+"
+FILES_${PN}-dbg =+ "${libdir}/${PYTHON_DIR}/site-packages/PySide/.debug"
+FILES_${PN}-dev =+ " \
+	${datadir}/PySide/typesystems \
+	${libdir}/cmake \
+"





More information about the Openembedded-commits mailing list