From e95118f7fc3eef3118ca27d2ead7c73b10377d61 Mon Sep 17 00:00:00 2001 From: Scott McCreary Date: Tue, 21 Sep 2010 21:06:10 +0000 Subject: [PATCH] Cleaned up the box2d patch a bit so that it should be ok to upstream now. --- dev-games/box2d/box2d-2.1.2.bep | 2 +- dev-games/box2d/patches/box2d-2.1.2.patch | 67 ++++++++++++----------- 2 files changed, 37 insertions(+), 32 deletions(-) diff --git a/dev-games/box2d/box2d-2.1.2.bep b/dev-games/box2d/box2d-2.1.2.bep index 4d46ff496..19d75a42e 100644 --- a/dev-games/box2d/box2d-2.1.2.bep +++ b/dev-games/box2d/box2d-2.1.2.bep @@ -17,4 +17,4 @@ INSTALL { make install } LICENSE="MIT" -#COPYRIGHT="" +COPYRIGHT="2007-2009 Erin Catto" diff --git a/dev-games/box2d/patches/box2d-2.1.2.patch b/dev-games/box2d/patches/box2d-2.1.2.patch index 02c4c31cb..e7bea1e19 100644 --- a/dev-games/box2d/patches/box2d-2.1.2.patch +++ b/dev-games/box2d/patches/box2d-2.1.2.patch @@ -1,56 +1,61 @@ 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,11 +26,15 @@ +@@ -26,7 +26,9 @@ # Testbed and dependencies. find_package(OpenGL REQUIRED) -+if(HAIKU) -+ # Haiku has glut, so no need for freeglut -+else(HAIKU) ++if(NOT HAIKU) # Haiku has glut, so no need for freeglut add_subdirectory(freeglut) -+endif(HAIKU) ++endif(NOT HAIKU) add_subdirectory(glui) add_subdirectory(Testbed) endif(BOX2D_BUILD_EXAMPLES) - - if(BOX2D_INSTALL_DOC) - install(DIRECTORY Documentation DESTINATION share/doc/Box2D PATTERN ".svn" EXCLUDE) --endif(BOX2D_INSTALL_DOC) -\ No newline at end of file -+endif(BOX2D_INSTALL_DOC) 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.031457280 +0000 -+++ Box2D_v2.1.2-haiku/Box2D/Testbed/CMakeLists.txt 2010-09-21 11:32:14.000000000 +0000 -@@ -75,7 +75,6 @@ - target_link_libraries ( - Testbed - Box2D +--- 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} +- 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,12 +18,16 @@ +@@ -18,7 +18,11 @@ #include "Render.h" +#ifdef __HAIKU__ -+#include "GL/glut.h" ++#include +#else #include "freeglut/GL/glut.h" +#endif #include #include - --#include -+#include - - void DebugDraw::DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) - { 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 @@ -59,8 +64,8 @@ diff -urN Box2D_v2.1.2/Box2D/Testbed/Framework/Test.cpp Box2D_v2.1.2-haiku/Box2D #include "Render.h" +#ifdef __HAIKU__ -+#include "GL/glut.h" -+#elif ++#include ++#else #include "freeglut/GL/glut.h" +#endif @@ -74,8 +79,8 @@ diff -urN Box2D_v2.1.2/Box2D/Testbed/Tests/TestEntries.cpp Box2D_v2.1.2-haiku/Bo #include "../Framework/Test.h" #include "../Framework/Render.h" +#ifdef __HAIKU__ -+#include "GL/glut.h" -+#elif ++#include ++#else #include "../../freeglut/GL/glut.h" +#endif #include