Anonymous avatar Anonymous committed 17178e6

Added msys build support for openal-soft.
Added dependency note for OpenAL.
Fixed msys detection and build for OpenAL.
Fixed another memory leak in math.Vector3 class.

Comments (0)

Files changed (9)

 * Python 2.4, 2.5, 2.6, 3.1 supported   (http://www.python.org)
 
 [Optional dependencies]
-* SDL >= 1.2.10             (http://www.libsdl.org)
-* SDL_mixer >= 1.2.11       (http://www.libsdl.org/projects/SDL_mixer/)
-* SDL_ttf >= 2.0.9          (http://www.libsdl.org/projects/SDL_ttf/)
-* SDL_image >= 1.2.10       (http://www.libsdl.org/projects/SDL_image/)
-* SDL_gfx >= 2.0.18         (http://www.ferzkopp.net/Software/SDL_gfx-2.0/)
-* libpng >= 1.2.24          (http://www.libpng.org)
-* libjpeg >= 6b             (http://www.ijg.org/)
-* freetype >= 2.3.5         (http://www.freetype.org)
-* portmidi >= 199           (http://portmedia.sourceforge.net/)
+* SDL >= 1.2.10                 (http://www.libsdl.org)
+* SDL_mixer >= 1.2.11           (http://www.libsdl.org/projects/SDL_mixer/)
+* SDL_ttf >= 2.0.9              (http://www.libsdl.org/projects/SDL_ttf/)
+* SDL_image >= 1.2.10           (http://www.libsdl.org/projects/SDL_image/)
+* SDL_gfx >= 2.0.18             (http://www.ferzkopp.net/Software/SDL_gfx-2.0/)
+* libpng >= 1.2.24              (http://www.libpng.org)
+* libjpeg >= 6b                 (http://www.ijg.org/)
+* freetype >= 2.3.5             (http://www.freetype.org)
+* portmidi >= 199               (http://portmedia.sourceforge.net/)
+* OpenAL                        use one of:
+  OpenAL11CoreSDK (Aug 2009)    http://www.openal.org 
+  openal-soft >= 1.11.753       http://kcat.strangesoft.net/openal.html
 
 1.2 Notes on SVN usage
 ----------------------

doc/BuildDarwin.txt

 * libjpeg >= 6b              (http://www.ijg.org/)
 * freetype >= 2.3.5          (http://www.freetype.org)
 * portmidi >= 199            (http://portmedia.sourceforge.net/)
+* OpenAL                     use one of:
+  OpenAL11CoreSDK (Aug 2009) http://www.openal.org 
+  openal-soft >= 1.11.753    http://kcat.strangesoft.net/openal.html
 
 And you will need the dependency packages for the packages above:
 

doc/BuildMinGW.txt

 * libjpeg >= 6b              (http://www.ijg.org/)
 * freetype >= 2.3.5          (http://www.freetype.org)
 * portmidi >= 199            (http://portmedia.sourceforge.net/)
+* OpenAL                     use one of:
+  OpenAL11CoreSDK (Aug 2009) http://www.openal.org 
+  openal-soft >= 1.11.753    http://kcat.strangesoft.net/openal.html
 
 And you will need the dependency packages for the packages above:
 

doc/BuildUnix.txt

 * libjpeg >= 6b              (http://www.ijg.org/)
 * freetype >= 2.3.5          (http://www.freetype.org)
 * portmidi >= 199            (http://portmedia.sourceforge.net/)
+* OpenAL                     use one of:
+  OpenAL11CoreSDK (Aug 2009) http://www.openal.org 
+  openal-soft >= 1.11.753    http://kcat.strangesoft.net/openal.html
 
 And you will need the dependency packages for the packages above:
 
 * libjpeg >= 6b              (http://www.ijg.org/)
 * freetype >= 2.3.5          (http://www.freetype.org)
 * portmidi >= 199            (http://portmedia.sourceforge.net/)
+* OpenAL                     use one of:
+  OpenAL11CoreSDK (Aug 2009) http://www.openal.org 
+  openal-soft >= 1.11.753    http://kcat.strangesoft.net/openal.html
 
 The Win32 build chain for Pygame2 does not support building all
 dependencies from scratch. Instead it relies on already built libraries,

msys_build_deps.py

   LIBRARY_PATH - library directory paths - appended to those used by this
                  program
   CPATH - C/C++ header file paths - appended to the paths used by this program
+  CMAKE - Path to the cmake.exe CMake utility.
 
 To get a list of command line options run
 
 zlib 1.2.3
 smpeg rev. 384
 portmidi 199
+openal-soft-1.11.753
 
 The build environment used:
 
 msys-autocont-2.59
 m4-1.4.7-MSYS
 nasm-2.05rc6-win32 (SourceForge)
+CMake 2.8.0
 
-Builds have been performed on Windows 98 and XP.
+Builds have been performed on Windows XP.
 
 Build issues:
   For pre-2007 computers:  MSYS bug "[ 1170716 ] executing a shell scripts
     include_path = os.path.join(msys_root, 'local', 'include')
     environ['CPATH'] = merge_strings(include_path, environ.get('CPATH', ''),
                                      sep=';')
+    # CMake utility
+    if 'CMAKE' not in environ:
+        environ['CMAKE'] = 'cmake'
 
 class ChooseError(StandardError):
     """Failer to select dependencies"""
   rm -f GNUmakefile portmidi.def
 fi
 """),
+    Dependency('OPENAL', ['openal', 'openal-soft-[1-9].*'], ['OpenAL32.dll'], """
+set -e
+cd $BDWD/build
+
+if [ x$BDCONF == x1 ]; then
+  $CMAKE -G "MSYS Makefiles" ..
+fi
+
+if [ x$BDCOMP == x1 ]; then
+  make
+fi
+
+if [ x$BDINST == x1 ]; then
+  cp -fp openal-info.exe /usr/local/bin
+  cp -fp OpenAL32.dll /usr/local/bin
+  cp -fp libOpenAL32.dll.a /usr/local/lib
+  cp -fp openal.pc /usr/local/lib/pkgconfig
+  mkdir -p /usr/local/include/AL
+  cp -f ../include/AL/*.h /usr/local/include/AL
+fi
+
+if [ x$BDSTRIP == x1 ]; then
+  strip --strip-all /usr/local/bin/OpenAL32.dll
+fi
+
+if [ x$BDCLEAN == x1 ]; then
+  make clean
+  rm -rf *
+fi
+"""),
 
     ]  # End dependencies = [.
 

src/math/vector3.c

         (v->coords[0] * othercoords[2]);
     ret->coords[2] = (v->coords[0] * othercoords[1]) -
         (v->coords[1] * othercoords[0]);
+    PyMem_Free (othercoords);
     return (PyObject*) ret;
 }
 

src/openal/basemod.c

 */
 #define PYGAME_OPENALBASE_INTERNAL
 
+#ifdef IS_MSYS
+#include <al.h>
+#else
 #include <AL/al.h>
+#endif
+
 #include "pgbase.h"
 #include "pgopenal.h"
 /*#include "openalbase_doc.h"*/
     if (!mod)
         goto fail;
         
+    /* PyDevice_Type.tp_new = PyType_GenericNew; */
+    /* if (PyType_Ready (&PyDevice_Type) < 0) */
+    /*     MODINIT_RETURN(NULL); */
+
     /*PyModule_AddObject (mod, "Device", (PyObject *) &PyDevice_Type);*/
     
     if (import_pygame2_base () < 0)

src/openal/constantsmod.c

 */
 #define PYGAME_OPENALCONSTANTS_INTERNAL
 
+#ifdef IS_MSYS
+#include <al.h>
+#include <alc.h>
+#include <alext.h>
+#else
 #include <AL/al.h>
 #include <AL/alc.h>
 #include <AL/alext.h>
+#endif
 #include "pgopenal.h"
 
 /* macros used to create each constant */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.