diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2015-09-03 14:25:21 -0400 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2015-09-03 14:25:35 -0400 |
commit | 7442516a9e82c154de48ff3812fa58d5f632217e (patch) | |
tree | f21b1a10416d1c43d5e9e84c40d3dcf50a4b33f6 /dev-games/ogre/files | |
parent | sci-mathematics/wxmaxima: version bump (diff) | |
download | gentoo-7442516a9e82c154de48ff3812fa58d5f632217e.tar.gz gentoo-7442516a9e82c154de48ff3812fa58d5f632217e.tar.bz2 gentoo-7442516a9e82c154de48ff3812fa58d5f632217e.zip |
fix building with gcc52 with patch from Sven Eden via bug #559472
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-games/ogre/files')
3 files changed, 67 insertions, 4 deletions
diff --git a/dev-games/ogre/files/ogre-1.9.0-gcc52.patch b/dev-games/ogre/files/ogre-1.9.0-gcc52.patch new file mode 100644 index 000000000000..030368de29e3 --- /dev/null +++ b/dev-games/ogre/files/ogre-1.9.0-gcc52.patch @@ -0,0 +1,63 @@ +--- a/OgreMain/include/OgreProgressiveMeshGenerator.h ++++ b/OgreMain/include/OgreProgressiveMeshGenerator.h +@@ -215,7 +215,40 @@ + void tuneContainerSize(); + void addVertexData(VertexData* vertexData, bool useSharedVertexLookup); + template<typename IndexType> +- void addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, VertexLookupList& lookup, unsigned short submeshID); ++ void addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, VertexLookupList& lookup, unsigned short submeshID) ++ { ++ ++ // Loop through all triangles and connect them to the vertices. ++ for (; iPos < iEnd; iPos += 3) { ++ // It should never reallocate or every pointer will be invalid. ++ OgreAssert(mTriangleList.capacity() > mTriangleList.size(), ""); ++ mTriangleList.push_back(PMTriangle()); ++ PMTriangle* tri = &mTriangleList.back(); ++ tri->isRemoved = false; ++ tri->submeshID = submeshID; ++ for (int i = 0; i < 3; i++) { ++ // Invalid index: Index is bigger then vertex buffer size. ++ OgreAssert(iPos[i] < lookup.size(), ""); ++ tri->vertexID[i] = iPos[i]; ++ tri->vertex[i] = lookup[iPos[i]]; ++ } ++ if (tri->isMalformed()) { ++#if OGRE_DEBUG_MODE ++ stringstream str; ++ str << "In " << mMeshName << " malformed triangle found with ID: " << getTriangleID(tri) << ". " << ++ std::endl; ++ printTriangle(tri, str); ++ str << "It will be excluded from LOD level calculations."; ++ LogManager::getSingleton().stream() << str.str(); ++#endif ++ tri->isRemoved = true; ++ mIndexBufferInfoList[tri->submeshID].indexCount -= 3; ++ continue; ++ } ++ tri->computeNormal(); ++ addTriangleToEdges(tri); ++ } ++ } + void addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID); + + void computeCosts(); +--- a/OgreMain/src/OgreProgressiveMeshGenerator.cpp ++++ b/OgreMain/src/OgreProgressiveMeshGenerator.cpp +@@ -219,6 +219,8 @@ + } + vbuf->unlock(); + } ++/// Called from OgreQueuedProgressiveMeshGenerator.cpp, so it can not be defined in here. ++#if 0 + template<typename IndexType> + void ProgressiveMeshGenerator::addIndexDataImpl(IndexType* iPos, const IndexType* iEnd, + VertexLookupList& lookup, +@@ -256,6 +258,7 @@ + addTriangleToEdges(tri); + } + } ++#endif // 0 + + void ProgressiveMeshGenerator::addIndexData(IndexData* indexData, bool useSharedVertexLookup, unsigned short submeshID) + { diff --git a/dev-games/ogre/files/ogre-1.9.0-remove_media_path_to_bindir.patch b/dev-games/ogre/files/ogre-1.9.0-remove_media_path_to_bindir.patch index 9af7685c7d77..bb2ca551dbe4 100644 --- a/dev-games/ogre/files/ogre-1.9.0-remove_media_path_to_bindir.patch +++ b/dev-games/ogre/files/ogre-1.9.0-remove_media_path_to_bindir.patch @@ -1,5 +1,5 @@ ---- a/CMake/InstallResources.cmake 2014-10-29 12:43:49.000000000 +0100 -+++ b/CMake/InstallResources.cmake 2014-10-29 12:46:10.017611431 +0100 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake @@ -178,10 +178,6 @@ # CREATE CONFIG FILES - BUILD DIR VERSIONS diff --git a/dev-games/ogre/files/ogre-1.9.0-remove_resource_path_to_bindir.patch b/dev-games/ogre/files/ogre-1.9.0-remove_resource_path_to_bindir.patch index d73762859081..a26aa3f447bd 100644 --- a/dev-games/ogre/files/ogre-1.9.0-remove_resource_path_to_bindir.patch +++ b/dev-games/ogre/files/ogre-1.9.0-remove_resource_path_to_bindir.patch @@ -1,5 +1,5 @@ ---- a/CMake/InstallResources.cmake 2013-12-01 18:28:12.000000000 +0100 -+++ b/CMake/InstallResources.cmake 2014-10-29 12:38:29.963602465 +0100 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake @@ -201,11 +201,6 @@ set(OGRE_PLUGIN_DIR_DBG "") set(OGRE_SAMPLES_DIR_REL "") |