1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

- 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)
This commit is contained in:
Jose Alonso Cardenas Marquez 2006-08-21 16:07:03 +00:00
parent 43a6cc8976
commit 0977976dde
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=171120
3 changed files with 54 additions and 7 deletions

View File

@ -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}

View File

@ -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 },

View File

@ -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,