diff options
| author | Adam Vandenberg | 2013-09-23 20:52:35 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2013-09-23 20:52:35 -0700 |
| commit | 128762e99a3d26c0540fee0058793533cf843799 (patch) | |
| tree | b907cbc7eefa476ab15d90e4857999d4142bf221 /Library/Formula | |
| parent | a0a490913f11a786f62e60c5f0c0a656c187421a (diff) | |
| download | homebrew-128762e99a3d26c0540fee0058793533cf843799.tar.bz2 | |
anttweakbar: fix compilation on 10.8
Closes #21269.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/anttweakbar.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Library/Formula/anttweakbar.rb b/Library/Formula/anttweakbar.rb index 2ad7d9ea2..f1cea658f 100644 --- a/Library/Formula/anttweakbar.rb +++ b/Library/Formula/anttweakbar.rb @@ -6,6 +6,12 @@ class Anttweakbar < Formula version '1.16' sha1 '5743321df3b074f9a82b5ef3e6b54830a715b938' + # See + # http://sourceforge.net/p/anttweakbar/code/ci/5a076d13f143175a6bda3c668e29a33406479339/tree/src/LoadOGLCore.h?diff=5528b167ed12395a60949d7c643262b6668f15d5&diformat=regular + def patches + DATA + end + def install cd 'src' do system 'make -f Makefile.osx' @@ -14,3 +20,37 @@ class Anttweakbar < Formula include.install 'include/AntTweakBar.h' end end + +__END__ +diff --git a/src/LoadOGLCore.h b/src/LoadOGLCore.h +index 8aaab1e..b606d2b 100644 +--- a/src/LoadOGLCore.h ++++ b/src/LoadOGLCore.h +@@ -146,7 +146,13 @@ ANT_GL_CORE_DECL(void, glGetCompressedTexImage, (GLenum target, GLint level, GLv + // GL 1.4
+ ANT_GL_CORE_DECL(void, glBlendFuncSeparate, (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha))
+ ANT_GL_CORE_DECL(void, glMultiDrawArrays, (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount))
++#if defined(ANT_OSX) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1080)
++// Mac OSX 10.8 SDK from March 2013 redefines this OpenGL call: glMultiDrawElements
++// if it doesn't compile, please update XCode.
++ANT_GL_CORE_DECL(void, glMultiDrawElements, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const*indices, GLsizei primcount))
++#else
+ ANT_GL_CORE_DECL(void, glMultiDrawElements, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount))
++#endif
+ ANT_GL_CORE_DECL(void, glPointParameterf, (GLenum pname, GLfloat param))
+ ANT_GL_CORE_DECL(void, glPointParameterfv, (GLenum pname, const GLfloat *params))
+ ANT_GL_CORE_DECL(void, glPointParameteri, (GLenum pname, GLint param))
+@@ -211,7 +217,13 @@ ANT_GL_CORE_DECL(void, glGetVertexAttribPointerv, (GLuint index, GLenum pname, G + ANT_GL_CORE_DECL(GLboolean, glIsProgram, (GLuint program))
+ ANT_GL_CORE_DECL(GLboolean, glIsShader, (GLuint shader))
+ ANT_GL_CORE_DECL(void, glLinkProgram, (GLuint program))
++#if defined(ANT_OSX) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1080)
++// Mac OSX 10.8 SDK from March 2013 redefines this OpenGL call: glShaderSource
++// if it doesn't compile, please update XCode.
++ANT_GL_CORE_DECL(void, glShaderSource, (GLuint shader, GLsizei count, const GLchar* const*string, const GLint *length))
++#else
+ ANT_GL_CORE_DECL(void, glShaderSource, (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length))
++#endif
+ ANT_GL_CORE_DECL(void, glUseProgram, (GLuint program))
+ ANT_GL_CORE_DECL(void, glUniform1f, (GLint location, GLfloat v0))
+ ANT_GL_CORE_DECL(void, glUniform2f, (GLint location, GLfloat v0, GLfloat v1))
|
