Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--autopackage/default.apspec.in4
-rw-r--r--configure.in1
-rw-r--r--src/boards/canvas.c11
-rw-r--r--src/boards/py-mod-gcompris.c9
-rw-r--r--src/boards/scale.c3
6 files changed, 34 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index f5936c1..a19ddae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2007-04-08 Bruno coudoin <bruno.coudoin@free.fr>
+
+ * autopackage/default.apspec.in: force --enable-binreloc
+
+ * configure.in: enable_binreloc is again the default
+
+ * src/boards/canvas.c: (_wrap_gnome_canvas_item_set),
+ (_wrap_gnome_canvas_item_new):
+ * src/boards/py-mod-gcompris.c: (py_gc_board_config_radio_buttons):
+ Now use Py_ssize_t when available instead of int. This makes GCompris
+ compiles on 64bits platforms on python >= 2.5.
+
+
+ * src/boards/scale.c: (scale_anim_plate), (scale_next_level):
+ Fix by Miguel, clicking on level, the scale is now unbalanced.
+
*** RELEASE 8.3BETA2 ***
2007-04-03 Bruno coudoin <bruno.coudoin@free.fr>
diff --git a/autopackage/default.apspec.in b/autopackage/default.apspec.in
index 6516108..0e7d05c 100644
--- a/autopackage/default.apspec.in
+++ b/autopackage/default.apspec.in
@@ -20,7 +20,7 @@ PackageDesktop: share/applications/gcompris.desktop
# prepareBuild will set up apbuild and run configure for you. If you
# need to pass arguments to configure, just add them to prepareBuild:
# prepareBuild --enable-foo --disable-bar
-prepareBuild
+prepareBuild --enable-binreloc
[BuildUnprepare]
# If you're using prepareBuild above, there is no need to change this!
@@ -41,9 +41,7 @@ echo '*' | import
[Install]
# See http://www.autopackage.org/api/ for details
installExe bin/*
-installLib lib/*.so.*
copyFiles lib/gcompris/* "$PREFIX/lib/gcompris"
-installMan 6 man/man6/*
installData share/gcompris
installIcon share/pixmaps/gcompris.*
installLocale share/locale/
diff --git a/configure.in b/configure.in
index b693b2a..ae9903a 100644
--- a/configure.in
+++ b/configure.in
@@ -120,6 +120,7 @@ AM_CONDITIONAL(WITH_NSBUNDLE, test "$nsbundle" = yes)
# Provide relocatable API from autopackage
# From http://autopackage.org/docs/binreloc/
+enable_binreloc=yes
if test x"$nsbundle" = "xyes" ; then
enable_binreloc=no
AC_MSG_NOTICE([binreloc disabled by nsbundle])
diff --git a/src/boards/canvas.c b/src/boards/canvas.c
index f71a4e9..9ec8e92 100644
--- a/src/boards/canvas.c
+++ b/src/boards/canvas.c
@@ -2,7 +2,10 @@
#include <Python.h>
-
+#if PY_VERSION_HEX < 0x02050000
+/* use int based index for python 2.4 and below */
+typedef int Py_ssize_t;
+#endif
#line 4 "canvas.override"
#include <Python.h>
@@ -28,7 +31,7 @@ gnomecanvasaffine_to_value(PyObject *py_affine, double affine[6])
if (sitem)
affine[i] = PyFloat_AsDouble(sitem);
else {
- PyErr_Clear();
+ PyErr_Clear();
PyErr_SetString(PyExc_TypeError, "sequence item not a float");
return -1;
}
@@ -554,7 +557,7 @@ _wrap_gnome_canvas_item_set (PyGObject *self, PyObject *args,
GType type;
GnomeCanvasItem *item;
GObjectClass *class;
- gint pos = 0;
+ Py_ssize_t pos = 0;
PyObject *value;
PyObject *key;
@@ -944,7 +947,7 @@ _wrap_gnome_canvas_item_new (PyGObject *self, PyObject *args,
GType type;
GnomeCanvasItem *item;
GObjectClass *class;
- gint pos;
+ Py_ssize_t pos;
PyObject *value;
PyObject *key;
diff --git a/src/boards/py-mod-gcompris.c b/src/boards/py-mod-gcompris.c
index ec6cabd..a596866 100644
--- a/src/boards/py-mod-gcompris.c
+++ b/src/boards/py-mod-gcompris.c
@@ -18,8 +18,13 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
#include <Python.h>
+
+#if PY_VERSION_HEX < 0x02050000
+/* use int based index for python 2.4 and below */
+typedef int Py_ssize_t;
+#endif
+
#define NO_IMPORT_PYGOBJECT 1
#include <pygobject.h>
#include "gcompris/gcompris.h"
@@ -1179,7 +1184,7 @@ py_gc_board_config_radio_buttons(PyObject* self, PyObject* args)
}
PyObject *pykey, *pyvalue;
- int pos = 0;
+ Py_ssize_t pos = 0;
buttons_label = g_hash_table_new_full (g_str_hash,
g_str_equal,
diff --git a/src/boards/scale.c b/src/boards/scale.c
index 1742313..49675d1 100644
--- a/src/boards/scale.c
+++ b/src/boards/scale.c
@@ -294,13 +294,13 @@ int get_weight_plate(int plate)
return result;
}
+static double last_delta=0;
void scale_anim_plate(void)
{
double affine[6];
double delta_y, x;
double angle;
int diff;
- static double last_delta=0;
diff = get_weight_plate(0);
delta_y = CLAMP(PLATE_Y_DELTA / 10.0 * diff,
@@ -720,6 +720,7 @@ static void scale_next_level()
NULL);
scale_make_level();
+ last_delta=0;
scale_anim_plate();
}