Skip to content

Commit

Permalink
games-engines/openmw: version bump - 0.46.0
Browse files Browse the repository at this point in the history
Add option to use forked OSG

Fix build on ~arch, fix tests on i686, fix installation on Prefix

Closes: https://bugs.gentoo.org/673864
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alexey Sokolov <[email protected]>
Closes: gentoo#16000
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
DarthGandalf authored and juippis committed Jul 8, 2020
1 parent 70236cb commit 82798ae
Show file tree
Hide file tree
Showing 10 changed files with 933 additions and 11 deletions.
2 changes: 2 additions & 0 deletions games-engines/openmw/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
DIST openmw-0.45.0.tar.gz 4711103 BLAKE2B 85676294b07170dd6845892e9e7b354c5767428584c76ea2e1a64e9f9c72c46c279fdf5043058d37b927cb55e6cf2e2222833129d64954cdcdb3af4eb4b84dc3 SHA512 b968426659457cf486f6756f7ab82cc4cb34a92923c433dd86f711e5d7097f75441ed17daa50d21f15f1847f5aed1f4c3a094a06cfd3f2e9b90aa182742c596f
DIST openmw-0.46.0-floattest.patch 43168 BLAKE2B 060b529fd4cd01f0fc723bb5a00a256b9c1ae4413c7b22581467cce75416e01041c3af22f0215ad9b1c475965a988065e0860c01c1e71d97454b022eec4779ea SHA512 0e165417e9ae047231fdc27b62251b33867f3782c1753f81705c886d6d3a433c8bbc3b4653a2555bc644bad11db9769d4bc2abcc84ca3ab23fabb6b80347bc32
DIST openmw-0.46.0.tar.gz 5155004 BLAKE2B 8ad94a7fffe5a0739c56c778efe2ec17ef66c312a7fe5caf015cf3cad2bc17d2abe8cdc3f4134049a32fe55c4f4b3f72678d2d0ce1037fd02f6ac753b9d89b2c SHA512 da384aead300552817c0d0ce03515a5ccc95dcab4e02d4c1dd0d6c5f1b01ee01209bbaea74e2d12021e3465e49b051823bb018de39675c5a22c6892893624486
214 changes: 214 additions & 0 deletions games-engines/openmw/files/openmw-0.46.0-fix-cast.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
Fixes build on ~arch system, patch from upstream, to be dropped for 0.47

From 208a50340db5506dded60c05272ce9692773baa9 Mon Sep 17 00:00:00 2001
From: elsid <[email protected]>
Date: Mon, 13 Apr 2020 20:45:07 +0200
Subject: [PATCH] Specialize DetourNavigator::ObjectId ctor for pointers

To fix msvc error:
components\detournavigator\objectid.hpp(14,13): error C2440: 'reinterpret_cast': cannot convert from 'const T' to 'size_t'
with
[
T=unsigned long
]
diff --git a/apps/openmw_test_suite/detournavigator/tilecachedrecastmeshmanager.cpp b/apps/openmw_test_suite/detournavigator/tilecachedrecastmeshmanager.cpp
index 5275d9119e..e44ae48786 100644
--- a/apps/openmw_test_suite/detournavigator/tilecachedrecastmeshmanager.cpp
+++ b/apps/openmw_test_suite/detournavigator/tilecachedrecastmeshmanager.cpp
@@ -61,15 +61,15 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- EXPECT_TRUE(manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground));
+ EXPECT_TRUE(manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground));
}

TEST_F(DetourNavigatorTileCachedRecastMeshManagerTest, add_object_for_existing_object_should_return_false)
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
- EXPECT_FALSE(manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground));
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ EXPECT_FALSE(manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground));
}

TEST_F(DetourNavigatorTileCachedRecastMeshManagerTest, update_object_for_changed_object_should_return_changed_tiles)
@@ -77,9 +77,9 @@ namespace
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(getTileSize(mSettings) / mSettings.mRecastScaleFactor, 0, 0));
- manager.addObject(ObjectId(1ul), boxShape, transform, AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, transform, AreaType::AreaType_ground);
EXPECT_THAT(
- manager.updateObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground),
+ manager.updateObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground),
ElementsAre(TilePosition(-1, -1), TilePosition(-1, 0), TilePosition(0, -1), TilePosition(0, 0),
TilePosition(1, -1), TilePosition(1, 0))
);
@@ -89,9 +89,9 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_EQ(
- manager.updateObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground),
+ manager.updateObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground),
std::vector<TilePosition>()
);
}
@@ -100,7 +100,7 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_NE(manager.getMesh(TilePosition(-1, -1)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(-1, 0)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(0, -1)), nullptr);
@@ -111,7 +111,7 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_EQ(manager.getMesh(TilePosition(1, 0)), nullptr);
}

@@ -121,13 +121,13 @@ namespace
const btBoxShape boxShape(btVector3(20, 20, 100));
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(getTileSize(mSettings) / mSettings.mRecastScaleFactor, 0, 0));

- manager.addObject(ObjectId(1ul), boxShape, transform, AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, transform, AreaType::AreaType_ground);
EXPECT_NE(manager.getMesh(TilePosition(0, -1)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(0, 0)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(1, 0)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(1, -1)), nullptr);

- manager.updateObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.updateObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_NE(manager.getMesh(TilePosition(-1, -1)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(-1, 0)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(0, -1)), nullptr);
@@ -140,11 +140,11 @@ namespace
const btBoxShape boxShape(btVector3(20, 20, 100));
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(getTileSize(mSettings) / mSettings.mRecastScaleFactor, 0, 0));

- manager.addObject(ObjectId(1ul), boxShape, transform, AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, transform, AreaType::AreaType_ground);
EXPECT_EQ(manager.getMesh(TilePosition(-1, -1)), nullptr);
EXPECT_EQ(manager.getMesh(TilePosition(-1, 0)), nullptr);

- manager.updateObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.updateObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_EQ(manager.getMesh(TilePosition(1, 0)), nullptr);
EXPECT_EQ(manager.getMesh(TilePosition(1, -1)), nullptr);
}
@@ -153,8 +153,8 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
- manager.removeObject(ObjectId(1ul));
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.removeObject(ObjectId(&boxShape));
EXPECT_EQ(manager.getMesh(TilePosition(-1, -1)), nullptr);
EXPECT_EQ(manager.getMesh(TilePosition(-1, 0)), nullptr);
EXPECT_EQ(manager.getMesh(TilePosition(0, -1)), nullptr);
@@ -166,13 +166,13 @@ namespace
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));

- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_NE(manager.getMesh(TilePosition(-1, -1)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(-1, 0)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(0, -1)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(0, 0)), nullptr);

- manager.updateObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.updateObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_NE(manager.getMesh(TilePosition(-1, -1)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(-1, 0)), nullptr);
EXPECT_NE(manager.getMesh(TilePosition(0, -1)), nullptr);
@@ -184,7 +184,7 @@ namespace
TileCachedRecastMeshManager manager(mSettings);
const auto initialRevision = manager.getRevision();
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_EQ(manager.getRevision(), initialRevision + 1);
}

@@ -192,9 +192,9 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
const auto beforeAddRevision = manager.getRevision();
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_EQ(manager.getRevision(), beforeAddRevision);
}

@@ -203,9 +203,9 @@ namespace
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
const btTransform transform(btMatrix3x3::getIdentity(), btVector3(getTileSize(mSettings) / mSettings.mRecastScaleFactor, 0, 0));
- manager.addObject(ObjectId(1ul), boxShape, transform, AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, transform, AreaType::AreaType_ground);
const auto beforeUpdateRevision = manager.getRevision();
- manager.updateObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.updateObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_EQ(manager.getRevision(), beforeUpdateRevision + 1);
}

@@ -213,9 +213,9 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
const auto beforeUpdateRevision = manager.getRevision();
- manager.updateObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.updateObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
EXPECT_EQ(manager.getRevision(), beforeUpdateRevision);
}

@@ -223,9 +223,9 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const btBoxShape boxShape(btVector3(20, 20, 100));
- manager.addObject(ObjectId(1ul), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
+ manager.addObject(ObjectId(&boxShape), boxShape, btTransform::getIdentity(), AreaType::AreaType_ground);
const auto beforeRemoveRevision = manager.getRevision();
- manager.removeObject(ObjectId(1ul));
+ manager.removeObject(ObjectId(&boxShape));
EXPECT_EQ(manager.getRevision(), beforeRemoveRevision + 1);
}

@@ -233,7 +233,7 @@ namespace
{
TileCachedRecastMeshManager manager(mSettings);
const auto beforeRemoveRevision = manager.getRevision();
- manager.removeObject(ObjectId(1ul));
+ manager.removeObject(ObjectId(&manager));
EXPECT_EQ(manager.getRevision(), beforeRemoveRevision);
}
}
diff --git a/components/detournavigator/objectid.hpp b/components/detournavigator/objectid.hpp
index 3b56924b13..6ddcc9169d 100644
--- a/components/detournavigator/objectid.hpp
+++ b/components/detournavigator/objectid.hpp
@@ -10,7 +10,7 @@ namespace DetourNavigator
{
public:
template <class T>
- explicit ObjectId(const T value) throw()
+ explicit ObjectId(T* value) throw()
: mValue(reinterpret_cast<std::size_t>(value))
{
}
Loading

0 comments on commit 82798ae

Please sign in to comment.