diff options
author | acm <acm@FreeBSD.org> | 2006-08-22 00:07:03 +0800 |
---|---|---|
committer | acm <acm@FreeBSD.org> | 2006-08-22 00:07:03 +0800 |
commit | b668b74134203b26663fdd36ca2cab58af6b57dc (patch) | |
tree | 3d13b98e9745a0fd5fd50abc0cd706fb39cb29f3 /audio/py-openal | |
parent | aa047040a74d122109daee35cfdea8ae9e4444e0 (diff) | |
download | freebsd-ports-gnome-b668b74134203b26663fdd36ca2cab58af6b57dc.tar.gz freebsd-ports-gnome-b668b74134203b26663fdd36ca2cab58af6b57dc.tar.zst freebsd-ports-gnome-b668b74134203b26663fdd36ca2cab58af6b57dc.zip |
- Fix build problem, it isn't linking appropriately to openal lib.
- Add patch_py-openal.c. This port is using DEPRECATED functions of openal.
Approved by: garga (mentor)
Diffstat (limited to 'audio/py-openal')
-rw-r--r-- | audio/py-openal/Makefile | 2 | ||||
-rw-r--r-- | audio/py-openal/files/patch-py_openal.c | 45 | ||||
-rw-r--r-- | audio/py-openal/files/patch-setup.py | 14 |
3 files changed, 54 insertions, 7 deletions
diff --git a/audio/py-openal/Makefile b/audio/py-openal/Makefile index 1343864a26d0..7e4a20da9ace 100644 --- a/audio/py-openal/Makefile +++ b/audio/py-openal/Makefile @@ -7,7 +7,7 @@ PORTNAME= openal PORTVERSION= 0.1.6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio python MASTER_SITES= http://download.gna.org/pyopenal/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} 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..e2e69852bbb4 --- /dev/null +++ b/audio/py-openal/files/patch-py_openal.c @@ -0,0 +1,45 @@ +--- 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 77e0d117f999..57c13f4c833e 100644 --- a/audio/py-openal/files/patch-setup.py +++ b/audio/py-openal/files/patch-setup.py @@ -1,27 +1,29 @@ --- setup.py Sun Apr 30 10:23:44 2006 -+++ setup.py Wed May 10 09:25:22 2006 -@@ -1,13 +1,13 @@ ++++ setup.py Mon Aug 21 00:25:58 2006 +@@ -1,14 +1,14 @@ import os from distutils.core import setup, Extension -LIBDIRS = ["/usr/lib", "/usr/local/lib"] -+LIBDIRS = ["/usr/lib", "/usr/local/lib", "%%PREFIX%%/lib"] ++LIBDIRS = ["/usr/lib", "/usr/local/lib", "/usr/local/lib"] LIBS = ["openal", "alut"] try: openal_version = os.popen("openal-config --version").read() if openal_version[0] == "0": - LIBDIRS = ["/usr/lib", "/usr/local/lib"] -+ LIBDIRS = ["/usr/lib", "/usr/local/lib", "%%PREFIX%%/lib"] - LIBS = ["openal"] +- LIBS = ["openal"] ++ LIBDIRS = ["/usr/lib", "/usr/local/lib", "/usr/local/lib"] ++ LIBS = ["openal","alut"] except: + print "Warning: error while running 'openal-config --version', using default values..." @@ -38,7 +38,7 @@ ext_modules = [Extension("_openal", ["py_openal.c"], - ["/usr/include", "/usr/local/include"], -+ ["/usr/include", "/usr/local/include", "%%PREFIX%%/include"], ++ ["/usr/include", "/usr/local/include", "/usr/local/include"], [("HAVE_CONFIG_H", None)], None, LIBDIRS, |