[pyxf86config/f16] drop config buffers code since upstream X dropped it

Dave Airlie airlied at fedoraproject.org
Tue Nov 29 16:17:37 UTC 2011


commit 4baa28a0b5f451e9af164ab47e24da9b1284eeba
Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Nov 29 15:03:32 2011 +0000

    drop config buffers code since upstream X dropped it

 pyxf86config.spec    |    7 ++-
 remove-buffers.patch |  132 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 138 insertions(+), 1 deletions(-)
---
diff --git a/pyxf86config.spec b/pyxf86config.spec
index bf87706..96bcb60 100644
--- a/pyxf86config.spec
+++ b/pyxf86config.spec
@@ -1,12 +1,13 @@
 Summary: Python wrappers for libxf86config
 Name: pyxf86config
 Version: 0.3.37
-Release: 11%{?dist}
+Release: 12%{?dist}
 URL: http://fedoraproject.org/wiki/pyxf86config
 Source0: http://ajax.fedorapeople.org/%{name}/%{name}-%{version}.tar.bz2
 Patch0: 0001-libxf86config.a-gained-dependency-on-xstrtokenize-pu.patch
 Patch1: 0002-Provide-xf86CheckBoolOption.patch
 Patch2: 0003-Initialize-configuration-file-parser-before-use.patch
+Patch3: remove-buffers.patch
 License: GPLv2
 Group: System Environment/Libraries
 BuildRequires: glib2-devel
@@ -31,6 +32,7 @@ It is used to read and write X server configuration files.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 export CFLAGS="$RPM_OPT_FLAGS -fPIC"
@@ -48,6 +50,9 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 %{python_sitearch}/xf86config.py*
 
 %changelog
+* Tue Nov 29 2011 Dave Airlie <airlied at redhat.com> 0.3.37-12
+- drop config buffers code since upstream X dropped it
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.37-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
diff --git a/remove-buffers.patch b/remove-buffers.patch
new file mode 100644
index 0000000..7ff1014
--- /dev/null
+++ b/remove-buffers.patch
@@ -0,0 +1,132 @@
+diff -up pyxf86config-0.3.37/pyxf86conf.c.nobuffers pyxf86config-0.3.37/pyxf86conf.c
+--- pyxf86config-0.3.37/pyxf86conf.c.nobuffers	2011-11-29 14:59:25.938263059 +0000
++++ pyxf86config-0.3.37/pyxf86conf.c	2011-11-29 14:59:39.713262328 +0000
+@@ -1423,71 +1423,6 @@ pyxf86conflayout_new (PyObject *self, Py
+ 			    &XF86ConfLayoutType);
+ }
+ 
+-/********** buffers section ****************/
+-
+-static void
+-pyxf86confbuffers_dealloc (XF86WrapperObject *wrapper)
+-{
+-  if (wrapper->owner)
+-    Py_DECREF (wrapper->owner);
+-  else 
+-    xf86freeBuffers (wrapper->struct_ptr);
+-
+-  g_hash_table_remove (wrappers_hash, wrapper->struct_ptr);
+-  PyObject_DEL (wrapper);
+-}
+-
+-WrapperAttribute buffers_attributes[] = {
+-  { "count", offsetof(XF86ConfBuffersRec,buf_count), ATTRIBUTE_INT},
+-  { "size", offsetof(XF86ConfBuffersRec,buf_size), ATTRIBUTE_INT},
+-  { "flags", offsetof(XF86ConfBuffersRec,buf_flags), ATTRIBUTE_STRING},
+-  { "comment", offsetof(XF86ConfBuffersRec,buf_comment), ATTRIBUTE_STRING},
+-  { NULL }
+-};
+-
+-static PyObject *
+-pyxf86confbuffers_getattr (XF86WrapperObject *self, char *name)
+-{
+-  return pyxf86wrapper_getattr (self, name, buffers_attributes);
+-}
+-
+-static int
+-pyxf86confbuffers_setattr (XF86WrapperObject *self, char *name, PyObject *obj)
+-{
+-  return pyxf86wrapper_setattr (self, name, obj, buffers_attributes);
+-}
+-
+-static PyTypeObject XF86ConfBuffersType = {
+-  PyObject_HEAD_INIT (&PyType_Type)
+-  0,                  /* size */
+-  "XF86ConfBuffers",       /* name */
+-  sizeof (XF86WrapperObject), /* object size */
+-  0,                  /* itemsize */
+-
+-  /* standard methods */
+-  (destructor)  pyxf86confbuffers_dealloc,
+-  (printfunc)   0,
+-  (getattrfunc) pyxf86confbuffers_getattr,
+-  (setattrfunc) pyxf86confbuffers_setattr,
+-  (cmpfunc)     0,
+-  (reprfunc)    0,
+-};
+-
+-static PyObject *
+-pyxf86confbuffers_new (PyObject *self, PyObject *args)
+-{
+-  XF86ConfBuffersPtr s;
+-
+-  if (!PyArg_ParseTuple (args, ""))
+-    return NULL;
+-
+-  s = calloc (1, sizeof (XF86ConfBuffersRec));
+-
+-  return pyxf86config_wrap (s,
+-			    NULL,
+-			    &XF86ConfBuffersType);
+-}
+-
+ /********** DRI section ****************/
+ 
+ static void
+@@ -1506,7 +1441,6 @@ WrapperAttribute dri_attributes[] = {
+   { "group_name", offsetof(XF86ConfDRIRec,dri_group_name), ATTRIBUTE_STRING},
+   { "group", offsetof(XF86ConfDRIRec,dri_group), ATTRIBUTE_INT},
+   { "mode", offsetof(XF86ConfDRIRec,dri_mode), ATTRIBUTE_INT},
+-  { "buffers", offsetof(XF86ConfDRIRec,dri_buffers_lst), ATTRIBUTE_LIST, &XF86ConfBuffersType},
+   { "comment", offsetof(XF86ConfDRIRec,dri_comment), ATTRIBUTE_STRING},
+   { NULL }
+ };
+@@ -2776,7 +2710,6 @@ static struct PyMethodDef xf86config_met
+   { "XF86ConfInactive", pyxf86confinactive_new, METH_VARARGS },
+   { "XF86ConfInputref", pyxf86confinputref_new, METH_VARARGS },
+   { "XF86ConfLayout", pyxf86conflayout_new, METH_VARARGS },
+-  { "XF86ConfBuffers", pyxf86confbuffers_new, METH_VARARGS },
+   { "XF86ConfDRI", pyxf86confdri_new, METH_VARARGS },
+   { "XF86ConfVendSub", pyxf86confvendsub_new, METH_VARARGS },
+   { "XF86ConfVendor", pyxf86confvendor_new, METH_VARARGS },
+diff -up pyxf86config-0.3.37/xf86config_ext.c.nobuffers pyxf86config-0.3.37/xf86config_ext.c
+--- pyxf86config-0.3.37/xf86config_ext.c.nobuffers	2011-11-29 14:59:12.802263756 +0000
++++ pyxf86config-0.3.37/xf86config_ext.c	2011-11-29 14:59:18.713263440 +0000
+@@ -186,14 +186,6 @@ xf86freeLayout (XF86ConfLayoutPtr ptr)
+ }
+ 
+ void
+-xf86freeBuffers (XF86ConfBuffersPtr ptr)
+-{
+-  TestFree (ptr->buf_flags);
+-  TestFree (ptr->buf_comment);
+-  xf86conffree (ptr);
+-}
+-
+-void
+ xf86freeVendSub (XF86ConfVendSubPtr ptr)
+ {
+   TestFree (ptr->vs_identifier);
+diff -up pyxf86config-0.3.37/xf86ParserExt.h.nobuffers pyxf86config-0.3.37/xf86ParserExt.h
+--- pyxf86config-0.3.37/xf86ParserExt.h.nobuffers	2011-11-29 14:59:57.586261382 +0000
++++ pyxf86config-0.3.37/xf86ParserExt.h	2011-11-29 15:00:02.193261137 +0000
+@@ -34,6 +34,5 @@ extern void xf86freeAdjacency (XF86ConfA
+ extern void xf86freeInactive (XF86ConfInactivePtr ptr);
+ extern void xf86freeInputref (XF86ConfInputrefPtr ptr);
+ extern void xf86freeLayout (XF86ConfLayoutPtr ptr);
+-extern void xf86freeBuffers (XF86ConfBuffersPtr ptr);
+ extern void xf86freeVendSub (XF86ConfVendSubPtr ptr);
+ extern void xf86freeVendor (XF86ConfVendorPtr p);
+diff -up pyxf86config-0.3.37/xf86config.py.nobuffers pyxf86config-0.3.37/xf86config.py
+--- pyxf86config-0.3.37/xf86config.py.nobuffers	2011-11-29 15:01:22.706256873 +0000
++++ pyxf86config-0.3.37/xf86config.py	2011-11-29 15:01:34.361256254 +0000
+@@ -107,9 +107,6 @@ def XF86ConfInputref(device = None, opti
+ def XF86ConfLayout():
+     return ixf86config.XF86ConfLayout()
+ 
+-def XF86ConfBuffers():
+-    return ixf86config.XF86ConfBuffers()
+-
+ def XF86ConfDRI():
+     return ixf86config.XF86ConfDRI()
+ 


More information about the scm-commits mailing list