commit 62dd26b1a8c162cf6ed320b0e8e1d4f8eae2300c
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sun May 16 15:46:11 2021 +0200
Add an upstream patch to fix FTBFS for gcc-11
snes9x-1.60-gcc11.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
snes9x.spec | 16 +++++++++-------
2 files changed, 56 insertions(+), 7 deletions(-)
---
diff --git a/snes9x-1.60-gcc11.patch b/snes9x-1.60-gcc11.patch
new file mode 100644
index 0000000..453771f
--- /dev/null
+++ b/snes9x-1.60-gcc11.patch
@@ -0,0 +1,47 @@
+From 7f6d9d6432d912cd90763c64f7c92270b3e6c182 Mon Sep 17 00:00:00 2001
+From: gocha <gochaism(a)gmail.com>
+Date: Sun, 19 Jan 2020 12:48:06 +0900
+Subject: [PATCH] win32: fix compilation error in vs2019
+
+---
+ conffile.cpp | 2 +-
+ conffile.h | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/conffile.cpp b/conffile.cpp
+index 817afae7f..fa7de3fa2 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..d92128cba 100644
+--- a/conffile.h
++++ b/conffile.h
+@@ -90,7 +90,7 @@ 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 {
+@@ -101,8 +101,8 @@ class ConfigFile {
+ };
+
+ struct line_less {
+- bool operator()(const ConfigEntry &a, const ConfigEntry &b){
+- if(a.line==b.line) return (b.val.empty() && !a.val.empty()) ||
a.key<b.key;
++ 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;
+ return a.line<b.line;
diff --git a/snes9x.spec b/snes9x.spec
index 00e3968..1ee1fdb 100644
--- a/snes9x.spec
+++ b/snes9x.spec
@@ -1,7 +1,7 @@
Summary: Super Nintendo Entertainment System emulator
Name: snes9x
Version: 1.60
-Release: 6%{?dist}
+Release: 7%{?dist}
License: Other
URL:
http://www.snes9x.com/
Source0:
https://github.com/snes9xgit/snes9x/archive/%{version}.tar.gz#/%{name}-%{...
@@ -12,6 +12,10 @@ Patch0: %{name}-1.56.1-unix_flags.patch
#
https://github.com/snes9xgit/snes9x/issues/530
#
https://github.com/snes9xgit/snes9x/commit/54a961d8ca57c5d81a5f2d4e274333...
Patch1: %{name}-1.60-soundsync.patch
+# Fix building with GCC 11
+#
https://github.com/snes9xgit/snes9x/issues/698
+#
https://github.com/snes9xgit/snes9x/commit/7f6d9d6432d912cd90763c64f7c922...
+Patch2: %{name}-1.60-gcc11.patch
BuildRequires: gcc-c++
BuildRequires: meson
@@ -57,18 +61,13 @@ This package contains a graphical user interface using GTK+.
%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
+%autosetup -p1
# Remove bundled libs
rm -rf unzip
%build
-export CFLAGS="%{optflags} -std=gnu++14"
-export CXXFLAGS="%{optflags} -std=gnu++14"
-
# Build GTK version
pushd gtk
%meson
@@ -126,6 +125,9 @@ appstream-util validate-relax --nonet
%{buildroot}%{_datadir}/metainfo/*.appdata
%changelog
+* Sun May 16 2021 Andrea Musuruane <musuruan(a)gmail.com> - 1.60-7
+- Add an upstream patch to fix FTBFS for gcc-11
+
* Sat Apr 17 2021 Andrea Musuruane <musuruan(a)gmail.com> - 1.60-6
- Fix FTBFS for gcc-11