summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-libs/hippo-canvas/files/hippo-canvas-0.2.23-use-python.patch')
-rw-r--r--x11-libs/hippo-canvas/files/hippo-canvas-0.2.23-use-python.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/x11-libs/hippo-canvas/files/hippo-canvas-0.2.23-use-python.patch b/x11-libs/hippo-canvas/files/hippo-canvas-0.2.23-use-python.patch
new file mode 100644
index 000000000..1eaacfa2e
--- /dev/null
+++ b/x11-libs/hippo-canvas/files/hippo-canvas-0.2.23-use-python.patch
@@ -0,0 +1,60 @@
+diff -ru hippo-canvas-0.2.23-orig/configure.ac hippo-canvas-0.2.23/configure.ac
+--- hippo-canvas-0.2.23-orig/configure.ac 2007-07-11 16:47:11.000000000 -0400
++++ hippo-canvas-0.2.23/configure.ac 2007-08-30 20:33:58.924749555 -0400
+@@ -154,15 +154,28 @@
+ GTK_DOC_CHECK([1.6])
+
+ ## Python bindings
+-AM_PATH_PYTHON
+-AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
++AC_ARG_ENABLE(python,
++ [AC_HELP_STRING([--enable-python], [build python bindings [default=auto]])])
++if test "x$enable_python" = "xno" ; then
++ have_python=no
++else
++ have_python=no
++ AM_PATH_PYTHON
++ if test "x$PYTHON" = "x" ; then
++ AC_MSG_WARN([Python not found])
++ else
++ AM_CHECK_PYTHON_HEADERS([
++ AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
++ PKG_CHECK_MODULES(PYTHON_BINDINGS, pygtk-2.0 pycairo, [
++ PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
++ AC_SUBST(PYGTK_DEFSDIR)
++ have_python=yes
++ ], [AC_MSG_WARN(could not find pygtk-2.0 or pycairo)])
++ ],[AC_MSG_WARN(could not find Python headers)])
++ fi
++fi
+
+-AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
+-
+-PKG_CHECK_MODULES(PYTHON_BINDINGS, pygtk-2.0 pycairo)
+-
+-PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
+-AC_SUBST(PYGTK_DEFSDIR)
++AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
+
+ AC_OUTPUT([
+ Makefile
+@@ -179,6 +192,7 @@
+ prefix: ${prefix}
+ compiler: ${CC}
+ LIBHIPPOCANVAS_CFLAGS: ${LIBHIPPOCANVAS_CFLAGS}
++ build python bindings: ${have_python}
+
+ Now type 'make' to build $PACKAGE
+ "
+diff -ru hippo-canvas-0.2.23-orig/Makefile.am hippo-canvas-0.2.23/Makefile.am
+--- hippo-canvas-0.2.23-orig/Makefile.am 2007-07-08 06:28:19.000000000 -0400
++++ hippo-canvas-0.2.23/Makefile.am 2007-08-30 20:34:06.286626454 -0400
+@@ -54,6 +54,8 @@
+ libhippocanvas_1_la_SOURCES=$(COMMON_CANVAS_SOURCEFILES) $(LINUX_CANVAS_SOURCEFILES)
+ nodist_libhippocanvas_1_la_SOURCES=$(CANVAS_BUILT_SOURCEFILES)
+
++if HAVE_PYTHON
+ include Makefile-python.am
++endif
+
+ DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc