pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-ZopeInterface Fix "static declaration follows...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fdc7f78404dd
branches:  trunk
changeset: 517945:fdc7f78404dd
user:      kristerw <kristerw%pkgsrc.org@localhost>
date:      Sat Aug 26 16:42:25 2006 +0000

description:
Fix "static declaration follows non-static" error with gcc 4.

diffstat:

 devel/py-ZopeInterface/Makefile         |    5 +-
 devel/py-ZopeInterface/distinfo         |    3 +-
 devel/py-ZopeInterface/patches/patch-aa |  121 ++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+), 2 deletions(-)

diffs (154 lines):

diff -r 816e5b72bea7 -r fdc7f78404dd devel/py-ZopeInterface/Makefile
--- a/devel/py-ZopeInterface/Makefile   Sat Aug 26 16:04:10 2006 +0000
+++ b/devel/py-ZopeInterface/Makefile   Sat Aug 26 16:42:25 2006 +0000
@@ -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 @@
 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 -r 816e5b72bea7 -r fdc7f78404dd devel/py-ZopeInterface/distinfo
--- a/devel/py-ZopeInterface/distinfo   Sat Aug 26 16:04:10 2006 +0000
+++ b/devel/py-ZopeInterface/distinfo   Sat Aug 26 16:42:25 2006 +0000
@@ -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 -r 816e5b72bea7 -r fdc7f78404dd devel/py-ZopeInterface/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-ZopeInterface/patches/patch-aa   Sat Aug 26 16:42:25 2006 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index