1 |
commit: ab67174af2b5e8df126b8ee72b05a014977c019c |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 15 02:02:15 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 15 02:31:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab67174a |
7 |
|
8 |
games-emulation/libretro-snes9x: fix build with GCC 11 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/787116 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
...etro-snes9x-0.0.2_pre20200107-gcc11-const.patch | 52 ++++++++++++++++++++++ |
14 |
.../libretro-snes9x-0.0.2_pre20200107.ebuild | 10 ++++- |
15 |
2 files changed, 61 insertions(+), 1 deletion(-) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..2fce97d6434 |
20 |
--- /dev/null |
21 |
+++ b/games-emulation/libretro-snes9x/files/libretro-snes9x-0.0.2_pre20200107-gcc11-const.patch |
22 |
@@ -0,0 +1,52 @@ |
23 |
+https://bugs.gentoo.org/787116 |
24 |
+https://github.com/libretro/snes9x/commit/da1fc9a69d8fc776f1b13b080bc27cf329c52a1f |
25 |
+ |
26 |
+From da1fc9a69d8fc776f1b13b080bc27cf329c52a1f Mon Sep 17 00:00:00 2001 |
27 |
+From: Alberto Fustinoni <alberto@××××××.net> |
28 |
+Date: Thu, 10 Sep 2020 22:22:46 +0900 |
29 |
+Subject: [PATCH] Build fix |
30 |
+ |
31 |
+--- |
32 |
+ conffile.cpp | 2 +- |
33 |
+ conffile.h | 6 +++--- |
34 |
+ 2 files changed, 4 insertions(+), 4 deletions(-) |
35 |
+ |
36 |
+diff --git a/conffile.cpp b/conffile.cpp |
37 |
+index 817afae7f..5e121e2cc 100644 |
38 |
+--- a/conffile.cpp |
39 |
++++ b/conffile.cpp |
40 |
+@@ -452,7 +452,7 @@ void ConfigFile::ClearLines() |
41 |
+ } |
42 |
+ } |
43 |
+ |
44 |
+-bool ConfigFile::ConfigEntry::section_then_key_less::operator()(const ConfigEntry &a, const ConfigEntry &b) { |
45 |
++bool ConfigFile::ConfigEntry::section_then_key_less::operator()(const ConfigEntry &a, const ConfigEntry &b) const { |
46 |
+ if(curConfigFile && a.section!=b.section){ |
47 |
+ const int sva = curConfigFile->GetSectionSize(a.section); |
48 |
+ const int svb = curConfigFile->GetSectionSize(b.section); |
49 |
+diff --git a/conffile.h b/conffile.h |
50 |
+index ba69812df..c09cea362 100644 |
51 |
+--- a/conffile.h |
52 |
++++ b/conffile.h |
53 |
+@@ -90,18 +90,18 @@ class ConfigFile { |
54 |
+ mutable bool used; |
55 |
+ |
56 |
+ struct section_then_key_less { |
57 |
+- bool operator()(const ConfigEntry &a, const ConfigEntry &b); |
58 |
++ bool operator()(const ConfigEntry &a, const ConfigEntry &b) const; |
59 |
+ }; |
60 |
+ |
61 |
+ struct key_less { |
62 |
+- bool operator()(const ConfigEntry &a, const ConfigEntry &b) const{ |
63 |
++ bool operator()(const ConfigEntry &a, const ConfigEntry &b) const { |
64 |
+ if(a.section!=b.section) return a.section<b.section; |
65 |
+ return a.key<b.key; |
66 |
+ } |
67 |
+ }; |
68 |
+ |
69 |
+ struct line_less { |
70 |
+- bool operator()(const ConfigEntry &a, const ConfigEntry &b){ |
71 |
++ bool operator()(const ConfigEntry &a, const ConfigEntry &b) const { |
72 |
+ if(a.line==b.line) return (b.val.empty() && !a.val.empty()) || a.key<b.key; |
73 |
+ if(b.line<0) return true; |
74 |
+ if(a.line<0) return false; |
75 |
|
76 |
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 |
77 |
index e96b4cd5b53..80a05e3fd38 100644 |
78 |
--- a/games-emulation/libretro-snes9x/libretro-snes9x-0.0.2_pre20200107.ebuild |
79 |
+++ b/games-emulation/libretro-snes9x/libretro-snes9x-0.0.2_pre20200107.ebuild |
80 |
@@ -1,4 +1,4 @@ |
81 |
-# Copyright 1999-2020 Gentoo Authors |
82 |
+# Copyright 1999-2021 Gentoo Authors |
83 |
# Distributed under the terms of the GNU General Public License v2 |
84 |
|
85 |
EAPI=7 |
86 |
@@ -15,3 +15,11 @@ DESCRIPTION="Snes9x libretro port" |
87 |
LICENSE="Snes9x GPL-2 GPL-2+ LGPL-2.1 LGPL-2.1+ ISC MIT ZLIB Info-ZIP" |
88 |
RESTRICT="bindist" |
89 |
SLOT="0" |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ cd .. || die |
93 |
+ eapply "${FILESDIR}"/${PN}-0.0.2_pre20200107-gcc11-const.patch |
94 |
+ cd "${S}" || die |
95 |
+ |
96 |
+ libretro-core_src_prepare |
97 |
+} |