Last active
December 31, 2022 15:13
-
-
Save reuben/5350824 to your computer and use it in GitHub Desktop.
FoFiX OS X build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkvirtualenv fofix -p /usr/bin/python2.6 | |
workon fofix | |
brew install sdl | |
brew install sdl_{mixer,ttf,image} | |
brew install libpng | |
cd /usr/local/include | |
ln -s SDL/* . | |
pip install hg+http://bitbucket.org/pygame/pygame | |
pip install PyOpenGL | |
pip install numpy | |
pip install PIL | |
pip install cython | |
brew install pkg-config libogg libvorbis theora sound-touch ffmpeg | |
curl "https://gist.github.com/reubenmorais/5350824/raw/ecbfb601fca19784a9861b1331a7a209b4d6f821/osx.patch" | patch -p1 | |
python setup.py build_ext --inplace --force | |
python FoFiX.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/glwrap.h b/src/glwrap.h | |
index c03fe3e..3102c36 100644 | |
--- a/src/glwrap.h | |
+++ b/src/glwrap.h | |
@@ -3,5 +3,10 @@ | |
#undef HAVE_HYPOT | |
#endif | |
+#ifdef __APPLE__ | |
+#include <OpenGL/gl.h> | |
+#include <OpenGL/glu.h> | |
+#else | |
#include <GL/gl.h> | |
#include <GL/glu.h> | |
+#endif | |
\ No newline at end of file | |
diff --git a/src/setup.py b/src/setup.py | |
index ae6616a..3b6e2fd 100755 | |
--- a/src/setup.py | |
+++ b/src/setup.py | |
@@ -313,6 +313,9 @@ if os.name == 'nt': | |
# And we use the prebuilt soundtouch-c. | |
soundtouch_info['libraries'].append('soundtouch-c') | |
extra_soundtouch_src = [] | |
+elif sys.platform == 'darwin': | |
+ gl_info = {'extra_compile_args': ['-framework', 'OpenGL'], 'extra_link_args': ['-framework', 'OpenGL']} | |
+ extra_soundtouch_src = ['MixStream/soundtouch-c.cpp'] | |
else: | |
# Other systems: we ask pkg-config. | |
gl_info = pc_info('gl') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment