commit e544737a0f8bfb0c8781842a3faecf0efd43e709
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sat Aug 10 11:06:04 2019 +0200
Fixed building with python3 scons
fceux-2.2.3-scons-python3.patch | 108 ++++++++++++++++++++++++++++++++++++++++
fceux.spec | 15 ++++--
2 files changed, 119 insertions(+), 4 deletions(-)
---
diff --git a/fceux-2.2.3-scons-python3.patch b/fceux-2.2.3-scons-python3.patch
new file mode 100644
index 0000000..d3be48d
--- /dev/null
+++ b/fceux-2.2.3-scons-python3.patch
@@ -0,0 +1,108 @@
+--- fceux-2.2.3/SConstruct.orig 2019-07-26 18:04:29.368573309 +0000
++++ fceux-2.2.3/SConstruct 2019-07-26 18:04:31.975265342 +0000
+@@ -46,30 +46,30 @@
+ # Default compiler flags:
+ env.Append(CCFLAGS = ['-Wall', '-Wno-write-strings',
'-Wno-sign-compare'])
+
+-if os.environ.has_key('PLATFORM'):
++if os.environ.get('PLATFORM'):
+ env.Replace(PLATFORM = os.environ['PLATFORM'])
+-if os.environ.has_key('CC'):
++if os.environ.get('CC'):
+ env.Replace(CC = os.environ['CC'])
+-if os.environ.has_key('CXX'):
++if os.environ.get('CXX'):
+ env.Replace(CXX = os.environ['CXX'])
+-if os.environ.has_key('WINDRES'):
++if os.environ.get('WINDRES'):
+ env.Replace(WINDRES = os.environ['WINDRES'])
+-if os.environ.has_key('CFLAGS'):
++if os.environ.get('CFLAGS'):
+ env.Append(CCFLAGS = os.environ['CFLAGS'].split())
+-if os.environ.has_key('CXXFLAGS'):
++if os.environ.get('CXXFLAGS'):
+ env.Append(CXXFLAGS = os.environ['CXXFLAGS'].split())
+-if os.environ.has_key('CPPFLAGS'):
++if os.environ.get('CPPFLAGS'):
+ env.Append(CPPFLAGS = os.environ['CPPFLAGS'].split())
+-if os.environ.has_key('LDFLAGS'):
++if os.environ.get('LDFLAGS'):
+ env.Append(LINKFLAGS = os.environ['LDFLAGS'].split())
+-if os.environ.has_key('PKG_CONFIG_PATH'):
++if os.environ.get('PKG_CONFIG_PATH'):
+ env['ENV']['PKG_CONFIG_PATH'] = os.environ['PKG_CONFIG_PATH']
+-if not os.environ.has_key('PKG_CONFIG_PATH') and env['PLATFORM'] ==
'darwin':
++if not os.environ.get('PKG_CONFIG_PATH') and env['PLATFORM'] ==
'darwin':
+ env['ENV']['PKG_CONFIG_PATH'] =
"/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig"
+-if os.environ.has_key('PKG_CONFIG_LIBDIR'):
++if os.environ.get('PKG_CONFIG_LIBDIR'):
+ env['ENV']['PKG_CONFIG_LIBDIR'] =
os.environ['PKG_CONFIG_LIBDIR']
+
+-print "platform: ", env['PLATFORM']
++print ("platform: ", env['PLATFORM'])
+
+ # compile with clang
+ if env['CLANG']:
+@@ -103,18 +103,18 @@
+ assert conf.CheckLibWithHeader('z', 'zlib.h', 'c',
'inflate;', 1), "please install: zlib"
+ if env['SDL2']:
+ if not conf.CheckLib('SDL2'):
+- print 'Did not find libSDL2 or SDL2.lib, exiting!'
++ print ('Did not find libSDL2 or SDL2.lib, exiting!')
+ Exit(1)
+ env.Append(CPPDEFINES=["_SDL2"])
+ env.ParseConfig('pkg-config sdl2 --cflags --libs')
+ else:
+ if not conf.CheckLib('SDL'):
+- print 'Did not find libSDL or SDL.lib, exiting!'
++ print ('Did not find libSDL or SDL.lib, exiting!')
+ Exit(1)
+ env.ParseConfig('sdl-config --cflags --libs')
+ if env['GTK']:
+ if not conf.CheckLib('gtk-x11-2.0'):
+- print 'Could not find libgtk-2.0, exiting!'
++ print ('Could not find libgtk-2.0, exiting!')
+ Exit(1)
+ # Add compiler and linker flags from pkg-config
+ config_string = 'pkg-config --cflags --libs gtk+-2.0'
+@@ -153,7 +153,7 @@
+ env.Append(CCFLAGS = ["-I/usr/include/lua"])
+ lua_available = True
+ if lua_available == False:
+- print 'Could not find liblua, exiting!'
++ print ('Could not find liblua, exiting!')
+ Exit(1)
+ else:
+ env.Append(CCFLAGS = ["-Isrc/lua/src"])
+@@ -167,7 +167,7 @@
+ gd = conf.CheckLib('gd', autoadd=1)
+ if gd == 0:
+ env['LOGO'] = 0
+- print 'Did not find libgd, you won\'t be able to create a logo screen for
your avis.'
++ print ('Did not find libgd, you won\'t be able to create a logo screen for
your avis.')
+
+ if env['OPENGL'] and conf.CheckLibWithHeader('GL', 'GL/gl.h',
'c', autoadd=1):
+ conf.env.Append(CCFLAGS = "-DOPENGL")
+@@ -181,8 +181,8 @@
+ if env['FRAMESKIP']:
+ env.Append(CPPDEFINES = ['FRAMESKIP'])
+
+-print "base CPPDEFINES:",env['CPPDEFINES']
+-print "base CCFLAGS:",env['CCFLAGS']
++print ("base CPPDEFINES:",env['CPPDEFINES'])
++print ("base CCFLAGS:",env['CCFLAGS'])
+
+ if env['DEBUG']:
+ env.Append(CPPDEFINES=["_DEBUG"], CCFLAGS = ['-g', '-O0'])
+--- fceux-2.2.3/src/SConscript.orig 2019-07-26 18:08:11.297535443 +0000
++++ fceux-2.2.3/src/SConscript 2019-07-26 18:08:33.857781956 +0000
+@@ -33,7 +33,7 @@
+ platform_files = SConscript('drivers/sdl/SConscript')
+ file_list.append(platform_files)
+
+-print env['LINKFLAGS']
++print (env['LINKFLAGS'])
+
+ if env['PLATFORM'] == 'win32':
+ fceux = env.Program('fceux.exe', file_list)
+
diff --git a/fceux.spec b/fceux.spec
index 238d550..8322ba8 100644
--- a/fceux.spec
+++ b/fceux.spec
@@ -1,14 +1,17 @@
Name: fceux
Version: 2.2.3
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: A cross platform, NTSC and PAL Famicom/NES emulator
License: GPLv2+
URL:
http://fceux.com/
Source:
http://downloads.sourceforge.net/fceultra/%{name}-%{version}.src.tar.gz
+# Fix building with python3 scons
+# Patch from ArchLinux
+Patch0: %{name}-2.2.3-scons-python3.patch
BuildRequires: gcc-c++
-BuildRequires: python2-scons
+BuildRequires: scons
BuildRequires: SDL-devel >= 1.2.14
BuildRequires: gtk2-devel >= 2.18
BuildRequires: gd-devel
@@ -20,6 +23,7 @@ BuildRequires: minizip-devel
%endif
BuildRequires: desktop-file-utils
Requires: hicolor-icon-theme
+
Provides: fceultra = %{version}-%{release}
Obsoletes: fceultra < 2.0.0
Provides: gfceu = %{version}-%{release}
@@ -47,7 +51,7 @@ the network.
%prep
-%setup -q
+%autosetup -p1
# Remove windows binary
rm fceux-server/fceux-net-server.exe
@@ -83,7 +87,7 @@ sed -i '/OnlyShowIn=*/s/$/;/' fceux.desktop
# Enable system LUA
# Enable system minizip
# Enable AVI creation
-scons-2 %{?_smp_mflags} \
+scons %{?_smp_mflags} \
SYSTEM_LUA=1 \
SYSTEM_MINIZIP=1 \
CREATE_AVI=1
@@ -142,6 +146,9 @@ install -p -m 644 fceux-server/fceux-server.conf \
%changelog
+* Sat Aug 10 2019 Andrea Musuruane <musuruan(a)gmail.com> - 2.2.3-8
+- Fixed building with python3 scons
+
* Fri Aug 09 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
2.2.3-7
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild