Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added sci-physics/bullet-2.81.ebuild
- Loading branch information
Showing
7 changed files
with
329 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST bullet-2.81-rev2613.tgz 8297547 SHA256 8ac9079803a6f793801727ccddb0b98becea3efe92fd6590cf38b9cb8bbc1eed SHA512 5f77d4ea123bca06a390e27f5028d67b1f328c65d16711448cca885bc66de37bdef3024397603140e28e8fe68679cc596aa9a4ee617fc2a913f23d4c5c0f52a3 WHIRLPOOL 91894b76cb3cd4239f91305860cf78152c323df05c4b1d77bb8564cd2badb8a7e811f8dcf7e10f9b04db5345787b3c2cb0163d0ef9c77aa716e69307a235873a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=4 | ||
|
||
inherit eutils cmake-utils | ||
|
||
# version release, check http://code.google.com/p/bullet/downloads/list | ||
MYP=${P}-rev2613 | ||
|
||
DESCRIPTION="Continuous Collision Detection and Physics Library" | ||
HOMEPAGE="http://www.bulletphysics.com/" | ||
SRC_URI="http://bullet.googlecode.com/files/${MYP}.tgz" | ||
|
||
LICENSE="ZLIB" | ||
SLOT="0" | ||
KEYWORDS="amd64 ~ppc64 x86 ~amd64-linux ~x86-linux" | ||
IUSE="custom_vector_math demos doc double-precision extras +glut +graphical_benchmark \ | ||
internal_update_serialization_structures test threads" | ||
REQUIRED_USE="demos? ( extras )" | ||
|
||
RDEPEND="virtual/opengl | ||
glut? ( media-libs/freeglut ) | ||
test? ( virtual/opencl ) | ||
threads? ( virtual/opencl )" | ||
DEPEND="${RDEPEND} | ||
virtual/pkgconfig | ||
doc? ( app-doc/doxygen[dot] )" | ||
|
||
PATCHES=( "${FILESDIR}"/${PN}-2.78-soversion.patch ) | ||
|
||
S="${WORKDIR}/${MYP}" | ||
|
||
src_prepare() { | ||
# allow to generate docs | ||
sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die | ||
} | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DBUILD_SHARED_LIBS=ON | ||
$(cmake-utils_use_use custom_vector_math CUSTOM_VECTOR_MATH) | ||
$(cmake-utils_use_build demos DEMOS) | ||
$(cmake-utils_use_build demos CPU_DEMOS) | ||
$(cmake-utils_use_use double-precision DOUBLE_PRECISION) | ||
$(cmake-utils_use extras INSTALL_EXTRA_LIBS) | ||
$(cmake-utils_use_build extras EXTRAS) | ||
$(cmake-utils_use_use glut GLUT) | ||
$(cmake-utils_use_use graphical_benchmark GRAPHICAL_BENCHMARK) | ||
$(cmake-utils_use internal_update_serialization_structures INTERNAL_UPDATE_SERIALIZATION_STRUCTURES) | ||
$(cmake-utils_use_build test UNIT_TESTS) | ||
$(cmake-utils_use_build threads MULTITHREADING) | ||
) | ||
cmake-utils_src_configure | ||
} | ||
|
||
src_compile() { | ||
cmake-utils_src_compile | ||
if use doc; then | ||
doxygen || die | ||
fi | ||
} | ||
|
||
src_install() { | ||
cmake-utils_src_install | ||
|
||
# 'make install' doesn't install GLUI, so we have to do it mnually | ||
if use glut; then | ||
dolib ${BUILD_DIR}/Extras/glui/libGLUI.so | ||
insinto ${EPREFIX}/usr/lib/GL | ||
doins Extras/glui/GL/glui.h | ||
fi | ||
|
||
# Install standard documentation | ||
dodoc AUTHORS ChangeLog NEWS README RELEASING.TXT | ||
|
||
# Install user documentation | ||
insinto "/usr/share/doc/${PF}/latex" | ||
doins docs/*.tex docs/*.sty | ||
insinto "/usr/share/doc/${PF}/pdf" | ||
doins *.pdf docs/*.pdf | ||
insinto "/usr/share/doc/${PF}/postscript" | ||
doins docs/*.eps | ||
|
||
# Install HTML API documentation generated by Doxygen | ||
use doc && dohtml -r html/* | ||
|
||
# Install demo programs | ||
if use demos; then | ||
# Standard demos first | ||
dobin ${BUILD_DIR}/Demos/Benchmarks/AppBenchmarks | ||
dobin ${BUILD_DIR}/Demos/HelloWorld/AppHelloWorld | ||
# Now the "CPU demos" | ||
dobin ${BUILD_DIR}/Demos/AllBulletDemos/AppAllBulletDemos | ||
dobin ${BUILD_DIR}/Demos/BasicDemo/AppBasicDemo | ||
dobin ${BUILD_DIR}/Demos/Box2dDemo/AppBox2dDemo | ||
#Note/Todo: AppBspPhysicsDemo may need BspDemo.bsp in the current directory to be fully functional | ||
dobin ${BUILD_DIR}/Demos/BspDemo/AppBspPhysicsDemo | ||
dobin ${BUILD_DIR}/Demos/BulletXmlImportDemo/AppBulletXmlImportDemo | ||
dobin ${BUILD_DIR}/Demos/CcdPhysicsDemo/AppCcdPhysicsDemo | ||
#Note/Todo: AppCharacterDemo needs BspDemo.bsp to be in the current directory to be fully functional | ||
dobin ${BUILD_DIR}/Demos/CharacterDemo/AppCharacterDemo | ||
dobin ${BUILD_DIR}/Demos/CollisionDemo/AppCollisionDemo | ||
dobin ${BUILD_DIR}/Demos/CollisionInterfaceDemo/AppCollisionInterfaceDemo | ||
dobin ${BUILD_DIR}/Demos/ConcaveConvexcastDemo/AppConcaveConvexCastDemo | ||
dobin ${BUILD_DIR}/Demos/ConcaveDemo/AppConcaveDemo | ||
dobin ${BUILD_DIR}/Demos/ConcaveRaycastDemo/AppConcaveRayCastDemo | ||
dobin ${BUILD_DIR}/Demos/ConstraintDemo/AppConstraintDemo | ||
dobin ${BUILD_DIR}/Demos/ContinuousConvexCollision/AppContinuousConvexCollisionDemo | ||
#Note/Todo: AppConvexDecompositionDemo needs file.obj and possibly testFile.bullet in the current directory to be fully functional | ||
dobin ${BUILD_DIR}/Demos/ConvexDecompositionDemo/AppConvexDecompositionDemo | ||
dobin ${BUILD_DIR}/Demos/ConvexHullDistance/AppConvexHullDistanceDemo | ||
dobin ${BUILD_DIR}/Demos/DoublePrecisionDemo/AppDoublePrecisionDemo | ||
dobin ${BUILD_DIR}/Demos/DynamicControlDemo/AppMotorDemo | ||
dobin ${BUILD_DIR}/Demos/ForkLiftDemo/AppForkLiftDemo | ||
dobin ${BUILD_DIR}/Demos/FractureDemo/AppFractureDemo | ||
dobin ${BUILD_DIR}/Demos/GenericJointDemo/AppGenericJointDemo | ||
dobin ${BUILD_DIR}/Demos/GjkConvexCastDemo/AppLinearConvexCastDemo | ||
dobin ${BUILD_DIR}/Demos/GyroscopicDemo/AppGyroscopicDemo | ||
dobin ${BUILD_DIR}/Demos/InternalEdgeDemo/AppInternalEdgeDemo | ||
dobin ${BUILD_DIR}/Demos/MovingConcaveDemo/AppMovingConcaveDemo | ||
dobin ${BUILD_DIR}/Demos/MultiMaterialDemo/AppMultiMaterialDemo | ||
dobin ${BUILD_DIR}/Demos/RagdollDemo/AppRagdollDemo | ||
dobin ${BUILD_DIR}/Demos/RaytestDemo/AppRaytestDemo | ||
dobin ${BUILD_DIR}/Demos/Raytracer/AppRaytracer | ||
dobin ${BUILD_DIR}/Demos/RollingFrictionDemo/AppRollingFrictionDemo | ||
dobin ${BUILD_DIR}/Demos/SerializeDemo/AppSerializeDemo | ||
dobin ${BUILD_DIR}/Demos/SimplexDemo/AppSimplexDemo | ||
dobin ${BUILD_DIR}/Demos/SliderConstraintDemo/AppSliderConstraintDemo | ||
dobin ${BUILD_DIR}/Demos/SoftDemo/AppSoftBodyDemo | ||
dobin ${BUILD_DIR}/Demos/UserCollisionAlgorithm/AppUserCollisionAlgorithm | ||
dobin ${BUILD_DIR}/Demos/VehicleDemo/AppVehicleDemo | ||
dobin ${BUILD_DIR}/Demos/VoronoiFractureDemo/AppVoronoiFractureDemo | ||
fi | ||
|
||
# Install source code for demo programs and extra libraries | ||
if use examples; then | ||
insinto "/usr/local/src/${PF}" | ||
doins -r Demos Extras | ||
fi | ||
} | ||
|
||
pkg_postinst() { | ||
if use demos && use !glut; then | ||
einfo | ||
einfo "You have built the demos without building the OpenGL plugin." | ||
einfo "The program \"AppAllBulletDemos\" will not work, but all of " | ||
einfo "the demo programs should still run. " | ||
einfo | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
src/BulletSoftBody/btSoftBody.h | 3 +++ | ||
src/BulletSoftBody/btSoftBodyInternals.h | 4 ++-- | ||
2 files changed, 5 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/BulletSoftBody/btSoftBody.h b/src/BulletSoftBody/btSoftBody.h | ||
index 4d975b7..f781598 100644 | ||
--- a/src/BulletSoftBody/btSoftBody.h | ||
+++ b/src/BulletSoftBody/btSoftBody.h | ||
@@ -30,6 +30,7 @@ subject to the following restrictions: | ||
class btBroadphaseInterface; | ||
class btDispatcher; | ||
|
||
+class btSoftBodySolver; | ||
|
||
/* btSoftBodyWorldInfo */ | ||
struct btSoftBodyWorldInfo | ||
@@ -52,6 +53,8 @@ class btSoftBody : public btCollisionObject | ||
public: | ||
btAlignedObjectArray<class btCollisionObject*> m_collisionDisabledObjects; | ||
|
||
+ // The solver object that handles this soft body | ||
+ btSoftBodySolver *m_softBodySolver; | ||
// | ||
// Enumerations | ||
// | ||
diff --git a/src/BulletSoftBody/btSoftBodyInternals.h b/src/BulletSoftBody/btSoftBodyInternals.h | ||
index 2cb7744..296d97a 100644 | ||
--- a/src/BulletSoftBody/btSoftBodyInternals.h | ||
+++ b/src/BulletSoftBody/btSoftBodyInternals.h | ||
@@ -26,6 +26,7 @@ subject to the following restrictions: | ||
#include "BulletCollision/CollisionShapes/btConvexInternalShape.h" | ||
#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" | ||
|
||
+#include <string.h> //for memset | ||
// | ||
// btSymMatrix | ||
// | ||
@@ -172,8 +173,7 @@ public: | ||
template <typename T> | ||
static inline void ZeroInitialize(T& value) | ||
{ | ||
- static const T zerodummy; | ||
- value=zerodummy; | ||
+ memset(&value,0,sizeof(T)); | ||
} | ||
// | ||
template <typename T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff -up bullet-2.77/src/BulletMultiThreaded/CMakeLists.txt.lib bullet-2.77/src/BulletMultiThreaded/CMakeLists.txt | ||
--- bullet-2.77/src/BulletMultiThreaded/CMakeLists.txt.lib 2010-10-08 12:45:59.000000000 +0200 | ||
+++ bullet-2.77/src/BulletMultiThreaded/CMakeLists.txt 2010-10-08 12:46:26.000000000 +0200 | ||
@@ -84,7 +84,7 @@ IF (INSTALL_LIBS) | ||
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) | ||
INSTALL(TARGETS BulletMultiThreaded DESTINATION .) | ||
ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) | ||
- INSTALL(TARGETS BulletMultiThreaded DESTINATION lib) | ||
+ INSTALL(TARGETS BulletMultiThreaded DESTINATION lib${LIB_SUFFIX}) | ||
INSTALL(DIRECTORY | ||
${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING | ||
PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) | ||
diff -up bullet-2.77/src/MiniCL/CMakeLists.txt.lib bullet-2.77/src/MiniCL/CMakeLists.txt | ||
--- bullet-2.77/src/MiniCL/CMakeLists.txt.lib 2010-10-08 12:44:50.000000000 +0200 | ||
+++ bullet-2.77/src/MiniCL/CMakeLists.txt 2010-10-08 12:46:42.000000000 +0200 | ||
@@ -32,7 +32,7 @@ IF (INSTALL_LIBS) | ||
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) | ||
INSTALL(TARGETS MiniCL DESTINATION .) | ||
ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) | ||
- INSTALL(TARGETS MiniCL DESTINATION lib) | ||
+ INSTALL(TARGETS MiniCL DESTINATION lib${LIB_SUFFIX}) | ||
INSTALL(DIRECTORY | ||
${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING | ||
PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff -up bullet-2.77/Extras/glui/CMakeLists.txt.extras-version bullet-2.77/Extras/glui/CMakeLists.txt | ||
--- bullet-2.77/Extras/glui/CMakeLists.txt.extras-version 2010-03-06 16:23:36.000000000 +0100 | ||
+++ bullet-2.77/Extras/glui/CMakeLists.txt 2010-07-26 12:09:01.000000000 +0200 | ||
@@ -61,6 +61,8 @@ arcball.cpp glui_button.cpp glui_fil | ||
|
||
) | ||
|
||
+SET_TARGET_PROPERTIES(GLUI PROPERTIES VERSION ${BULLET_VERSION}) | ||
+SET_TARGET_PROPERTIES(GLUI PROPERTIES SOVERSION ${BULLET_VERSION}) | ||
IF (BUILD_SHARED_LIBS) | ||
TARGET_LINK_LIBRARIES(GLUI ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) | ||
ENDIF (BUILD_SHARED_LIBS) | ||
diff -up bullet-2.77/Extras/Serialize/BulletFileLoader/CMakeLists.txt.extras-version bullet-2.77/Extras/Serialize/BulletFileLoader/CMakeLists.txt | ||
--- bullet-2.77/Extras/Serialize/BulletFileLoader/CMakeLists.txt.extras-version 2010-07-26 12:10:36.000000000 +0200 | ||
+++ bullet-2.77/Extras/Serialize/BulletFileLoader/CMakeLists.txt 2010-07-26 12:10:57.000000000 +0200 | ||
@@ -16,6 +16,8 @@ btBulletFile.cpp | ||
btBulletFile.h | ||
) | ||
|
||
+SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES VERSION ${BULLET_VERSION}) | ||
+SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES SOVERSION ${BULLET_VERSION}) | ||
IF (BUILD_SHARED_LIBS) | ||
TARGET_LINK_LIBRARIES(BulletFileLoader LinearMath) | ||
ENDIF (BUILD_SHARED_LIBS) | ||
diff -up bullet-2.77/Extras/Serialize/BulletWorldImporter/CMakeLists.txt.extras-version bullet-2.77/Extras/Serialize/BulletWorldImporter/CMakeLists.txt | ||
--- bullet-2.77/Extras/Serialize/BulletWorldImporter/CMakeLists.txt.extras-version 2010-07-26 12:11:08.000000000 +0200 | ||
+++ bullet-2.77/Extras/Serialize/BulletWorldImporter/CMakeLists.txt 2010-07-26 12:11:26.000000000 +0200 | ||
@@ -9,6 +9,8 @@ btBulletWorldImporter.cpp | ||
btBulletWorldImporter.h | ||
) | ||
|
||
+SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES VERSION ${BULLET_VERSION}) | ||
+SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES SOVERSION ${BULLET_VERSION}) | ||
IF (BUILD_SHARED_LIBS) | ||
TARGET_LINK_LIBRARIES(BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath) | ||
ENDIF (BUILD_SHARED_LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Extras/Serialize/BulletFileLoader/CMakeLists.txt | 2 ++ | ||
.../Serialize/BulletWorldImporter/CMakeLists.txt | 2 ++ | ||
Extras/glui/CMakeLists.txt | 2 ++ | ||
3 files changed, 6 insertions(+), 0 deletions(-) | ||
|
||
diff --git a/Extras/Serialize/BulletFileLoader/CMakeLists.txt b/Extras/Serialize/BulletFileLoader/CMakeLists.txt | ||
index 486cfdc..f1e0884 100644 | ||
--- a/Extras/Serialize/BulletFileLoader/CMakeLists.txt | ||
+++ b/Extras/Serialize/BulletFileLoader/CMakeLists.txt | ||
@@ -16,6 +16,8 @@ btBulletFile.cpp | ||
btBulletFile.h | ||
) | ||
|
||
+SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES VERSION ${BULLET_VERSION}) | ||
+SET_TARGET_PROPERTIES(BulletFileLoader PROPERTIES SOVERSION ${BULLET_VERSION}) | ||
IF (BUILD_SHARED_LIBS) | ||
TARGET_LINK_LIBRARIES(BulletFileLoader LinearMath) | ||
ENDIF (BUILD_SHARED_LIBS) | ||
diff --git a/Extras/Serialize/BulletWorldImporter/CMakeLists.txt b/Extras/Serialize/BulletWorldImporter/CMakeLists.txt | ||
index e620315..e04e8e9 100644 | ||
--- a/Extras/Serialize/BulletWorldImporter/CMakeLists.txt | ||
+++ b/Extras/Serialize/BulletWorldImporter/CMakeLists.txt | ||
@@ -9,6 +9,8 @@ btBulletWorldImporter.cpp | ||
btBulletWorldImporter.h | ||
) | ||
|
||
+SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES VERSION ${BULLET_VERSION}) | ||
+SET_TARGET_PROPERTIES(BulletWorldImporter PROPERTIES SOVERSION ${BULLET_VERSION}) | ||
IF (BUILD_SHARED_LIBS) | ||
TARGET_LINK_LIBRARIES(BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath) | ||
ENDIF (BUILD_SHARED_LIBS) | ||
diff --git a/Extras/glui/CMakeLists.txt b/Extras/glui/CMakeLists.txt | ||
index c2018a7..9a8d90f 100644 | ||
--- a/Extras/glui/CMakeLists.txt | ||
+++ b/Extras/glui/CMakeLists.txt | ||
@@ -61,6 +61,8 @@ arcball.cpp glui_button.cpp glui_filebrowser.cpp glui_node.cpp glui_separ | ||
|
||
) | ||
|
||
+SET_TARGET_PROPERTIES(GLUI PROPERTIES VERSION ${BULLET_VERSION}) | ||
+SET_TARGET_PROPERTIES(GLUI PROPERTIES SOVERSION ${BULLET_VERSION}) | ||
IF (BUILD_SHARED_LIBS) | ||
TARGET_LINK_LIBRARIES(GLUI ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) | ||
ENDIF (BUILD_SHARED_LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<herd>sci-physics</herd> | ||
<maintainer> | ||
<email>doctorwhoguy@gmail.com</email> | ||
</maintainer> | ||
<longdescription lang="en"> | ||
Bullet is a professional open source multi-threaded | ||
3D Collision Detection and Rigid Body Dynamics Library | ||
for games and animation. | ||
</longdescription> | ||
<use> | ||
<flag name="custom_vector_math">Use custom vectormath library</flag> | ||
<flag name="demos">Build and install the demo programs</flag> | ||
<flag name="doc">Build API documentation with Doxygen</flag> | ||
<flag name="double-precision">Build libraries in double precision</flag> | ||
<flag name="examples">Install the source code for the extra libraries and demo programs</flag> | ||
<flag name="extras">Build additional libraries</flag> | ||
<flag name="graphical_benchmark">Use graphical benchmark in the demos</flag> | ||
<flag name="internal_update_serialization_structures">Internal update serialization structures</flag> | ||
<flag name="threads">Use multithreading. Requires <pkg>virtual/opencl</pkg></flag> | ||
</use> | ||
<upstream> | ||
<remote-id type="google-code">bullet</remote-id> | ||
</upstream> | ||
</pkgmetadata> |