summaryrefslogtreecommitdiffstats
path: root/meta-extras/packages/python
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 /meta-extras/packages/python
parentf11feacddf98d506902a7666bf795e1d1b7aa867 (diff)
downloadpoky-478a35dd7d11f289059c3fbcee749fbae74db54c.tar.gz
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
Diffstat (limited to 'meta-extras/packages/python')
-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 0000000000..0738c59ada
--- /dev/null
+++ b/meta-extras/packages/python/fix-path.inc
@@ -0,0 +1,22 @@
1do_install_append() {
2 for i in `find ${D} -name "*.py"` ; do \
3 sed -i -e s:${D}::g $i
4 done
5
6 for i in `find ${D} -name "*.la"` ; do \
7 sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i
8 done
9
10 if test -e ${D}${bindir} ; then
11 for i in ${D}${bindir}/* ; do \
12 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
13 done
14 fi
15
16 if test -e ${D}${sbindir} ; then
17 for i in ${D}${sbindir}/* ; do \
18 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
19 done
20 fi
21}
22
diff --git a/meta-extras/packages/python/python-pygtk2/acinclude.m4 b/meta-extras/packages/python/python-pygtk/acinclude.m4
index 53518fb2eb..53518fb2eb 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 0000000000..dca19ce5ed
--- /dev/null
+++ b/meta-extras/packages/python/python-pygtk/fix-gtkunixprint.patch
@@ -0,0 +1,16 @@
1Index: pygtk-2.10.0/gtk/gtkunixprint.override
2===================================================================
3--- pygtk-2.10.0.orig/gtk/gtkunixprint.override
4+++ pygtk-2.10.0/gtk/gtkunixprint.override
5@@ -105,11 +105,7 @@ _wrap_gtk_print_job_get_surface(PyGObjec
6 if (pyg_error_check(&error))
7 return NULL;
8
9-#if PYCAIRO_VERSION_HEX >= 0x1010600
10 return PycairoSurface_FromSurface(surface, NULL);
11-#else
12- return PycairoSurface_FromSurface(surface, NULL, NULL);
13-#endif
14 }
15 %%
16 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 0000000000..53518fb2eb
--- /dev/null
+++ b/meta-extras/packages/python/python-pygtk/python-pygtk2/acinclude.m4
@@ -0,0 +1,90 @@
1## this one is commonly used with AM_PATH_PYTHONDIR ...
2dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
3dnl Check if a module containing a given symbol is visible to python.
4AC_DEFUN(AM_CHECK_PYMOD,
5[AC_REQUIRE([AM_PATH_PYTHON])
6py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
7AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
8AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
9ifelse([$2],[], [prog="
10import sys
11try:
12 import $1
13except ImportError:
14 sys.exit(1)
15except:
16 sys.exit(0)
17sys.exit(0)"], [prog="
18import $1
19$1.$2"])
20if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
21 then
22 eval "py_cv_mod_$py_mod_var=yes"
23 else
24 eval "py_cv_mod_$py_mod_var=no"
25 fi
26])
27py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
28if test "x$py_val" != xno; then
29 AC_MSG_RESULT(yes)
30 ifelse([$3], [],, [$3
31])dnl
32else
33 AC_MSG_RESULT(no)
34 ifelse([$4], [],, [$4
35])dnl
36fi
37])
38
39dnl a macro to check for ability to create python extensions
40dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
41dnl function also defines PYTHON_INCLUDES
42AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
43[AC_REQUIRE([AM_PATH_PYTHON])
44AC_MSG_CHECKING(for headers required to compile python extensions)
45dnl deduce PYTHON_INCLUDES
46AC_ARG_WITH(python-includes,
47 [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval)
48if test x$py_exec_prefix != x; then
49PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
50else
51py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
52py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
53PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
54if test "$py_prefix" != "$py_exec_prefix"; then
55 PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
56fi
57fi
58AC_SUBST(PYTHON_INCLUDES)
59dnl check if the headers exist:
60save_CPPFLAGS="$CPPFLAGS"
61CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
62AC_TRY_CPP([#include <Python.h>],dnl
63[AC_MSG_RESULT(found)
64$1],dnl
65[AC_MSG_RESULT(not found)
66$2])
67CPPFLAGS="$save_CPPFLAGS"
68])
69
70dnl
71dnl JH_ADD_CFLAG(FLAG)
72dnl checks whether the C compiler supports the given flag, and if so, adds
73dnl it to $CFLAGS. If the flag is already present in the list, then the
74dnl check is not performed.
75AC_DEFUN([JH_ADD_CFLAG],
76[
77case " $CFLAGS " in
78*@<:@\ \ @:>@$1@<:@\ \ @:>@*)
79 ;;
80*)
81 save_CFLAGS="$CFLAGS"
82 CFLAGS="$CFLAGS $1"
83 AC_MSG_CHECKING([whether [$]CC understands $1])
84 AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
85 AC_MSG_RESULT($jh_has_option)
86 if test $jh_has_option = no; then
87 CFLAGS="$save_CFLAGS"
88 fi
89 ;;
90esac])
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 bc798bf567..0000000000
--- a/meta-extras/packages/python/python-pygtk2_2.8.6.bb
+++ /dev/null
@@ -1,28 +0,0 @@
1DESCRIPTION = "Python GTK+ Bindings"
2SECTION = "devel/python"
3PRIORITY = "optional"
4DEPENDS = "gtk+ libglade"
5RDEPENDS = "python-shell"
6SRCNAME = "pygtk"
7LICENSE = "LGPL"
8PR = "r2"
9
10SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.8/${SRCNAME}-${PV}.tar.bz2 \
11 file://acinclude.m4"
12S = "${WORKDIR}/${SRCNAME}-${PV}"
13
14inherit autotools pkgconfig distutils-base
15
16EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
17
18do_configure_prepend() {
19 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
20}
21
22do_stage() {
23 autotools_stage_includes
24 install -m 0755 codegen/pygtk-codegen-2.0 ${STAGING_BINDIR_NATIVE}/
25}
26
27FILES_${PN}-dbg = "${libdir}/python2.4/site-packages/gtk-2.0/.debug/ \
28 ${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 0000000000..0584d119c9
--- /dev/null
+++ b/meta-extras/packages/python/python-pygtk_2.10.4.bb
@@ -0,0 +1,42 @@
1DESCRIPTION = "Python GTK+ 2.10.x Bindings"
2SECTION = "devel/python"
3# needs gtk+ 2.10.x
4DEPENDS = "gtk+ libglade python-pycairo python-pygobject"
5RDEPENDS = "python-shell python-pycairo python-pygobject"
6PROVIDES = "python-pygtk2"
7SRCNAME = "pygtk"
8LICENSE = "LGPL"
9PR = "ml3"
10
11SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.10/${SRCNAME}-${PV}.tar.bz2 \
12 file://fix-gtkunixprint.patch;patch=1 \
13 file://acinclude.m4"
14S = "${WORKDIR}/${SRCNAME}-${PV}"
15
16EXTRA_OECONF = "--disable-docs"
17EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
18
19inherit autotools pkgconfig distutils-base
20
21do_configure_prepend() {
22 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
23}
24
25do_configure_prepend() {
26 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
27}
28
29require fix-path.inc
30
31FILES_${PN}-dev += "${libdir}/pygtk/2.0 ${bindir}/pygtk-*"
32
33do_stage() {
34 autotools_stage_includes
35 sed -i s:/usr/share:${STAGING_DATADIR}: codegen/pygtk-codegen-2.0
36 install -m 0755 codegen/pygtk-codegen-2.0 ${STAGING_BINDIR_NATIVE}/
37 install -d ${STAGING_DATADIR}/pygtk/2.0/codegen
38 install -d ${STAGING_DATADIR}/pygtk/2.0/defs/
39 cp -pPr codegen/*.py* ${STAGING_DATADIR}/pygtk/2.0/codegen/
40 cp -pPr *.defs ${STAGING_DATADIR}/pygtk/2.0/defs/
41 cp -pPr gtk/*.defs ${STAGING_DATADIR}/pygtk/2.0/defs/
42}