[gcompris] More precise pycairo version checking



commit eb60329b3ca5c56b2a971e870a1dabccfd9361ce
Author: Aleksey Lim <alsroot member fsf org>
Date:   Sat Sep 24 19:24:20 2011 +0000

    More precise pycairo version checking
    
    The exact version that contain API brackage is 1.8.4.

 configure.ac                 |    2 +-
 src/boards/goocanvasmodule.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 305dfee..b725243 100644
--- a/configure.ac
+++ b/configure.ac
@@ -489,7 +489,7 @@ else
   dnl Python interpreter is available so check for pygtk
   PKG_CHECK_MODULES(PYGTK, pygtk-2.0 pycairo)
 
-  PYCAIRO_VERSION=$(pkg-config pycairo --modversion | awk -F. '{print ($1 * 1000) + $2 }')
+  PYCAIRO_VERSION=$(pkg-config pycairo --modversion | awk -F. '{print $1 * 10000 + $2 * 100 + $3}')
   AC_DEFINE_UNQUOTED([PYCAIRO_VERSION], $PYCAIRO_VERSION, [pycairo version])
 
   AC_MSG_CHECKING([for pygtk defs])
diff --git a/src/boards/goocanvasmodule.c b/src/boards/goocanvasmodule.c
index 422478f..4eb636b 100644
--- a/src/boards/goocanvasmodule.c
+++ b/src/boards/goocanvasmodule.c
@@ -35,7 +35,7 @@ _cairo_matrix_to_gvalue(GValue *value, PyObject *obj)
 static PyObject *
 _cairo_pattern_from_gvalue(const GValue *value)
 {
-#if PYCAIRO_VERSION < 1008
+#if PYCAIRO_VERSION < 10804
     return PycairoPattern_FromPattern(cairo_pattern_reference((cairo_pattern_t *) g_value_get_boxed(value)));
 #else
     return PycairoPattern_FromPattern(cairo_pattern_reference((cairo_pattern_t *) g_value_get_boxed(value)), NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]