diff --git a/dev-games/box2d/box2d-2.3.1.recipe b/dev-games/box2d/box2d-2.3.1.recipe new file mode 100644 index 000000000..c04ad2d65 --- /dev/null +++ b/dev-games/box2d/box2d-2.3.1.recipe @@ -0,0 +1,49 @@ +SUMMARY="A 2D Physics Engine for Games" +DESCRIPTION="Box2D is a feature rich 2D rigid body physics engine, written in C++. \ +It has been used in many games, including Crayon Physics Deluxe, \ +winner of the 2008 Independant Game Festival Grand Prize" +HOMEPAGE="http://www.box2d.org" +COPYRIGHT="2007-2015 Erin Catto" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://github.com/erincatto/Box2D/archive/v2.3.1.zip" +CHECKSUM_SHA256="67c451bbf6d9b0ceae80e90c971f963ec149c59fb6ac73d8ebbf2c58c918f423" +SOURCE_DIR="Box2D-2.3.1" +PATCHES="box2d-2.3.1.patch" + +ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + box2d$secondaryArchSuffix + cmd:box2d$secondaryArchSuffix + " + +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libgl$secondaryArchSuffix + devel:libglu$secondaryArchSuffix + " + +BUILD_PREREQUIRES=" + cmd:make + cmd:cmake + cmd:gcc$secondaryArchSuffix + " + +BUILD() +{ + cd Box2D + cmake . $cmakeDirArgs + make $jobArgs +} + +INSTALL() +{ + cd Box2D + make install +} \ No newline at end of file diff --git a/dev-games/box2d/patches/box2d-2.3.1.patch b/dev-games/box2d/patches/box2d-2.3.1.patch new file mode 100644 index 000000000..6a6735bfe --- /dev/null +++ b/dev-games/box2d/patches/box2d-2.3.1.patch @@ -0,0 +1,50 @@ +diff --git a/Box2D/CMakeLists.txt b/Box2D/CMakeLists.txt +index a8ad550..17b3069 100644 +--- a/Box2D/CMakeLists.txt ++++ b/Box2D/CMakeLists.txt +@@ -26,7 +26,9 @@ if(BOX2D_BUILD_EXAMPLES) + + # Testbed and dependencies. + find_package(OpenGL REQUIRED) ++ if(NOT HAIKU) # Haiku has glut, so no need for freeglut. Disable GLUI because it's not ported. + add_subdirectory(freeglut) + add_subdirectory(glui) + add_subdirectory(Testbed) ++ endif(NOT HAIKU) + endif(BOX2D_BUILD_EXAMPLES) +diff --git a/Box2D/Box2D/CMakeLists.txt b/Box2D/Box2D/CMakeLists.txt +--- a/Box2D/Box2D/CMakeLists.txt ++++ b/Box2D/Box2D/CMakeLists.txt +@@ -207,8 +207,8 @@ + # install build system hooks for third-party apps + install(EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR}/Box2D) + +- set (BOX2D_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include) ++ set (BOX2D_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/develop/headers ) +- set (BOX2D_INCLUDE_DIRS ${BOX2D_INCLUDE_DIR} ) ++ set (BOX2D_INCLUDE_DIRS ${BOX2D_INCLUDE_DIR} ) +- set (BOX2D_LIBRARY_DIRS ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}) ++ set (BOX2D_LIBRARY_DIRS ${CMAKE_INSTALL_PREFIX}/develop/lib ) + set (BOX2D_LIBRARY Box2D) + set (BOX2D_LIBRARIES ${BOX2D_LIBRARY}) +@@ -185,12 +185,12 @@ + if(BOX2D_INSTALL) + # install headers +- install(FILES ${BOX2D_General_HDRS} DESTINATION include/Box2D) ++ install(FILES ${BOX2D_General_HDRS} DESTINATION develop/headers/Box2D) +- install(FILES ${BOX2D_Collision_HDRS} DESTINATION include/Box2D/Collision) ++ install(FILES ${BOX2D_Collision_HDRS} DESTINATION develop/headers/Box2D/Collision) +- install(FILES ${BOX2D_Shapes_HDRS} DESTINATION include/Box2D/Collision/Shapes) ++ install(FILES ${BOX2D_Shapes_HDRS} DESTINATION develop/headers/Box2D/Collision/Shapes) +- install(FILES ${BOX2D_Common_HDRS} DESTINATION include/Box2D/Common) ++ install(FILES ${BOX2D_Common_HDRS} DESTINATION develop/headers/Box2D/Common) +- install(FILES ${BOX2D_Dynamics_HDRS} DESTINATION include/Box2D/Dynamics) ++ install(FILES ${BOX2D_Dynamics_HDRS} DESTINATION develop/headers/Box2D/Dynamics) +- install(FILES ${BOX2D_Contacts_HDRS} DESTINATION include/Box2D/Dynamics/Contacts) ++ install(FILES ${BOX2D_Contacts_HDRS} DESTINATION develop/headers/Box2D/Dynamics/Contacts) +- install(FILES ${BOX2D_Joints_HDRS} DESTINATION include/Box2D/Dynamics/Joints) ++ install(FILES ${BOX2D_Joints_HDRS} DESTINATION develop/headers/Box2D/Dynamics/Joints) +- install(FILES ${BOX2D_Rope_HDRS} DESTINATION include/Box2D/Rope) ++ install(FILES ${BOX2D_Rope_HDRS} DESTINATION develop/headers/Box2D/Rope) + + # install libraries