From 9fa9eb9ac7bf1d3de825ee25a8f0ae81b7b77896 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Tue, 26 Jul 2016 16:51:15 +0000 Subject: Cleanup patches, a* categories. Rename them to follow the make makepatch naming, and regenerate them. With hat: portmgr Sponsored by: Absolight --- audio/py-openal/files/patch-py__openal.c | 45 ++++++++++++++++++++++++++++++++ audio/py-openal/files/patch-py_openal.c | 45 -------------------------------- audio/py-openal/files/patch-setup.py | 6 ++--- 3 files changed, 48 insertions(+), 48 deletions(-) create mode 100644 audio/py-openal/files/patch-py__openal.c delete mode 100644 audio/py-openal/files/patch-py_openal.c (limited to 'audio/py-openal/files') diff --git a/audio/py-openal/files/patch-py__openal.c b/audio/py-openal/files/patch-py__openal.c new file mode 100644 index 000000000000..4c5c08e7d816 --- /dev/null +++ b/audio/py-openal/files/patch-py__openal.c @@ -0,0 +1,45 @@ +--- py_openal.c.orig 2005-07-16 14:19:11 UTC ++++ py_openal.c +@@ -1041,28 +1041,26 @@ static PyObject *_wrap_alutExit(PyObject + } + + +-static PyObject *_wrap_alutLoadWAVFile(PyObject *self, PyObject *arg) { ++static PyObject *_wrap_alutLoadMemoryFromFile(PyObject *self, PyObject *arg) { + ALvoid *wave = NULL; + ALsizei format; + ALsizei size; +- ALsizei bits; +- ALsizei freq; ++ ALfloat freq; + PyObject* resultobj; + + if(!PyString_Check(arg)) return NULL; + +- alutLoadWAVFile((char* const) PyString_AS_STRING(arg), &wave, &format, &size, &bits, &freq); ++ wave = alutLoadMemoryFromFile ((char* const) PyString_AS_STRING(arg), &format, &size, &freq); + + if(wave == NULL) { + Py_INCREF(Py_None); + return Py_None; + } else { +- resultobj = PyTuple_New(5); ++ resultobj = PyTuple_New(4); + PyTuple_SET_ITEM(resultobj, 0, PyString_FromStringAndSize(wave, size)); + PyTuple_SET_ITEM(resultobj, 1, PyInt_FromLong((long) format)); + PyTuple_SET_ITEM(resultobj, 2, PyInt_FromLong((long) size)); +- PyTuple_SET_ITEM(resultobj, 3, PyInt_FromLong((long) bits)); +- PyTuple_SET_ITEM(resultobj, 4, PyInt_FromLong((long) freq)); ++ PyTuple_SET_ITEM(resultobj, 3, PyInt_FromLong((long) freq)); + return resultobj; + } + } +@@ -2274,7 +2272,7 @@ static PyMethodDef OpenALMethods[] = { + */ + { (char *)"alutInit", (PyCFunction) _wrap_alutInit, METH_VARARGS }, + { (char *)"alutExit", (PyCFunction) _wrap_alutExit, METH_NOARGS }, +- { (char *)"alutLoadWAVFile", (PyCFunction) _wrap_alutLoadWAVFile, METH_VARARGS }, ++ { (char *)"alutLoadMemoryFromFile", (PyCFunction) _wrap_alutLoadMemoryFromFile, METH_VARARGS }, + /* + { (char *)"alcGetAudioChannel_LOKI", (PyCFunction) _wrap_alcGetAudioChannel_LOKI, METH_VARARGS }, + { (char *)"alcSetAudioChannel_LOKI", (PyCFunction) _wrap_alcSetAudioChannel_LOKI, METH_VARARGS }, diff --git a/audio/py-openal/files/patch-py_openal.c b/audio/py-openal/files/patch-py_openal.c deleted file mode 100644 index e2e69852bbb4..000000000000 --- a/audio/py-openal/files/patch-py_openal.c +++ /dev/null @@ -1,45 +0,0 @@ ---- py_openal.c Sat Jul 16 09:19:11 2005 -+++ py_openal.c Mon Aug 21 01:33:49 2006 -@@ -1041,28 +1041,26 @@ - } - - --static PyObject *_wrap_alutLoadWAVFile(PyObject *self, PyObject *arg) { -+static PyObject *_wrap_alutLoadMemoryFromFile(PyObject *self, PyObject *arg) { - ALvoid *wave = NULL; - ALsizei format; - ALsizei size; -- ALsizei bits; -- ALsizei freq; -+ ALfloat freq; - PyObject* resultobj; - - if(!PyString_Check(arg)) return NULL; - -- alutLoadWAVFile((char* const) PyString_AS_STRING(arg), &wave, &format, &size, &bits, &freq); -+ wave = alutLoadMemoryFromFile ((char* const) PyString_AS_STRING(arg), &format, &size, &freq); - - if(wave == NULL) { - Py_INCREF(Py_None); - return Py_None; - } else { -- resultobj = PyTuple_New(5); -+ resultobj = PyTuple_New(4); - PyTuple_SET_ITEM(resultobj, 0, PyString_FromStringAndSize(wave, size)); - PyTuple_SET_ITEM(resultobj, 1, PyInt_FromLong((long) format)); - PyTuple_SET_ITEM(resultobj, 2, PyInt_FromLong((long) size)); -- PyTuple_SET_ITEM(resultobj, 3, PyInt_FromLong((long) bits)); -- PyTuple_SET_ITEM(resultobj, 4, PyInt_FromLong((long) freq)); -+ PyTuple_SET_ITEM(resultobj, 3, PyInt_FromLong((long) freq)); - return resultobj; - } - } -@@ -2274,7 +2272,7 @@ - */ - { (char *)"alutInit", (PyCFunction) _wrap_alutInit, METH_VARARGS }, - { (char *)"alutExit", (PyCFunction) _wrap_alutExit, METH_NOARGS }, -- { (char *)"alutLoadWAVFile", (PyCFunction) _wrap_alutLoadWAVFile, METH_VARARGS }, -+ { (char *)"alutLoadMemoryFromFile", (PyCFunction) _wrap_alutLoadMemoryFromFile, METH_VARARGS }, - /* - { (char *)"alcGetAudioChannel_LOKI", (PyCFunction) _wrap_alcGetAudioChannel_LOKI, METH_VARARGS }, - { (char *)"alcSetAudioChannel_LOKI", (PyCFunction) _wrap_alcSetAudioChannel_LOKI, METH_VARARGS }, diff --git a/audio/py-openal/files/patch-setup.py b/audio/py-openal/files/patch-setup.py index 676207cddf3c..f8ad931eda43 100644 --- a/audio/py-openal/files/patch-setup.py +++ b/audio/py-openal/files/patch-setup.py @@ -1,5 +1,5 @@ ---- setup.py.orig 2006-04-30 17:23:44.000000000 +0200 -+++ setup.py 2009-12-26 17:50:57.000000000 +0100 +--- setup.py.orig 2006-04-30 15:23:44 UTC ++++ setup.py @@ -1,17 +1,17 @@ import os from distutils.core import setup, Extension @@ -23,7 +23,7 @@ setup( -@@ -38,7 +38,7 @@ +@@ -38,7 +38,7 @@ Does not include OpenAL extension.""", ext_modules = [Extension("_openal", ["py_openal.c"], -- cgit v1.2.3