diff --git a/fontforge.changes b/fontforge.changes index a4b8858..bb4e69b 100644 --- a/fontforge.changes +++ b/fontforge.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Sep 6 08:54:57 UTC 2010 - coolo@novell.com + +- adapt to python 2.7 + +------------------------------------------------------------------- +Thu Apr 8 10:56:13 CEST 2010 - tiwai@suse.de + +- fix build with older distros before libpng 1.4 + ------------------------------------------------------------------- Thu Apr 8 08:12:59 UTC 2010 - coolo@novell.com diff --git a/fontforge.py27.diff b/fontforge.py27.diff new file mode 100644 index 0000000..c65c123 --- /dev/null +++ b/fontforge.py27.diff @@ -0,0 +1,96 @@ +diff -ru fontforge-20090923.orig/fontforge/ffpython.h fontforge-20090923/fontforge/ffpython.h +--- fontforge-20090923.orig/fontforge/ffpython.h 2009-08-06 01:33:51.000000000 +0200 ++++ fontforge-20090923/fontforge/ffpython.h 2010-09-06 10:51:46.003385009 +0200 +@@ -60,11 +60,11 @@ + #define _PyBytes_Eq _PyString_Eq + #define PyBytes_Format PyString_Format + #define _PyBytes_FormatLong _PyString_FormatLong +-#define PyBytes_DecodeEscape PyString_DecodeEscape ++#define PyString_DecodeEscape PyString_DecodeEscape + #define _PyBytes_Join _PyString_Join +-#define PyBytes_Decode PyString_Decode ++#define PyString_Decode PyString_Decode + #define PyBytes_Encode PyString_Encode +-#define PyBytes_AsEncodedObject PyString_AsEncodedObject ++#define PyString_AsEncodedObject PyString_AsEncodedObject + #define PyBytes_AsEncodedString PyString_AsEncodedString + #define PyBytes_AsDecodedObject PyString_AsDecodedObject + #define PyBytes_AsDecodedString PyString_AsDecodedString +diff -ru fontforge-20090923.orig/fontforge/python.c fontforge-20090923/fontforge/python.c +--- fontforge-20090923.orig/fontforge/python.c 2009-09-12 14:43:32.000000000 +0200 ++++ fontforge-20090923/fontforge/python.c 2010-09-06 10:51:46.062259025 +0200 +@@ -742,7 +742,7 @@ + Py_XINCREF(glyph); + PyTuple_SetItem(arglist,0,py_ie[ie_index].data); + PyTuple_SetItem(arglist,1,glyph); +- PyTuple_SetItem(arglist,2,PyBytes_Decode(filename,strlen(filename),"UTF-8",NULL)); ++ PyTuple_SetItem(arglist,2,PyString_Decode(filename,strlen(filename),"UTF-8",NULL)); + PyTuple_SetItem(arglist,3,Py_BuildValue("i",toback)); + result = PyEval_CallObject(py_ie[ie_index].import, arglist); + Py_DECREF(arglist); +@@ -765,7 +765,7 @@ + Py_XINCREF(glyph); + PyTuple_SetItem(arglist,0,py_ie[ie_index].data); + PyTuple_SetItem(arglist,1,glyph); +- PyTuple_SetItem(arglist,2,PyBytes_Decode(filename,strlen(filename),"UTF-8",NULL)); ++ PyTuple_SetItem(arglist,2,PyString_Decode(filename,strlen(filename),"UTF-8",NULL)); + result = PyEval_CallObject(py_ie[ie_index].export, arglist); + Py_DECREF(arglist); + Py_XDECREF(result); +@@ -882,7 +882,7 @@ + free(def); + if ( ret==NULL ) + Py_RETURN_NONE; +- reto = PyBytes_Decode(ret,strlen(ret),"UTF-8",NULL); ++ reto = PyString_Decode(ret,strlen(ret),"UTF-8",NULL); + free(ret); + return( reto ); + } +@@ -905,7 +905,7 @@ + free(def); + if ( ret==NULL ) + Py_RETURN_NONE; +- reto = PyBytes_Decode(ret,strlen(ret),"UTF-8",NULL); ++ reto = PyString_Decode(ret,strlen(ret),"UTF-8",NULL); + free(ret); + return( reto ); + } +@@ -937,7 +937,7 @@ + return( NULL ); + } + for ( i=0; i 1120 %patch4 -p1 +%endif +%if %suse_version > 1130 +%patch5 -p1 +%endif mkdir docs tar jxvf %{S:1} -C docs tar jxvf %{S:2} -C docs