diff options
author | Sam James <sam@gentoo.org> | 2021-06-15 02:02:15 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-06-15 02:31:15 +0000 |
commit | ab67174af2b5e8df126b8ee72b05a014977c019c (patch) | |
tree | 0efa1be4a10e162785f8d35d8a14b359a189a4a7 /games-emulation | |
parent | sys-process/tini: drop 0.18.0, 0.19.0 (diff) | |
download | gentoo-ab67174af2b5e8df126b8ee72b05a014977c019c.tar.gz gentoo-ab67174af2b5e8df126b8ee72b05a014977c019c.tar.bz2 gentoo-ab67174af2b5e8df126b8ee72b05a014977c019c.zip |
games-emulation/libretro-snes9x: fix build with GCC 11
Closes: https://bugs.gentoo.org/787116
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r-- | games-emulation/libretro-snes9x/files/libretro-snes9x-0.0.2_pre20200107-gcc11-const.patch | 52 | ||||
-rw-r--r-- | games-emulation/libretro-snes9x/libretro-snes9x-0.0.2_pre20200107.ebuild | 10 |
2 files changed, 61 insertions, 1 deletions
diff --git a/games-emulation/libretro-snes9x/files/libretro-snes9x-0.0.2_pre20200107-gcc11-const.patch b/games-emulation/libretro-snes9x/files/libretro-snes9x-0.0.2_pre20200107-gcc11-const.patch new file mode 100644 index 000000000000..2fce97d6434c --- /dev/null +++ b/games-emulation/libretro-snes9x/files/libretro-snes9x-0.0.2_pre20200107-gcc11-const.patch @@ -0,0 +1,52 @@ +https://bugs.gentoo.org/787116 +https://github.com/libretro/snes9x/commit/da1fc9a69d8fc776f1b13b080bc27cf329c52a1f + +From da1fc9a69d8fc776f1b13b080bc27cf329c52a1f Mon Sep 17 00:00:00 2001 +From: Alberto Fustinoni <alberto@aftnet.net> +Date: Thu, 10 Sep 2020 22:22:46 +0900 +Subject: [PATCH] Build fix + +--- + conffile.cpp | 2 +- + conffile.h | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/conffile.cpp b/conffile.cpp +index 817afae7f..5e121e2cc 100644 +--- a/conffile.cpp ++++ b/conffile.cpp +@@ -452,7 +452,7 @@ void ConfigFile::ClearLines() + } + } + +-bool ConfigFile::ConfigEntry::section_then_key_less::operator()(const ConfigEntry &a, const ConfigEntry &b) { ++bool ConfigFile::ConfigEntry::section_then_key_less::operator()(const ConfigEntry &a, const ConfigEntry &b) const { + if(curConfigFile && a.section!=b.section){ + const int sva = curConfigFile->GetSectionSize(a.section); + const int svb = curConfigFile->GetSectionSize(b.section); +diff --git a/conffile.h b/conffile.h +index ba69812df..c09cea362 100644 +--- a/conffile.h ++++ b/conffile.h +@@ -90,18 +90,18 @@ class ConfigFile { + mutable bool used; + + struct section_then_key_less { +- bool operator()(const ConfigEntry &a, const ConfigEntry &b); ++ bool operator()(const ConfigEntry &a, const ConfigEntry &b) const; + }; + + struct key_less { +- bool operator()(const ConfigEntry &a, const ConfigEntry &b) const{ ++ bool operator()(const ConfigEntry &a, const ConfigEntry &b) const { + if(a.section!=b.section) return a.section<b.section; + return a.key<b.key; + } + }; + + struct line_less { +- bool operator()(const ConfigEntry &a, const ConfigEntry &b){ ++ bool operator()(const ConfigEntry &a, const ConfigEntry &b) const { + if(a.line==b.line) return (b.val.empty() && !a.val.empty()) || a.key<b.key; + if(b.line<0) return true; + if(a.line<0) return false; diff --git a/games-emulation/libretro-snes9x/libretro-snes9x-0.0.2_pre20200107.ebuild b/games-emulation/libretro-snes9x/libretro-snes9x-0.0.2_pre20200107.ebuild index e96b4cd5b53b..80a05e3fd38d 100644 --- a/games-emulation/libretro-snes9x/libretro-snes9x-0.0.2_pre20200107.ebuild +++ b/games-emulation/libretro-snes9x/libretro-snes9x-0.0.2_pre20200107.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 @@ -15,3 +15,11 @@ DESCRIPTION="Snes9x libretro port" LICENSE="Snes9x GPL-2 GPL-2+ LGPL-2.1 LGPL-2.1+ ISC MIT ZLIB Info-ZIP" RESTRICT="bindist" SLOT="0" + +src_prepare() { + cd .. || die + eapply "${FILESDIR}"/${PN}-0.0.2_pre20200107-gcc11-const.patch + cd "${S}" || die + + libretro-core_src_prepare +} |