commit d63c95a13fb62a3724915c1afc586e278ac6a361
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sat Aug 10 14:06:46 2019 +0200
Fixed building with python3 scons (BZ #5344)
Used %set_build_flags macro
Removed desktop scriptlets
plus4emu-1.2.10.1-scons-python3.patch | 70 +++++++++++++++++++++++++++++++++++
plus4emu.spec | 38 +++++++------------
2 files changed, 84 insertions(+), 24 deletions(-)
---
diff --git a/plus4emu-1.2.10.1-scons-python3.patch
b/plus4emu-1.2.10.1-scons-python3.patch
new file mode 100644
index 0000000..d78c672
--- /dev/null
+++ b/plus4emu-1.2.10.1-scons-python3.patch
@@ -0,0 +1,70 @@
+--- plus4emu-1.2.10.1.orig/SConstruct 2017-02-22 12:47:43.000000000 +0100
++++ plus4emu-1.2.10.1/SConstruct 2019-08-10 13:40:56.829682387 +0200
+@@ -77,17 +77,17 @@
+ if not disablePkgConfig:
+ for s in packageConfigs[pkgName][1]:
+ if not s:
+- print 'Checking for package ' + pkgName + '...',
++ print('Checking for package ' + pkgName + '...', end =
'')
+ # hack to work around fltk-config adding unwanted compiler flags
+ savedCFlags = env['CCFLAGS']
+ savedCXXFlags = env['CXXFLAGS']
+ else:
+- print 'Checking for package ' + s + '...',
++ print('Checking for package ' + s + '...', end =
'')
+ s = ' ' + s
+ try:
+ if not env.ParseConfig(packageConfigs[pkgName][0] + s):
+ raise Exception()
+- print 'yes'
++ print('yes')
+ if not s:
+ env['CCFLAGS'] = savedCFlags
+ env['CXXFLAGS'] = savedCXXFlags
+@@ -95,7 +95,7 @@
+ env['CPPDEFINES'].remove(['_FORTIFY_SOURCE',
'2'])
+ return 1
+ except:
+- print 'no'
++ print('no')
+ continue
+ pkgFound = 0
+ else:
+@@ -110,9 +110,9 @@
+ packageConfigs[pkgName][2 + int(bool(mingwCrossCompile))])
+ if not pkgFound:
+ if not packageConfigs[pkgName][6]:
+- print ' *** error configuring ' + pkgName
++ print(' *** error configuring ' + pkgName)
+ Exit(-1)
+- print 'WARNING: package ' + pkgName + ' not found'
++ print('WARNING: package ' + pkgName + ' not found')
+ return 0
+ return 1
+
+@@ -218,14 +218,14 @@
+ if not configure.CheckType('PFNGLCOMPILESHADERPROC',
+ '#include <GL/gl.h>\n'
+ + '#include <GL/glext.h>'):
+- print 'WARNING: disabling GL shader support'
++ print('WARNING: disabling GL shader support')
+ enableGLShaders = 0
+ configure.Finish()
+ if sys.platform[:5] == 'linux' and not mingwCrossCompile:
+ plus4emuGUIEnvironment.Append(LIBS = ['X11'])
+ plus4emuGLGUIEnvironment.Append(LIBS = ['GL', 'X11'])
+ if disableOpenGL:
+- print 'WARNING: OpenGL is not found, only software video will be supported'
++ print('WARNING: OpenGL is not found, only software video will be
supported')
+ enableGLShaders = 0
+ plus4emuGLGUIEnvironment = plus4emuGUIEnvironment.Clone()
+ plus4emuGLGUIEnvironment.Append(CCFLAGS = ['-DDISABLE_OPENGL_DISPLAY'])
+@@ -264,7 +264,7 @@
+ havePortAudioV19 = 1
+ else:
+ havePortAudioV19 = 0
+- print 'WARNING: using old v18 PortAudio interface'
++ print('WARNING: using old v18 PortAudio interface')
+ fltkVersion13 = 0
+ if configure.CheckCXXHeader('FL/Fl_Cairo.H'):
+ fltkVersion13 = 1
diff --git a/plus4emu.spec b/plus4emu.spec
index d4be5e1..263c54f 100644
--- a/plus4emu.spec
+++ b/plus4emu.spec
@@ -1,6 +1,6 @@
Name: plus4emu
Version: 1.2.10.1
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Portable emulator of the Commodore 264 family of computers
License: GPLv2+
URL:
https://github.com/istvan-v/plus4emu
@@ -8,15 +8,17 @@ Source0:
https://github.com/istvan-v/plus4emu/archive/%{version}.tar.gz#/
Source1: README_%{name}.Fedora
Source2: p4fliconv.desktop
Source3: p4makecfg.desktop
-Patch0: %{name}-1.2.10-SConstruct.patch
-Patch1: %{name}-1.2.5-fixpathissue.patch
+Patch0: %{name}-1.2.10.1-scons-python3.patch
+Patch1: %{name}-1.2.10-SConstruct.patch
+Patch2: %{name}-1.2.5-fixpathissue.patch
+
BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
BuildRequires: fltk-fluid
BuildRequires: libsndfile-devel
BuildRequires: lua-devel
BuildRequires: portaudio-devel
-BuildRequires: python2-scons
+BuildRequires: scons
BuildRequires: SDL-devel
BuildRequires: libXcursor-devel
BuildRequires: libXinerama-devel
@@ -29,9 +31,7 @@ quality hardware emulation.
%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
+%autosetup -p1
# Remove fltk_jpeg, fltk_png, and fltk_z libraries from SConstruct
sed -i 's/ -lfltk_jpeg//' SConstruct
@@ -46,9 +46,9 @@ sed -i 's|installDirectory +
"roms"|"%{_datadir}/%{name}/roms"|' installer/makec
%build
-export CXXFLAGS="%{optflags}"
+%set_build_flags
# Use nopkgconfig=1 to disable package checking because it fails on Fedora
-scons-2 %{?_smp_mflags} \
+scons %{?_smp_mflags} \
VERBOSE=1 \
nopkgconfig=1 \
debug=1
@@ -79,21 +79,6 @@ mkdir -p %{buildroot}%{_datadir}/%{name}/roms
install -pm0644 roms/* %{buildroot}%{_datadir}/%{name}/roms
-%post
-/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-
-
-%postun
-if [ $1 -eq 0 ] ; then
- /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
- /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-fi
-
-
-%posttrans
-/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-
-
%files
%{_bindir}/*
%{_datadir}/%{name}
@@ -106,6 +91,11 @@ fi
%changelog
+* Sat Aug 10 2019 Andrea Musuruane <musuruan(a)gmail.com> - 1.2.10.1-9
+- Fixed building with python3 scons (BZ #5344)
+- Used %%set_build_flags macro
+- Removed desktop scriptlets
+
* Sat Aug 10 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
1.2.10.1-8
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild