From 865ac5a7cac7b902a831fd2bdd72daeedf8e8b69 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 6 May 2021 01:01:47 +0000 Subject: [PATCH 2/2] dev-games/openscenegraph-openmw: fix build with gcc 11 Closes: https://bugs.gentoo.org/788301 Signed-off-by: Alexey Sokolov --- .../files/openscenegraph-3.4-gcc11.patch | 26 +++++++++++++++++++ ...cenegraph-openmw-3.4_p20200425-r100.ebuild | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 dev-games/openscenegraph-openmw/files/openscenegraph-3.4-gcc11.patch diff --git a/dev-games/openscenegraph-openmw/files/openscenegraph-3.4-gcc11.patch b/dev-games/openscenegraph-openmw/files/openscenegraph-3.4-gcc11.patch new file mode 100644 index 0000000000..2cbd9c2dcc --- /dev/null +++ b/dev-games/openscenegraph-openmw/files/openscenegraph-3.4-gcc11.patch @@ -0,0 +1,26 @@ +diff --git a/include/osgDB/ObjectCache b/include/osgDB/ObjectCache +index 01b3f05..0d8b5be 100644 +--- a/include/osgDB/ObjectCache ++++ b/include/osgDB/ObjectCache +@@ -72,7 +72,7 @@ class OSGDB_EXPORT ObjectCache : public osg::Referenced + + class ClassComp { + public: +- bool operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs); ++ bool operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs) const; + }; + + typedef std::pair, double > ObjectTimeStampPair; +diff --git a/src/osgDB/ObjectCache.cpp b/src/osgDB/ObjectCache.cpp +index 11ca07c..740aa2e 100644 +--- a/src/osgDB/ObjectCache.cpp ++++ b/src/osgDB/ObjectCache.cpp +@@ -16,7 +16,7 @@ + + using namespace osgDB; + +-bool ObjectCache::ClassComp::operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs) ++bool ObjectCache::ClassComp::operator() (const ObjectCache::FileNameOptionsPair& lhs, const ObjectCache::FileNameOptionsPair& rhs) const + { + // check if filename are the same + if (lhs.first < rhs.first) return true; diff --git a/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.4_p20200425-r100.ebuild b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.4_p20200425-r100.ebuild index 202f18429a..08efaabece 100644 --- a/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.4_p20200425-r100.ebuild +++ b/dev-games/openscenegraph-openmw/openscenegraph-openmw-3.4_p20200425-r100.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -87,6 +87,7 @@ PATCHES=( "${FILESDIR}"/openscenegraph-3.4-cmake.patch "${FILESDIR}"/openscenegraph-3.5.1-jpeg-9.patch "${FILESDIR}"/openscenegraph-3.6.3-docdir.patch + "${FILESDIR}"/openscenegraph-3.4-gcc11.patch ) pkg_setup() { -- 2.31.1