commit 7cca506e2c800927ee67a0803085b696430996b0
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Thu Apr 20 19:04:46 2017 +0100
Add another upstream patch, potential fix for compile failure on ppc64le / SDL2.
38deb5b1cfdce8b86a49c71cd7ce34a8fafd3884.patch | 129 +++++++++++++++++++++++++
stella.spec | 3 +
2 files changed, 132 insertions(+)
---
diff --git a/38deb5b1cfdce8b86a49c71cd7ce34a8fafd3884.patch
b/38deb5b1cfdce8b86a49c71cd7ce34a8fafd3884.patch
new file mode 100644
index 0000000..0b11409
--- /dev/null
+++ b/38deb5b1cfdce8b86a49c71cd7ce34a8fafd3884.patch
@@ -0,0 +1,129 @@
+From 38deb5b1cfdce8b86a49c71cd7ce34a8fafd3884 Mon Sep 17 00:00:00 2001
+From: Stephen Anthony <sa666666(a)gmail.com>
+Date: Thu, 20 Apr 2017 15:21:55 -0230
+Subject: [PATCH] Potential fix for compile failure on ppc64le / SDL2.
+
+---
+ src/common/EventHandlerSDL2.hxx | 2 +-
+ src/common/FrameBufferSDL2.cxx | 2 +-
+ src/common/FrameBufferSDL2.hxx | 2 +-
+ src/common/SDL_lib.hxx | 24 ++++++++++++++++++++++++
+ src/common/SoundSDL2.cxx | 2 +-
+ src/common/SoundSDL2.hxx | 2 +-
+ src/common/StellaKeys.hxx | 2 +-
+ 7 files changed, 30 insertions(+), 6 deletions(-)
+ create mode 100644 src/common/SDL_lib.hxx
+
+diff --git a/src/common/EventHandlerSDL2.hxx b/src/common/EventHandlerSDL2.hxx
+index 8ecc6f9..591d878 100644
+--- a/src/common/EventHandlerSDL2.hxx
++++ b/src/common/EventHandlerSDL2.hxx
+@@ -18,7 +18,7 @@
+ #ifndef EVENTHANDLER_SDL2_HXX
+ #define EVENTHANDLER_SDL2_HXX
+
+-#include <SDL.h>
++#include "SDL_lib.hxx"
+ #include "EventHandler.hxx"
+
+ /**
+diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx
+index ce50172..4880d67 100644
+--- a/src/common/FrameBufferSDL2.cxx
++++ b/src/common/FrameBufferSDL2.cxx
+@@ -15,11 +15,11 @@
+ // this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ //============================================================================
+
+-#include <SDL.h>
+ #include <sstream>
+ #include <time.h>
+ #include <fstream>
+
++#include "SDL_lib.hxx"
+ #include "bspf.hxx"
+
+ #include "Console.hxx"
+diff --git a/src/common/FrameBufferSDL2.hxx b/src/common/FrameBufferSDL2.hxx
+index 7bed5bc..d06cb24 100644
+--- a/src/common/FrameBufferSDL2.hxx
++++ b/src/common/FrameBufferSDL2.hxx
+@@ -18,7 +18,7 @@
+ #ifndef FRAMEBUFFER_SDL2_HXX
+ #define FRAMEBUFFER_SDL2_HXX
+
+-#include <SDL.h>
++#include "SDL_lib.hxx"
+
+ class OSystem;
+ class FBSurfaceSDL2;
+diff --git a/src/common/SDL_lib.hxx b/src/common/SDL_lib.hxx
+new file mode 100644
+index 0000000..2981dfb
+--- /dev/null
++++ b/src/common/SDL_lib.hxx
+@@ -0,0 +1,24 @@
++//============================================================================
++//
++// SSSS tt lll lll
++// SS SS tt ll ll
++// SS tttttt eeee ll ll aaaa
++// SSSS tt ee ee ll ll aa
++// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
++// SS SS tt ee ll ll aa aa
++// SSSS ttt eeeee llll llll aaaaa
++//
++// Copyright (c) 1995-2017 by Bradford W. Mott, Stephen Anthony
++// and the Stella Team
++//
++// See the file "License.txt" for information on usage and redistribution of
++// this file, and for a DISCLAIMER OF ALL WARRANTIES.
++//============================================================================
++
++#ifndef SDL_LIB_HXX
++#define SDL_LIB_HXX
++
++#include <SDL.h>
++#undef bool // Seems to be needed for ppc64le, doesn't hurt other archs
++
++#endif
+diff --git a/src/common/SoundSDL2.cxx b/src/common/SoundSDL2.cxx
+index 7658d81..439f73b 100644
+--- a/src/common/SoundSDL2.cxx
++++ b/src/common/SoundSDL2.cxx
+@@ -20,8 +20,8 @@
+ #include <sstream>
+ #include <cassert>
+ #include <cmath>
+-#include <SDL.h>
+
++#include "SDL_lib.hxx"
+ #include "TIASnd.hxx"
+ #include "TIATypes.hxx"
+ #include "FrameBuffer.hxx"
+diff --git a/src/common/SoundSDL2.hxx b/src/common/SoundSDL2.hxx
+index 6d62785..5d186a5 100644
+--- a/src/common/SoundSDL2.hxx
++++ b/src/common/SoundSDL2.hxx
+@@ -22,7 +22,7 @@
+
+ class OSystem;
+
+-#include <SDL.h>
++#include "SDL_lib.hxx"
+
+ #include "bspf.hxx"
+ #include "TIASnd.hxx"
+diff --git a/src/common/StellaKeys.hxx b/src/common/StellaKeys.hxx
+index efe2349..b9e6dc9 100644
+--- a/src/common/StellaKeys.hxx
++++ b/src/common/StellaKeys.hxx
+@@ -18,7 +18,7 @@
+ #ifndef STELLA_KEYS_HXX
+ #define STELLA_KEYS_HXX
+
+-#include <SDL.h>
++#include "SDL_lib.hxx"
+
+ /**
+ This class implements a thin wrapper around the SDL keysym enumerations,
diff --git a/stella.spec b/stella.spec
index cb3e9a2..550f217 100644
--- a/stella.spec
+++ b/stella.spec
@@ -8,6 +8,7 @@ URL:
https://stella-emu.github.io/
Source0:
https://github.com/stella-emu/%{name}/releases/download/release-%{version...
Patch0: %{name}-4.7.3-gcc7.patch
Patch1: 1dd8c04f6813779e509fa7427b06bbc47d408329.patch
+Patch2: 38deb5b1cfdce8b86a49c71cd7ce34a8fafd3884.patch
BuildRequires: libpng-devel zlib-devel bison SDL2-devel
BuildRequires: desktop-file-utils
@@ -33,6 +34,7 @@ by considering a contribution.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch1 -p2
rm -rf src/zlib src/libpng
sed -i "s/-c -s -m/-m/" Makefile
@@ -85,6 +87,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
- Updated URL and Source0
- Add upstream patch (
https://github.com/stella-emu/stella/issues/117) try fix
aarch64 detection.
+- Add another upstream patch, potential fix for compile failure on ppc64le / SDL2.
* Mon Mar 20 2017 RPM Fusion Release Engineering <kwizart(a)rpmfusion.org> - 4.7.3-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild