summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2014-09-01 01:00:55 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2014-09-01 01:00:55 +0000
commit8581d3063425bbc0751a241be875e0fc44bad1e0 (patch)
tree8320c6c2a3caa8af24e7979f610219f98eaa48bf /games-sports
parentversion bump wrt #506534, convert to python-any-r1 (diff)
downloadgentoo-2-8581d3063425bbc0751a241be875e0fc44bad1e0.tar.gz
gentoo-2-8581d3063425bbc0751a241be875e0fc44bad1e0.tar.bz2
gentoo-2-8581d3063425bbc0751a241be875e0fc44bad1e0.zip
add patch from Peter Asplund to allow building against newer versions of sci-physics/bullet
(Portage version: 2.2.8-r1/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'games-sports')
-rw-r--r--games-sports/vdrift/ChangeLog7
-rw-r--r--games-sports/vdrift/files/vdrift-20120722-bullet.patch100
-rw-r--r--games-sports/vdrift/vdrift-20120722.ebuild7
3 files changed, 110 insertions, 4 deletions
diff --git a/games-sports/vdrift/ChangeLog b/games-sports/vdrift/ChangeLog
index 15a173df9b01..dcf4f9302ef2 100644
--- a/games-sports/vdrift/ChangeLog
+++ b/games-sports/vdrift/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-sports/vdrift
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-sports/vdrift/ChangeLog,v 1.23 2014/09/01 00:20:19 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-sports/vdrift/ChangeLog,v 1.24 2014/09/01 01:00:55 mr_bones_ Exp $
+
+ 01 Sep 2014; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/vdrift-20120722-bullet.patch, vdrift-20120722.ebuild:
+ add patch from Peter Asplund to allow building against newer versions of sci-
+ physics/bullet
*vdrift-20120722 (01 Sep 2014)
diff --git a/games-sports/vdrift/files/vdrift-20120722-bullet.patch b/games-sports/vdrift/files/vdrift-20120722-bullet.patch
new file mode 100644
index 000000000000..907433417ee6
--- /dev/null
+++ b/games-sports/vdrift/files/vdrift-20120722-bullet.patch
@@ -0,0 +1,100 @@
+--- src/cardynamics.cpp Mon Jan 19 23:26:36 1970
++++ src/cardynamics.cpp Mon Jan 19 23:26:36 1970
+@@ -1791,23 +1791,29 @@
+
+ bool CARDYNAMICS::WheelContactCallback(
+ btManifoldPoint& cp,
+- const btCollisionObject* colObj0,
+- int partId0,
++ const btCollisionObjectWrapper* col0,
++ int part0,
+ int index0,
+- const btCollisionObject* colObj1,
+- int partId1,
++ const btCollisionObjectWrapper* col1,
++ int part1,
+ int index1)
+ {
+- // cars are fracture bodies, wheel is a cylinder shape
+- const btCollisionShape* shape = colObj0->getCollisionShape();
+- if ((colObj0->getInternalType() & CO_FRACTURE_TYPE) &&
++#if (BT_BULLET_VERSION < 281)
++ const btCollisionObject* obj = col0;
++ const btCollisionShape* shape = obj->getCollisionShape();
++ const btCollisionShape* rootshape = obj->getRootCollisionShape();
++#else
++ const btCollisionObject* obj = col0->getCollisionObject();
++ const btCollisionShape* shape = col0->getCollisionShape();
++ const btCollisionShape* rootshape = obj->getCollisionShape();
++#endif
++ if ((obj->getInternalType() & CO_FRACTURE_TYPE) &&
+ (shape->getShapeType() == CYLINDER_SHAPE_PROXYTYPE))
+ {
+- // is contact within contact patch?
+- const btCompoundShape* car = static_cast<const btCompoundShape*>(colObj0->getRootCollisionShape());
+- const btCylinderShapeX* wheel = static_cast<const btCylinderShapeX*>(shape);
+- btVector3 contactPoint = cp.m_localPointA - car->getChildTransform(cp.m_index0).getOrigin();
+- if (-direction::up.dot(contactPoint) > 0.5 * wheel->getRadius())
++ const btCompoundShape* carshape = static_cast<const btCompoundShape*>(rootshape);
++ const btCylinderShapeX* wheelshape = static_cast<const btCylinderShapeX*>(shape);
++ btVector3 contactPoint = cp.m_localPointA - carshape->getChildTransform(cp.m_index0).getOrigin();
++ if (-direction::up.dot(contactPoint) > 0.5 * wheelshape->getRadius())
+ {
+ // break contact (hack)
+ cp.m_normalWorldOnB = btVector3(0, 0, 0);
+--- src/cardynamics.h Mon Jan 19 23:26:36 1970
++++ src/cardynamics.h Mon Jan 19 23:26:36 1970
+@@ -25,6 +25,12 @@
+ class FractureBody;
+ class PTree;
+
++#if (BT_BULLET_VERSION < 281)
++#define btCollisionObjectWrapper btCollisionObject
++#else
++struct btCollisionObjectWrapper;
++#endif
++
+ class CARDYNAMICS : public btActionInterface
+ {
+ friend class PERFORMANCE_TESTING;
+@@ -151,11 +157,11 @@
+
+ static bool WheelContactCallback(
+ btManifoldPoint& cp,
+- const btCollisionObject* colObj0,
+- int partId0,
++ const btCollisionObjectWrapper* col0,
++ int part0,
+ int index0,
+- const btCollisionObject* colObj1,
+- int partId1,
++ const btCollisionObjectWrapper* col1,
++ int part1,
+ int index1);
+
+ protected:
+--- src/dynamicsworld.cpp Mon Jan 19 23:26:36 1970
++++ src/dynamicsworld.cpp Mon Jan 19 23:26:36 1970
+@@ -105,7 +105,7 @@
+ int patch_id = -1;
+ const BEZIER * b = 0;
+ const TRACKSURFACE * s = TRACKSURFACE::None();
+- btCollisionObject * c = 0;
++ const btCollisionObject * c = 0;
+
+ MyRayResultCallback ray(origin, p, caster);
+ rayTest(origin, p, ray);
+@@ -221,6 +221,7 @@
+
+ void DynamicsWorld::fractureCallback()
+ {
++#if (BT_BULLET_VERSION < 281)
+ m_activeConnections.resize(0);
+
+ int numManifolds = getDispatcher()->getNumManifolds();
+@@ -268,4 +269,5 @@
+ btRigidBody* child = body->updateConnection(con_id);
+ if (child) addRigidBody(child);
+ }
++#endif
+ } \ No newline at end of file
diff --git a/games-sports/vdrift/vdrift-20120722.ebuild b/games-sports/vdrift/vdrift-20120722.ebuild
index c31d3347ec1b..0ed158abeac4 100644
--- a/games-sports/vdrift/vdrift-20120722.ebuild
+++ b/games-sports/vdrift/vdrift-20120722.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-sports/vdrift/vdrift-20120722.ebuild,v 1.1 2014/09/01 00:20:19 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-sports/vdrift/vdrift-20120722.ebuild,v 1.2 2014/09/01 01:00:55 mr_bones_ Exp $
EAPI=5
inherit eutils scons-utils games
@@ -11,7 +11,7 @@ HOMEPAGE="http://vdrift.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2
mirror://sourceforge/${PN}/${MY_P}c_patch.diff"
-LICENSE="GPL-3 ZLIB"
+LICENSE="GPL-3 ZLIB LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
@@ -40,7 +40,8 @@ src_unpack() {
src_prepare() {
epatch \
"${DISTDIR}"/${MY_P}c_patch.diff \
- "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-build.patch \
+ "${FILESDIR}"/${P}-bullet.patch
}
src_compile() {