mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Initial .bep and .patch files for box2d. This seems to build fine with gcc4, haven't tried gcc2 yet. No test run yet, so not sure if it's working right yet or
not.
This commit is contained in:
20
dev-games/box2d/box2d-2.1.2.bep
Normal file
20
dev-games/box2d/box2d-2.1.2.bep
Normal file
@@ -0,0 +1,20 @@
|
||||
DESCRIPTION="Box2d is an open source 2d physics engine for games."
|
||||
HOMEPAGE="http://www.box2d.org"
|
||||
SRC_URI="http://box2d.googlecode.com/files/Box2D_v2.1.2.zip"
|
||||
CHECKSUM_MD5="59d142cd8d4d73e8832c7b67591f590c"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
BUILD {
|
||||
cd Box2D_v2.1.2/Box2D
|
||||
cmake . -DOPENGL_INCLUDE_DIR:=/boot/develop/headers/os/opengl/GL \
|
||||
-DHAIKU:=TRUE
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd Box2D_v2.1.2/Box2D
|
||||
make install
|
||||
}
|
||||
LICENSE="MIT"
|
||||
#COPYRIGHT=""
|
||||
95
dev-games/box2d/patches/box2d-2.1.2.patch
Normal file
95
dev-games/box2d/patches/box2d-2.1.2.patch
Normal file
@@ -0,0 +1,95 @@
|
||||
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 @@
|
||||
|
||||
# Testbed and dependencies.
|
||||
find_package(OpenGL REQUIRED)
|
||||
+if(HAIKU)
|
||||
+ # Haiku has glut, so no need for freeglut
|
||||
+else(HAIKU)
|
||||
add_subdirectory(freeglut)
|
||||
+endif(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
|
||||
- freeglut_static
|
||||
glui
|
||||
${OPENGL_LIBRARIES}
|
||||
)
|
||||
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 @@
|
||||
|
||||
#include "Render.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include "GL/glut.h"
|
||||
+#else
|
||||
#include "freeglut/GL/glut.h"
|
||||
+#endif
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
|
||||
-#include <cstring>
|
||||
+#include <cstring>
|
||||
|
||||
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
|
||||
@@ -19,7 +19,11 @@
|
||||
#include "Test.h"
|
||||
#include "Render.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include "GL/glut.h"
|
||||
+#elif
|
||||
#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"
|
||||
+#elif
|
||||
#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>
|
||||
Reference in New Issue
Block a user