diff options
author | mezz <mezz@FreeBSD.org> | 2006-12-22 06:14:20 +0800 |
---|---|---|
committer | mezz <mezz@FreeBSD.org> | 2006-12-22 06:14:20 +0800 |
commit | f2270edfd0ce73af6e976d00a44cbd751ab45de6 (patch) | |
tree | bd4aa9026d60286225d6101c5d20fa704e2bd50b /graphics/py-cairo | |
parent | 7596dfa9f009e13f7d7be05325890843ef60cfbc (diff) | |
download | freebsd-ports-gnome-f2270edfd0ce73af6e976d00a44cbd751ab45de6.tar.gz freebsd-ports-gnome-f2270edfd0ce73af6e976d00a44cbd751ab45de6.tar.zst freebsd-ports-gnome-f2270edfd0ce73af6e976d00a44cbd751ab45de6.zip |
Fix the build with FreeBSD 4.x. This patch has been merged in its CVS.
PR: ports/104564
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=8910
Submitted by: Akihiko HAYASHI <hayashi@totalware.gifu.gifu.jp>
Diffstat (limited to 'graphics/py-cairo')
-rw-r--r-- | graphics/py-cairo/files/patch-freebsd4 | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/graphics/py-cairo/files/patch-freebsd4 b/graphics/py-cairo/files/patch-freebsd4 new file mode 100644 index 000000000000..7d40694bd42a --- /dev/null +++ b/graphics/py-cairo/files/patch-freebsd4 @@ -0,0 +1,97 @@ +--- cairo/pycairo-font.c.orig Sat Apr 29 05:04:31 2006 ++++ cairo/pycairo-font.c Thu Dec 21 16:09:09 2006 +@@ -197,6 +197,7 @@ + PycairoFontFace *ff; + PycairoFontOptions *fo; + PycairoMatrix *mx1, *mx2; ++ PyObject *o; + + if (!PyArg_ParseTuple(args, "O!O!O!O!:ScaledFont.__new__", + &PycairoFontFace_Type, &ff, +@@ -205,7 +206,7 @@ + &PycairoFontOptions_Type, &fo)) + return NULL; + +- PyObject *o = type->tp_alloc(type, 0); ++ o = type->tp_alloc(type, 0); + if (o != NULL) { + cairo_scaled_font_t *scaled_font = cairo_scaled_font_create + (ff->font_face, &mx1->matrix, &mx2->matrix, fo->font_options); +--- cairo/pycairo-surface.c.orig Sun Jul 2 21:58:14 2006 ++++ cairo/pycairo-surface.c Thu Dec 21 16:09:34 2006 +@@ -34,7 +34,6 @@ + # include <config.h> + #endif + +-#include <stdint.h> + #include "pycairo-private.h" + + +@@ -519,6 +518,7 @@ + static PyObject * + image_surface_create_from_png (PyTypeObject *type, PyObject *file) + { ++ PyObject* reader; + if (PyObject_TypeCheck (file, &PyBaseString_Type)) { + return PycairoSurface_FromSurface ( + cairo_image_surface_create_from_png (PyString_AsString(file)), +@@ -526,7 +526,7 @@ + } + + /* file or file-like object argument */ +- PyObject* reader = PyObject_GetAttrString (file, "read"); ++ reader = PyObject_GetAttrString (file, "read"); + if (reader == NULL || !PyCallable_Check (reader)) { + Py_XDECREF(reader); + PyErr_SetString(PyExc_TypeError, +@@ -700,6 +700,7 @@ + { + double width_in_points, height_in_points; + PyObject *file; ++ PyObject* writer; + + if (!PyArg_ParseTuple(args, "Odd:PDFSurface.__new__", + &file, &width_in_points, &height_in_points)) +@@ -713,7 +714,7 @@ + NULL); + } + /* file or file-like object argument */ +- PyObject* writer = PyObject_GetAttrString (file, "write"); ++ writer = PyObject_GetAttrString (file, "write"); + if (writer == NULL || !PyCallable_Check (writer)) { + Py_XDECREF(writer); + PyErr_SetString(PyExc_TypeError, +@@ -803,6 +804,7 @@ + { + double width_in_points, height_in_points; + PyObject *file; ++ PyObject* writer; + + if (!PyArg_ParseTuple(args, "Odd:PSSurface.__new__", + &file, &width_in_points, &height_in_points)) +@@ -817,7 +819,7 @@ + + } + /* else: file or file-like object argument */ +- PyObject* writer = PyObject_GetAttrString (file, "write"); ++ writer = PyObject_GetAttrString (file, "write"); + if (writer == NULL || !PyCallable_Check (writer)) { + Py_XDECREF(writer); + PyErr_SetString(PyExc_TypeError, +@@ -942,6 +944,7 @@ + { + double width_in_points, height_in_points; + PyObject *file; ++ PyObject* writer; + + if (!PyArg_ParseTuple(args, "Odd:SVGSurface.__new__", + &file, &width_in_points, &height_in_points)) +@@ -955,7 +958,7 @@ + NULL); + } + /* else: file or file-like object argument */ +- PyObject* writer = PyObject_GetAttrString (file, "write"); ++ writer = PyObject_GetAttrString (file, "write"); + if (writer == NULL || !PyCallable_Check (writer)) { + Py_XDECREF(writer); + PyErr_SetString(PyExc_TypeError, |