summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-11-15 14:12:31 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-11-15 14:12:31 +0000
commit478a35dd7d11f289059c3fbcee749fbae74db54c (patch)
treedae2dae78743f6999326c7c1237ea60211633929
parentf11feacddf98d506902a7666bf795e1d1b7aa867 (diff)
downloadopenembedded-core-478a35dd7d11f289059c3fbcee749fbae74db54c.tar.gz
openembedded-core-478a35dd7d11f289059c3fbcee749fbae74db54c.tar.bz2
openembedded-core-478a35dd7d11f289059c3fbcee749fbae74db54c.tar.xz
openembedded-core-478a35dd7d11f289059c3fbcee749fbae74db54c.zip
python-pygtk: upgrade to 2.10.4 from OE and add PROVIDES to keep compability
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3183 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta-extras/packages/python/fix-path.inc22
-rw-r--r--meta-extras/packages/python/python-pygtk/acinclude.m4 (renamed from meta-extras/packages/python/python-pygtk2/acinclude.m4)0
-rw-r--r--meta-extras/packages/python/python-pygtk/fix-gtkunixprint.patch16
-rw-r--r--meta-extras/packages/python/python-pygtk/python-pygtk2/acinclude.m490
-rw-r--r--meta-extras/packages/python/python-pygtk2_2.8.6.bb28
-rw-r--r--meta-extras/packages/python/python-pygtk_2.10.4.bb42
6 files changed, 170 insertions, 28 deletions
diff --git a/meta-extras/packages/python/fix-path.inc b/meta-extras/packages/python/fix-path.inc
new file mode 100644
index 000000000..0738c59ad
--- /dev/null
+++ b/meta-extras/packages/python/fix-path.inc
@@ -0,0 +1,22 @@
+do_install_append() {
+ for i in `find ${D} -name "*.py"` ; do \
+ sed -i -e s:${D}::g $i
+ done
+
+ for i in `find ${D} -name "*.la"` ; do \
+ sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
+ done
+
+ if test -e ${D}${bindir} ; then
+ for i in ${D}${bindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+
+ if test -e ${D}${sbindir} ; then
+ for i in ${D}${sbindir}/* ; do \
+ sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
+ done
+ fi
+}
+
diff --git a/meta-extras/packages/python/python-pygtk2/acinclude.m4 b/meta-extras/packages/python/python-pygtk/acinclude.m4
index 53518fb2e..53518fb2e 100644
--- a/meta-extras/packages/python/python-pygtk2/acinclude.m4
+++ b/meta-extras/packages/python/python-pygtk/acinclude.m4
diff --git a/meta-extras/packages/python/python-pygtk/fix-gtkunixprint.patch b/meta-extras/packages/python/python-pygtk/fix-gtkunixprint.patch
new file mode 100644
index 000000000..dca19ce5e
--- /dev/null
+++ b/meta-extras/packages/python/python-pygtk/fix-gtkunixprint.patch
@@ -0,0 +1,16 @@
+Index: pygtk-2.10.0/gtk/gtkunixprint.override
+===================================================================
+--- pygtk-2.10.0.orig/gtk/gtkunixprint.override
++++ pygtk-2.10.0/gtk/gtkunixprint.override
+@@ -105,11 +105,7 @@ _wrap_gtk_print_job_get_surface(PyGObjec
+ if (pyg_error_check(&error))
+ return NULL;
+
+-#if PYCAIRO_VERSION_HEX >= 0x1010600
+ return PycairoSurface_FromSurface(surface, NULL);
+-#else
+- return PycairoSurface_FromSurface(surface, NULL, NULL);
+-#endif
+ }
+ %%
+ override gtk_print_job_send kwargs
diff --git a/meta-extras/packages/python/python-pygtk/python-pygtk2/acinclude.m4 b/meta-extras/packages/python/python-pygtk/python-pygtk2/acinclude.m4
new file mode 100644
index 000000000..53518fb2e
--- /dev/null
+++ b/meta-extras/packages/python/python-pygtk/python-pygtk2/acinclude.m4
@@ -0,0 +1,90 @@
+## this one is commonly used with AM_PATH_PYTHONDIR ...
+dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl Check if a module containing a given symbol is visible to python.
+AC_DEFUN(AM_CHECK_PYMOD,
+[AC_REQUIRE([AM_PATH_PYTHON])
+py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
+AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
+ifelse([$2],[], [prog="
+import sys
+try:
+ import $1
+except ImportError:
+ sys.exit(1)
+except:
+ sys.exit(0)
+sys.exit(0)"], [prog="
+import $1
+$1.$2"])
+if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
+ then
+ eval "py_cv_mod_$py_mod_var=yes"
+ else
+ eval "py_cv_mod_$py_mod_var=no"
+ fi
+])
+py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
+if test "x$py_val" != xno; then
+ AC_MSG_RESULT(yes)
+ ifelse([$3], [],, [$3
+])dnl
+else
+ AC_MSG_RESULT(no)
+ ifelse([$4], [],, [$4
+])dnl
+fi
+])
+
+dnl a macro to check for ability to create python extensions
+dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_INCLUDES
+AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+[AC_REQUIRE([AM_PATH_PYTHON])
+AC_MSG_CHECKING(for headers required to compile python extensions)
+dnl deduce PYTHON_INCLUDES
+AC_ARG_WITH(python-includes,
+ [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
+if test x$py_exec_prefix != x; then
+PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+else
+py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
+if test "$py_prefix" != "$py_exec_prefix"; then
+ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+fi
+fi
+AC_SUBST(PYTHON_INCLUDES)
+dnl check if the headers exist:
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+AC_TRY_CPP([#include <Python.h>],dnl
+[AC_MSG_RESULT(found)
+$1],dnl
+[AC_MSG_RESULT(not found)
+$2])
+CPPFLAGS="$save_CPPFLAGS"
+])
+
+dnl
+dnl JH_ADD_CFLAG(FLAG)
+dnl checks whether the C compiler supports the given flag, and if so, adds
+dnl it to $CFLAGS. If the flag is already present in the list, then the
+dnl check is not performed.
+AC_DEFUN([JH_ADD_CFLAG],
+[
+case " $CFLAGS " in
+*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
+ ;;
+*)
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+ AC_MSG_CHECKING([whether [$]CC understands $1])
+ AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
+ AC_MSG_RESULT($jh_has_option)
+ if test $jh_has_option = no; then
+ CFLAGS="$save_CFLAGS"
+ fi
+ ;;
+esac])
diff --git a/meta-extras/packages/python/python-pygtk2_2.8.6.bb b/meta-extras/packages/python/python-pygtk2_2.8.6.bb
deleted file mode 100644
index bc798bf56..000000000
--- a/meta-extras/packages/python/python-pygtk2_2.8.6.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-DESCRIPTION = "Python GTK+ Bindings"
-SECTION = "devel/python"
-PRIORITY = "optional"
-DEPENDS = "gtk+ libglade"
-RDEPENDS = "python-shell"
-SRCNAME = "pygtk"
-LICENSE = "LGPL"
-PR = "r2"
-
-SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.8/${SRCNAME}-${PV}.tar.bz2 \
- file://acinclude.m4"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit autotools pkgconfig distutils-base
-
-EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
-
-do_configure_prepend() {
- install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
-}
-
-do_stage() {
- autotools_stage_includes
- install -m 0755 codegen/pygtk-codegen-2.0 ${STAGING_BINDIR_NATIVE}/
-}
-
-FILES_${PN}-dbg = "${libdir}/python2.4/site-packages/gtk-2.0/.debug/ \
- ${libdir}/python2.4/site-packages/gtk-2.0/gtk/.debug/"
diff --git a/meta-extras/packages/python/python-pygtk_2.10.4.bb b/meta-extras/packages/python/python-pygtk_2.10.4.bb
new file mode 100644
index 000000000..0584d119c
--- /dev/null
+++ b/meta-extras/packages/python/python-pygtk_2.10.4.bb
@@ -0,0 +1,42 @@
+DESCRIPTION = "Python GTK+ 2.10.x Bindings"
+SECTION = "devel/python"
+# needs gtk+ 2.10.x
+DEPENDS = "gtk+ libglade python-pycairo python-pygobject"
+RDEPENDS = "python-shell python-pycairo python-pygobject"
+PROVIDES = "python-pygtk2"
+SRCNAME = "pygtk"
+LICENSE = "LGPL"
+PR = "ml3"
+
+SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.10/${SRCNAME}-${PV}.tar.bz2 \
+ file://fix-gtkunixprint.patch;patch=1 \
+ file://acinclude.m4"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+EXTRA_OECONF = "--disable-docs"
+EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
+
+inherit autotools pkgconfig distutils-base
+
+do_configure_prepend() {
+ install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+do_configure_prepend() {
+ install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+require fix-path.inc
+
+FILES_${PN}-dev += "${libdir}/pygtk/2.0 ${bindir}/pygtk-*"
+
+do_stage() {
+ autotools_stage_includes
+ sed -i s:/usr/share:${STAGING_DATADIR}: codegen/pygtk-codegen-2.0
+ install -m 0755 codegen/pygtk-codegen-2.0 ${STAGING_BINDIR_NATIVE}/
+ install -d ${STAGING_DATADIR}/pygtk/2.0/codegen
+ install -d ${STAGING_DATADIR}/pygtk/2.0/defs/
+ cp -pPr codegen/*.py* ${STAGING_DATADIR}/pygtk/2.0/codegen/
+ cp -pPr *.defs ${STAGING_DATADIR}/pygtk/2.0/defs/
+ cp -pPr gtk/*.defs ${STAGING_DATADIR}/pygtk/2.0/defs/
+}