Files
haikuports/dev-games/box2d/patches/box2d-2.1.2.patch

101 lines
3.1 KiB
Diff

diff -urN Box2D_v2.1.2/Box2D/CMakeLists.txt Box2D_v2.1.2-haiku/Box2D/CMakeLists.txt
--- Box2D_v2.1.2/Box2D/CMakeLists.txt 2010-04-03 11:10:30.046661632 +0000
+++ Box2D_v2.1.2-haiku/Box2D/CMakeLists.txt 2010-09-21 12:18:05.000000000 +0000
@@ -26,7 +26,9 @@
# Testbed and dependencies.
find_package(OpenGL REQUIRED)
+if(NOT HAIKU) # Haiku has glut, so no need for freeglut
add_subdirectory(freeglut)
+endif(NOT HAIKU)
add_subdirectory(glui)
add_subdirectory(Testbed)
endif(BOX2D_BUILD_EXAMPLES)
diff -urN Box2D_v2.1.2/Box2D/Testbed/CMakeLists.txt Box2D_v2.1.2-haiku/Box2D/Testbed/CMakeLists.txt
--- Box2D_v2.1.2/Box2D/Testbed/CMakeLists.txt 2010-04-04 11:07:26.007077888 +0000
+++ Box2D_v2.1.2-haiku/Box2D/Testbed/CMakeLists.txt 2010-09-21 13:44:55.000000000 +0000
@@ -72,10 +72,19 @@
${Testbed_Tests_SRCS}
)
-target_link_libraries (
- Testbed
- Box2D
- freeglut_static
- glui
- ${OPENGL_LIBRARIES}
+if(HAIKU) # Haiku has glut, so no need for freeglut
+ target_link_libraries (
+ Testbed
+ Box2D
+ glui
+ ${OPENGL_LIBRARIES}
+)
+else(HAIKU)
+ target_link_libraries (
+ Testbed
+ Box2D
+ freeglut_static
+ glui
+ ${OPENGL_LIBRARIES}
)
+endif(HAIKU)
\ No newline at end of file
diff -urN Box2D_v2.1.2/Box2D/Testbed/Framework/Render.cpp Box2D_v2.1.2-haiku/Box2D/Testbed/Framework/Render.cpp
--- Box2D_v2.1.2/Box2D/Testbed/Framework/Render.cpp 2010-02-01 02:12:46.031719424 +0000
+++ Box2D_v2.1.2-haiku/Box2D/Testbed/Framework/Render.cpp 2010-09-21 11:29:02.000000000 +0000
@@ -18,7 +18,11 @@
#include "Render.h"
+#ifdef __HAIKU__
+#include <GL/glut.h>
+#else
#include "freeglut/GL/glut.h"
+#endif
#include <cstdio>
#include <cstdarg>
diff -urN Box2D_v2.1.2/Box2D/Testbed/Framework/Test.cpp Box2D_v2.1.2-haiku/Box2D/Testbed/Framework/Test.cpp
--- Box2D_v2.1.2/Box2D/Testbed/Framework/Test.cpp 2010-02-14 12:15:52.031719424 +0000
+++ Box2D_v2.1.2-haiku/Box2D/Testbed/Framework/Test.cpp 2010-09-21 11:28:49.000000000 +0000
@@ -19,7 +19,11 @@
#include "Test.h"
#include "Render.h"
+#ifdef __HAIKU__
+#include <GL/glut.h>
+#else
#include "freeglut/GL/glut.h"
+#endif
#include <cstdio>
diff -urN Box2D_v2.1.2/Box2D/Testbed/Tests/TestEntries.cpp Box2D_v2.1.2-haiku/Box2D/Testbed/Tests/TestEntries.cpp
--- Box2D_v2.1.2/Box2D/Testbed/Tests/TestEntries.cpp 2010-04-17 11:18:18.035127296 +0000
+++ Box2D_v2.1.2-haiku/Box2D/Testbed/Tests/TestEntries.cpp 2010-09-21 11:30:22.000000000 +0000
@@ -18,7 +18,11 @@
#include "../Framework/Test.h"
#include "../Framework/Render.h"
+#ifdef __HAIKU__
+#include <GL/glut.h>
+#else
#include "../../freeglut/GL/glut.h"
+#endif
#include <cstring>
#include "ApplyForce.h"
diff -urN Box2D_v2.1.2/Box2D/glui/GL/glui.h Box2D_v2.1.2-haiku/Box2D/glui/GL/glui.h
--- Box2D_v2.1.2/Box2D/glui/GL/glui.h 2010-02-01 02:12:42.030408704 +0000
+++ Box2D_v2.1.2-haiku/Box2D/glui/GL/glui.h 2010-09-21 11:25:12.000000000 +0000
@@ -49,6 +49,8 @@
#ifdef __APPLE__
#include <GLUT/glut.h>
+ #elif __HAIKU__
+ #include <GL/glut.h>
#else
#include "../../freeglut/GL/glut.h"
//#include <GL/glut.h>