summaryrefslogtreecommitdiff
path: root/graphics/py-cairo
diff options
context:
space:
mode:
authordrochner <drochner>2008-11-18 12:46:52 +0000
committerdrochner <drochner>2008-11-18 12:46:52 +0000
commitc4ee2cb3017ac141df213d656bf58f24827bc3fd (patch)
tree886d21044e90465b5c16ad020be37705259fbec2 /graphics/py-cairo
parentf6d6e2f875f9f81cec056b3910a05bc529484978 (diff)
downloadpkgsrc-c4ee2cb3017ac141df213d656bf58f24827bc3fd.tar.gz
make this work with python-2.4 again
Diffstat (limited to 'graphics/py-cairo')
-rw-r--r--graphics/py-cairo/Makefile4
-rw-r--r--graphics/py-cairo/distinfo5
-rw-r--r--graphics/py-cairo/patches/patch-aa13
-rw-r--r--graphics/py-cairo/patches/patch-ab29
-rw-r--r--graphics/py-cairo/patches/patch-ac37
5 files changed, 85 insertions, 3 deletions
diff --git a/graphics/py-cairo/Makefile b/graphics/py-cairo/Makefile
index 1da0ad8a734..c82fb2b3795 100644
--- a/graphics/py-cairo/Makefile
+++ b/graphics/py-cairo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2008/11/10 22:10:08 wiz Exp $
+# $NetBSD: Makefile,v 1.12 2008/11/18 12:46:52 drochner Exp $
#
DISTNAME= pycairo-1.6.4
@@ -19,7 +19,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV+= PYTHON=${PYTHONBIN:Q}
PKGCONFIG_OVERRIDE+= pycairo.pc.in
-PYTHON_VERSIONS_ACCEPTED= 25
+PYTHON_VERSIONS_ACCEPTED= 24 25
PY_PATCHPLIST= yes
.include "../../mk/compiler.mk"
diff --git a/graphics/py-cairo/distinfo b/graphics/py-cairo/distinfo
index 2f8d8a61971..53bd04631bd 100644
--- a/graphics/py-cairo/distinfo
+++ b/graphics/py-cairo/distinfo
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.6 2008/11/10 22:10:08 wiz Exp $
+$NetBSD: distinfo,v 1.7 2008/11/18 12:46:52 drochner Exp $
SHA1 (pycairo-1.6.4.tar.gz) = d3b3ecb6e999cc7b4a6ebcad00ae8d82c253c21c
RMD160 (pycairo-1.6.4.tar.gz) = 6197427df3d10b708847503f975670e3d02d57e5
Size (pycairo-1.6.4.tar.gz) = 491984 bytes
+SHA1 (patch-aa) = 1177a5421d80273721a80603dbd4cfca0fdf1b18
+SHA1 (patch-ab) = e8fcf835f97b38df476f09d7bcfe1f84b0264aa3
+SHA1 (patch-ac) = 93cc7fa29f90872dad22b83bc783acf9f1279093
diff --git a/graphics/py-cairo/patches/patch-aa b/graphics/py-cairo/patches/patch-aa
new file mode 100644
index 00000000000..3d686f21d3d
--- /dev/null
+++ b/graphics/py-cairo/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.3 2008/11/18 12:46:52 drochner Exp $
+
+--- configure.orig 2008-11-18 12:40:01.000000000 +0100
++++ configure
+@@ -19384,7 +19384,7 @@ echo $ECHO_N "checking whether $PYTHON v
+ prog="import sys, string
+ # split strings by '.' and convert to numeric. Append some zeros
+ # because we need at least 4 digits for the hex conversion.
+-minver = map(int, string.split('2.5', '.')) + [0, 0, 0]
++minver = map(int, string.split('2.4', '.')) + [0, 0, 0]
+ minverhex = 0
+ for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+ sys.exit(sys.hexversion < minverhex)"
diff --git a/graphics/py-cairo/patches/patch-ab b/graphics/py-cairo/patches/patch-ab
new file mode 100644
index 00000000000..83ea57a0a34
--- /dev/null
+++ b/graphics/py-cairo/patches/patch-ab
@@ -0,0 +1,29 @@
+$NetBSD: patch-ab,v 1.1 2008/11/18 12:46:52 drochner Exp $
+
+--- cairo/pycairo-matrix.c.orig 2008-11-18 12:43:06.000000000 +0100
++++ cairo/pycairo-matrix.c
+@@ -206,7 +206,7 @@ matrix_transform_point (PycairoMatrix *o
+ }
+
+ static PyObject *
+-matrix_item (PycairoMatrix *o, Py_ssize_t i)
++matrix_item (PycairoMatrix *o, int i)
+ {
+ switch (i) {
+ case 0:
+@@ -266,14 +266,13 @@ static PyNumberMethods matrix_as_number
+ 0, /* nb_true_divide */
+ 0, /* nb_inplace_floor_divide */
+ 0, /* nb_inplace_true_divide */
+- (unaryfunc)0, /* nb_index */
+ };
+
+ static PySequenceMethods matrix_as_sequence = {
+ 0, /* sq_length */
+ 0, /* sq_concat */
+ 0, /* sq_repeat */
+- (ssizeargfunc)matrix_item, /* sq_item */
++ (intargfunc)matrix_item, /* sq_item */
+ 0, /* sq_slice */
+ 0, /* sq_ass_item */
+ 0, /* sq_ass_slice */
diff --git a/graphics/py-cairo/patches/patch-ac b/graphics/py-cairo/patches/patch-ac
new file mode 100644
index 00000000000..765dc31bda1
--- /dev/null
+++ b/graphics/py-cairo/patches/patch-ac
@@ -0,0 +1,37 @@
+$NetBSD: patch-ac,v 1.1 2008/11/18 12:46:52 drochner Exp $
+
+--- cairo/pycairo-surface.c.orig 2008-11-18 12:50:34.000000000 +0100
++++ cairo/pycairo-surface.c
+@@ -122,7 +122,7 @@ static cairo_status_t
+ _write_func (void *closure, const unsigned char *data, unsigned int length)
+ {
+ PyObject *res = PyObject_CallMethod ((PyObject *)closure, "write", "(s#)",
+- data, (Py_ssize_t)length);
++ data, length);
+ if (res == NULL) {
+ /* an exception has occurred, it will be picked up later by
+ * Pycairo_Check_Status()
+@@ -392,7 +392,7 @@ image_surface_create_for_data (PyTypeObj
+ cairo_format_t format;
+ unsigned char *buffer;
+ int width, height, stride = -1, res;
+- Py_ssize_t buffer_len;
++ int buffer_len;
+ PyObject *obj;
+
+ if (!PyArg_ParseTuple(args, "Oiii|i:Surface.create_for_data",
+@@ -570,10 +570,10 @@ image_surface_buffer_getsegcount (Pycair
+
+ /* See Python C API Manual 10.7 */
+ static PyBufferProcs image_surface_as_buffer = {
+- (readbufferproc) image_surface_buffer_getreadbuf,
+- (writebufferproc)image_surface_buffer_getwritebuf,
+- (segcountproc) image_surface_buffer_getsegcount,
+- (charbufferproc) NULL,
++ (getreadbufferproc) image_surface_buffer_getreadbuf,
++ (getwritebufferproc)image_surface_buffer_getwritebuf,
++ (getsegcountproc) image_surface_buffer_getsegcount,
++ (getcharbufferproc) NULL,
+ };
+
+ static PyMethodDef image_surface_methods[] = {