Tue Nov 18 12:46:52 2008 UTC ()
make this work with python-2.4 again


(drochner)
diff -r1.11 -r1.12 pkgsrc/graphics/py-cairo/Makefile
diff -r1.6 -r1.7 pkgsrc/graphics/py-cairo/distinfo
diff -r0 -r1.3 pkgsrc/graphics/py-cairo/patches/patch-aa
diff -r0 -r1.1 pkgsrc/graphics/py-cairo/patches/patch-ab
diff -r0 -r1.1 pkgsrc/graphics/py-cairo/patches/patch-ac
diff -r1.6 -r1.7 pkgsrc/sysutils/py-notify/Makefile
diff -r1.57 -r1.58 pkgsrc/x11/py-gnome2/Makefile
diff -r1.23 -r1.24 pkgsrc/x11/py-gnome2-desktop/Makefile
diff -r1.53 -r1.54 pkgsrc/x11/py-gtk2/Makefile

cvs diff -r1.11 -r1.12 pkgsrc/graphics/py-cairo/Makefile (expand / switch to context diff)
--- pkgsrc/graphics/py-cairo/Makefile 2008/11/10 22:10:08 1.11
+++ pkgsrc/graphics/py-cairo/Makefile 2008/11/18 12:46:52 1.12
@@ -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 @@
 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"

cvs diff -r1.6 -r1.7 pkgsrc/graphics/py-cairo/distinfo (expand / switch to context diff)
--- pkgsrc/graphics/py-cairo/distinfo 2008/11/10 22:10:08 1.6
+++ pkgsrc/graphics/py-cairo/distinfo 2008/11/18 12:46:52 1.7
@@ -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

File Added: pkgsrc/graphics/py-cairo/patches/Attic/patch-aa
$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)"

File Added: pkgsrc/graphics/py-cairo/patches/Attic/patch-ab
$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 */

File Added: pkgsrc/graphics/py-cairo/patches/Attic/patch-ac
$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[] = {

cvs diff -r1.6 -r1.7 pkgsrc/sysutils/py-notify/Makefile (expand / switch to context diff)
--- pkgsrc/sysutils/py-notify/Makefile 2008/11/15 08:15:06 1.6
+++ pkgsrc/sysutils/py-notify/Makefile 2008/11/18 12:46:52 1.7
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2008/11/15 08:15:06 hasso Exp $
+# $NetBSD: Makefile,v 1.7 2008/11/18 12:46:52 drochner Exp $
 #
 
 DISTNAME=	notify-python-0.1.1
@@ -20,7 +20,7 @@
 USE_TOOLS+=	pkg-config
 
 PKGCONFIG_OVERRIDE+=	notify-python-0.1.1/notify-python.pc.in
-PYTHON_VERSIONS_ACCEPTED=	25
+PYTHON_VERSIONS_ACCEPTED=	24 25
 PY_PATCHPLIST=	yes
 
 .include "../../lang/python/extension.mk"

cvs diff -r1.57 -r1.58 pkgsrc/x11/py-gnome2/Makefile (expand / switch to context diff)
--- pkgsrc/x11/py-gnome2/Makefile 2008/11/14 22:01:27 1.57
+++ pkgsrc/x11/py-gnome2/Makefile 2008/11/18 12:46:52 1.58
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.57 2008/11/14 22:01:27 hasso Exp $
+# $NetBSD: Makefile,v 1.58 2008/11/18 12:46:52 drochner Exp $
 #
 
 DISTNAME=	gnome-python-2.22.3
@@ -20,7 +20,7 @@
 CONFIGURE_ENV+=	PYTHON=${PYTHONBIN:Q}
 USE_TOOLS+=		pkg-config gmake
 
-PYTHON_VERSIONS_ACCEPTED=	25
+PYTHON_VERSIONS_ACCEPTED=	24 25
 
 .include "../../lang/python/extension.mk"
 .include "../../lang/python/application.mk"

cvs diff -r1.23 -r1.24 pkgsrc/x11/py-gnome2-desktop/Attic/Makefile (expand / switch to context diff)
--- pkgsrc/x11/py-gnome2-desktop/Attic/Makefile 2008/11/13 11:17:16 1.23
+++ pkgsrc/x11/py-gnome2-desktop/Attic/Makefile 2008/11/18 12:46:52 1.24
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2008/11/13 11:17:16 wiz Exp $
+# $NetBSD: Makefile,v 1.24 2008/11/18 12:46:52 drochner Exp $
 #
 
 DISTNAME=	gnome-python-desktop-2.24.0
@@ -22,7 +22,7 @@
 
 PKGCONFIG_OVERRIDE+=	gnome-python-desktop-2.0.pc.in
 
-PYTHON_VERSIONS_ACCEPTED=	25
+PYTHON_VERSIONS_ACCEPTED=	24 25
 
 # XXX not yet, needs hal
 PLIST_VARS+=	nautilusburn

cvs diff -r1.53 -r1.54 pkgsrc/x11/py-gtk2/Makefile (expand / switch to context diff)
--- pkgsrc/x11/py-gtk2/Makefile 2008/11/17 21:56:16 1.53
+++ pkgsrc/x11/py-gtk2/Makefile 2008/11/18 12:46:52 1.54
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2008/11/17 21:56:16 jnemeth Exp $
+# $NetBSD: Makefile,v 1.54 2008/11/18 12:46:52 drochner Exp $
 #
 
 DISTNAME=	pygtk-2.13.0
@@ -23,7 +23,7 @@
 CONFIGURE_ENV+=	PYTHON=${PYTHONBIN:Q}
 USE_TOOLS+=	gmake pkg-config
 
-PYTHON_VERSIONS_ACCEPTED=	25
+PYTHON_VERSIONS_ACCEPTED=	24 25
 
 BUILDLINK_API_DEPENDS.pygobject+=	${PYPKGPREFIX}-gobject>=2.15.3