summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-pygtk
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python-pygtk')
-rw-r--r--meta/recipes-devtools/python/python-pygtk/acinclude.m490
-rw-r--r--meta/recipes-devtools/python/python-pygtk/add-gtk-types.defs-into-gdk.c-dependence.patch32
-rw-r--r--meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch20
-rw-r--r--meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch13
-rw-r--r--meta/recipes-devtools/python/python-pygtk/nodocs.patch15
-rw-r--r--meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch16
-rw-r--r--meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m490
-rw-r--r--meta/recipes-devtools/python/python-pygtk/update-dependences-of-defs.c.patch38
8 files changed, 314 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-pygtk/acinclude.m4 b/meta/recipes-devtools/python/python-pygtk/acinclude.m4
new file mode 100644
index 0000000000..53518fb2eb
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/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/recipes-devtools/python/python-pygtk/add-gtk-types.defs-into-gdk.c-dependence.patch b/meta/recipes-devtools/python/python-pygtk/add-gtk-types.defs-into-gdk.c-dependence.patch
new file mode 100644
index 0000000000..df0f9cd6c0
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/add-gtk-types.defs-into-gdk.c-dependence.patch
@@ -0,0 +1,32 @@
1Upstream-Status: Submitted
2
3add gtk-types.defs into gdk.c dependence
4
5gdk.c depends on gtk-types.defs but
6gdk/Makefile.am miss this. This will cause
7build error sometimes when built
8with multi-jobbing, so add gtk-types.defs into
9gdk.c dependence.
10
11Signed-off-by: Song.Li <Song.Li@windriver.com>
12Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
13---
14 gtk/Makefile.am | 2 +-
15 1 files changed, 1 insertions(+), 1 deletions(-)
16
17diff --git a/gtk/Makefile.am b/gtk/Makefile.am
18index 7bb5d0c..4a88351 100644
19--- a/gtk/Makefile.am
20+++ b/gtk/Makefile.am
21@@ -214,7 +214,7 @@ gtkunixprint.defs: $(GTKUNIXPRINT_DEFS) Makefile
22 gtkunixprint-types.defs: $(GTKUNIXPRINT_TYPES_DEFS) Makefile
23 $(CREATEDEFS) $@ $(GTKUNIXPRINT_TYPES_DEFS)
24
25-gdk.c: gdk-types.defs gdk.defs $(GDK_OVERRIDES)
26+gdk.c: gdk-types.defs gtk-types.defs gdk.defs $(GDK_OVERRIDES)
27 gtk.c: gdk-types.defs gtk-types.defs gtk.defs gdk-types.defs $(GTK_OVERRIDES)
28 _gtk_la_CFLAGS = $(PYCAIRO_CFLAGS) $(GTK_CFLAGS)
29 _gtk_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gtk
30--
311.7.4
32
diff --git a/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch b/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch
new file mode 100644
index 0000000000..16c0e8e770
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Inappropriate [configuration]
2
3Signed-off-by: Saul Wold <sgw@linux.intel.com>
4
5Index: pygtk-2.24.0/gtk/gtkunixprint.override
6===================================================================
7--- pygtk-2.24.0.orig/gtk/gtkunixprint.override
8+++ pygtk-2.24.0/gtk/gtkunixprint.override
9@@ -102,11 +102,6 @@ _wrap_gtk_print_job_get_surface(PyGObjec
10 if (pyg_error_check(&error))
11 return NULL;
12
13-#if PYCAIRO_VERSION_HEX >= 0x1010600
14- return PycairoSurface_FromSurface(cairo_surface_reference(surface), NULL);
15-#else
16- return PycairoSurface_FromSurface(cairo_surface_reference(surface), NULL, NULL);
17-#endif
18 }
19 %%
20 override gtk_print_job_send kwargs
diff --git a/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch b/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch
new file mode 100644
index 0000000000..b6156540bd
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch
@@ -0,0 +1,13 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: pygtk-2.24.0/pygtk-2.0.pc.in
4===================================================================
5--- pygtk-2.24.0.orig/pygtk-2.0.pc.in
6+++ pygtk-2.24.0/pygtk-2.0.pc.in
7@@ -1,5 +1,6 @@
8 prefix=@prefix@
9 exec_prefix=@exec_prefix@
10+libdir=@libdir@
11 includedir=@includedir@
12 datarootdir=@datarootdir@
13 datadir=@datadir@
diff --git a/meta/recipes-devtools/python/python-pygtk/nodocs.patch b/meta/recipes-devtools/python/python-pygtk/nodocs.patch
new file mode 100644
index 0000000000..f07309a7ba
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/nodocs.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: pygtk-2.17.0/Makefile.am
4===================================================================
5--- pygtk-2.17.0.orig/Makefile.am
6+++ pygtk-2.17.0/Makefile.am
7@@ -4,7 +4,7 @@ if BUILD_GTK
8 GTK_SUBDIR = gtk
9 endif
10
11-SUBDIRS = . $(GTK_SUBDIR) examples tests docs
12+SUBDIRS = . $(GTK_SUBDIR) examples tests
13
14 PLATFORM_VERSION = 2.0
15
diff --git a/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch b/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch
new file mode 100644
index 0000000000..833038e7f8
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch
@@ -0,0 +1,16 @@
1Upstream-Status: Pending
2
3Index: pygtk-2.10.4/gtk/__init__.py
4===================================================================
5--- pygtk-2.10.4.orig/gtk/__init__.py 2007-11-27 19:27:05.000000000 -0300
6+++ pygtk-2.10.4/gtk/__init__.py 2007-11-27 19:28:22.000000000 -0300
7@@ -78,7 +78,8 @@
8
9 keysyms = LazyModule('keysyms', locals())
10
11-_init()
12+if not hasattr(sys.modules['__main__'], 'python_launcher_enabled'):
13+ _init()
14
15 # CAPI
16 _PyGtk_API = _gtk._PyGtk_API
diff --git a/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4 b/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4
new file mode 100644
index 0000000000..53518fb2eb
--- /dev/null
+++ b/meta/recipes-devtools/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/recipes-devtools/python/python-pygtk/update-dependences-of-defs.c.patch b/meta/recipes-devtools/python/python-pygtk/update-dependences-of-defs.c.patch
new file mode 100644
index 0000000000..3ed954eee5
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pygtk/update-dependences-of-defs.c.patch
@@ -0,0 +1,38 @@
1From dc024e9079bbffbb44436ba3e70a758ebad5520f Mon Sep 17 00:00:00 2001
2From: "Song.Li" <Song.Li@windriver.com>
3Date: Sat, 5 Jan 2013 14:55:59 +0800
4Subject: [PATCH] update dependences of defs.c in Makefile.am
5
6In gtk/Makefile.am, defs.c should dependes on gdk-types.defs and
7gtk-types.defs, otherwise it fails occasionally when parallel compile.
8The error message:
9"IOError: [Errno 2] No such file or directory: 'gtk-types.defs'"
10
11Add them to dependences of defs.c to fix this issue.
12
13Upstream-Status: Submitted
14https://bugzilla.gnome.org/show_bug.cgi?id=702706
15
16Signed-off-by: Song.Li <Song.Li@windriver.com>
17Signed-off-by: Kai Kang <kai.kang@windriver.com>
18
19---
20 gtk/Makefile.am | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/gtk/Makefile.am b/gtk/Makefile.am
24index 7bb5d0c..91826cb 100644
25--- a/gtk/Makefile.am
26+++ b/gtk/Makefile.am
27@@ -289,7 +289,7 @@ if HAVE_GIO_TYPES_DEFS
28 extra_codegen_args += --register $(PYGOBJECT_DEFSDIR)/gio-types.defs
29 endif
30
31-.defs.c:
32+.defs.c: gdk-types.defs gtk-types.defs
33 ($(PYTHON) $(CODEGENDIR)/codegen.py \
34 $(PYGTK_CODEGEN_DEFINES) \
35 -I $(srcdir) \
36--
371.7.9.5
38