diff options
author | kristerw <kristerw@pkgsrc.org> | 2006-08-26 16:42:25 +0000 |
---|---|---|
committer | kristerw <kristerw@pkgsrc.org> | 2006-08-26 16:42:25 +0000 |
commit | dc92b69f6c1392efb929f6f189a4fb7a4fb634ed (patch) | |
tree | bbad88fc6bb6e4013f3e487b6d69f5fcdb4555a1 /devel | |
parent | c97f660dca1e8c0e151539b744a5e8410ff4e07e (diff) | |
download | pkgsrc-dc92b69f6c1392efb929f6f189a4fb7a4fb634ed.tar.gz |
Fix "static declaration follows non-static" error with gcc 4.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/py-ZopeInterface/Makefile | 5 | ||||
-rw-r--r-- | devel/py-ZopeInterface/distinfo | 3 | ||||
-rw-r--r-- | devel/py-ZopeInterface/patches/patch-aa | 121 |
3 files changed, 127 insertions, 2 deletions
diff --git a/devel/py-ZopeInterface/Makefile b/devel/py-ZopeInterface/Makefile index b839c4a5757..2030900b41f 100644 --- a/devel/py-ZopeInterface/Makefile +++ b/devel/py-ZopeInterface/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2006/06/04 20:48:39 joerg Exp $ +# $NetBSD: Makefile,v 1.5 2006/08/26 16:42:25 kristerw Exp $ # DISTNAME= ZopeInterface-3.0.1 @@ -15,5 +15,8 @@ COMMENT= The zope.interface package used in Zope 3 and Twisted PYDISTUTILSPKG= yes PYTHON_VERSIONS_ACCEPTED= 24 23 22 +pre-build: + ${RM} ${WRKSRC}/Dependencies/zope.interface-ZopeInterface-3.0.1/zope.interface/*.orig + .include "../../lang/python/extension.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/py-ZopeInterface/distinfo b/devel/py-ZopeInterface/distinfo index b1b79fff382..4009f020359 100644 --- a/devel/py-ZopeInterface/distinfo +++ b/devel/py-ZopeInterface/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1.1.1 2005/06/23 23:50:25 minskim Exp $ +$NetBSD: distinfo,v 1.2 2006/08/26 16:42:25 kristerw Exp $ SHA1 (ZopeInterface-3.0.1.tgz) = 3707f7129acf085d5a0b6b616893ab647cbc7c84 RMD160 (ZopeInterface-3.0.1.tgz) = 77ae531b20e069de959807ae980a76b460e3f76c Size (ZopeInterface-3.0.1.tgz) = 108336 bytes +SHA1 (patch-aa) = d81d2cb810fdd59d6c82f0e12d1234e27fba4e6a diff --git a/devel/py-ZopeInterface/patches/patch-aa b/devel/py-ZopeInterface/patches/patch-aa new file mode 100644 index 00000000000..fbbdfd38991 --- /dev/null +++ b/devel/py-ZopeInterface/patches/patch-aa @@ -0,0 +1,121 @@ +$NetBSD: patch-aa,v 1.1 2006/08/26 16:42:25 kristerw Exp $ + +Reorder functions to fix "static declaration follows non-static" error +with gcc 4. + +--- Dependencies/zope.interface-ZopeInterface-3.0.1/zope.interface/_zope_interface_coptimizations.c.orig 2006-08-26 18:12:52.000000000 +0200 ++++ Dependencies/zope.interface-ZopeInterface-3.0.1/zope.interface/_zope_interface_coptimizations.c 2006-08-26 18:19:11.000000000 +0200 +@@ -24,6 +24,8 @@ static PyObject *BuiltinImplementationSp + static PyObject *str__class__, *str__providedBy__, *strisOrExtends; + static PyObject *empty, *fallback, *str_implied, *str_cls, *str_implements; + static PyTypeObject *Implements; ++static PyObject *Spec_providedBy(PyObject *self, PyObject *ob); ++static PyObject *Spec_implementedBy(PyObject *self, PyObject *cls); + + static int imported_declarations = 0; + +@@ -70,7 +72,6 @@ import_declarations(void) + return 0; + } + +-extern PyTypeObject SpecType; /* Forward */ + + static PyObject * + implementedByFallback(PyObject *cls) +@@ -279,50 +280,10 @@ static char Spec_providedBy__doc__[] = + "Test whether an interface is implemented by the specification" + ; + +-static PyObject * +-Spec_providedBy(PyObject *self, PyObject *ob) +-{ +- PyObject *decl, *item; +- +- decl = providedBy(NULL, ob); +- if (decl == NULL) +- return NULL; +- +- if (PyObject_TypeCheck(ob, &SpecType)) +- item = Spec_extends(decl, self); +- else +- /* decl is probably a security proxy. We have to go the long way +- around. +- */ +- item = PyObject_CallMethodObjArgs(decl, strisOrExtends, self, NULL); +- +- Py_DECREF(decl); +- return item; +-} +- +- + static char Spec_implementedBy__doc__[] = + "Test whether the specification is implemented by instances of a class" + ; + +-static PyObject * +-Spec_implementedBy(PyObject *self, PyObject *cls) +-{ +- PyObject *decl, *item; +- +- decl = implementedBy(NULL, cls); +- if (decl == NULL) +- return NULL; +- +- if (PyObject_TypeCheck(decl, &SpecType)) +- item = Spec_extends(decl, self); +- else +- item = PyObject_CallMethodObjArgs(decl, strisOrExtends, self, NULL); +- +- Py_DECREF(decl); +- return item; +-} +- + static struct PyMethodDef Spec_methods[] = { + {"providedBy", + (PyCFunction)Spec_providedBy, METH_O, +@@ -370,6 +331,45 @@ static PyTypeObject SpecType = { + }; + + static PyObject * ++Spec_providedBy(PyObject *self, PyObject *ob) ++{ ++ PyObject *decl, *item; ++ ++ decl = providedBy(NULL, ob); ++ if (decl == NULL) ++ return NULL; ++ ++ if (PyObject_TypeCheck(ob, &SpecType)) ++ item = Spec_extends(decl, self); ++ else ++ /* decl is probably a security proxy. We have to go the long way ++ around. ++ */ ++ item = PyObject_CallMethodObjArgs(decl, strisOrExtends, self, NULL); ++ ++ Py_DECREF(decl); ++ return item; ++} ++ ++static PyObject * ++Spec_implementedBy(PyObject *self, PyObject *cls) ++{ ++ PyObject *decl, *item; ++ ++ decl = implementedBy(NULL, cls); ++ if (decl == NULL) ++ return NULL; ++ ++ if (PyObject_TypeCheck(decl, &SpecType)) ++ item = Spec_extends(decl, self); ++ else ++ item = PyObject_CallMethodObjArgs(decl, strisOrExtends, self, NULL); ++ ++ Py_DECREF(decl); ++ return item; ++} ++ ++static PyObject * + OSD_descr_get(PyObject *self, PyObject *inst, PyObject *cls) + { + PyObject *provides; |