From f3418378f41ec261ed9468f9fd2cc56cb943e8c3 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Feb 12 2020 16:35:17 +0000 Subject: Make the scons script compatible with Python 3 --- diff --git a/minicomputer-build-python3.patch b/minicomputer-build-python3.patch new file mode 100644 index 0000000..efc89d4 --- /dev/null +++ b/minicomputer-build-python3.patch @@ -0,0 +1,75 @@ +diff -rU3 MinicomputerV1.41-orig/SConstruct MinicomputerV1.41/SConstruct +--- MinicomputerV1.41-orig/SConstruct 2019-11-01 17:38:52.141938193 +0100 ++++ MinicomputerV1.41/SConstruct 2019-11-01 17:41:06.219307341 +0100 +@@ -1,6 +1,6 @@ +-print" " +-print"Minicomputer-------------- " +-print"- 1/2:configuring" ++print(" ") ++print("Minicomputer-------------- ") ++print("- 1/2:configuring") + + if ARGUMENTS.get('64bit', 0): + env = Environment(CCFLAGS = '-m64') +@@ -34,47 +34,47 @@ + conf = Configure(env) + + if not conf.CheckLibWithHeader('jack', 'jack/jack.h','c'): +- print 'Did not find jack, exiting!' ++ print('Did not find jack, exiting!') + Exit(1) + if not conf.CheckLibWithHeader('lo', 'lo/lo.h','c'): +- print 'Did not find liblo for OSC, exiting!' ++ print('Did not find liblo for OSC, exiting!') + Exit(1) + if not conf.CheckLibWithHeader('asound', 'alsa/asoundlib.h','c'): +- print 'Did not find alsa, exiting!' ++ print('Did not find alsa, exiting!') + Exit(1) + if not conf.CheckLibWithHeader('pthread', 'pthread.h','c'): +- print 'Did not find pthread library, exiting!' ++ print('Did not find pthread library, exiting!') + Exit(1) + if not conf.CheckLibWithHeader('m', 'math.h','c'): +- print 'Did not find math library, exiting!' ++ print('Did not find math library, exiting!') + Exit(1) + env = conf.Finish() + +-print"- checking dependencies for the editor:" ++print("- checking dependencies for the editor:") + + guiconf = Configure(guienv) + if not guiconf.CheckLibWithHeader('lo', 'lo/lo.h','c'): +- print 'Did not find liblo for OSC, exiting!' ++ print('Did not find liblo for OSC, exiting!') + Exit(1) + if not guiconf.CheckLibWithHeader('fltk', 'FL/Fl.H','c++'): +- print 'Did not find FLTK for the gui, exiting!' ++ print('Did not find FLTK for the gui, exiting!') + Exit(1) + if not guiconf.CheckLibWithHeader('asound', 'alsa/asoundlib.h','c'): +- print 'Did not find alsa, exiting!' ++ print('Did not find alsa, exiting!') + Exit(1) + if not guiconf.CheckLibWithHeader('pthread', 'pthread.h','c'): +- print 'Did not find pthread library, exiting!' ++ print('Did not find pthread library, exiting!') + Exit(1) + guienv = guiconf.Finish() + guienv.Append(CPPFLAGS = ['-O3','-Wall','-fmessage-length=0']) + +-print"- 2/2:compiling" +-print"- building the engine:" ++print("- 2/2:compiling") ++print("- building the engine:") + + env.Program('minicomputerCPU','cpu/main.c'); + +-print"" +-print"- building the editor:" ++print("") ++print("- building the editor:") + + guienv.Program('minicomputer',['editor/main.cpp','editor/Memory.cpp','editor/syntheditor.cxx']); + diff --git a/minicomputer.spec b/minicomputer.spec index 61f7d47..f88bf90 100644 --- a/minicomputer.spec +++ b/minicomputer.spec @@ -1,6 +1,6 @@ Name: minicomputer Version: 1.41 -Release: 27%{?dist} +Release: 28%{?dist} Summary: Software Synthesizer License: GPLv3+ URL: http://minicomputer.sourceforge.net/ @@ -10,6 +10,8 @@ Source1: %{name}.desktop Patch0: %{name}-linking.patch # GCC 4.7 fix Patch1: %{name}-gcc47.patch +# Build with Python 3 +Patch2: %{name}-build-python3.patch BuildRequires: gcc-c++ BuildRequires: alsa-lib-devel @@ -17,7 +19,7 @@ BuildRequires: desktop-file-utils BuildRequires: fltk-devel BuildRequires: jack-audio-connection-kit-devel BuildRequires: liblo-devel -BuildRequires: python2-scons +BuildRequires: /usr/bin/scons Requires: hicolor-icon-theme @@ -32,6 +34,7 @@ Jack as realtime audio infrastructure and can be controlled via Midi. %setup -q -c -n MinicomputerV%{version} %patch0 -p1 -b .linking %patch1 -p1 -b .%{name}-gcc47.patch +%patch2 -p1 -b .%{name}-build-python3.patch # Fix optflags # SSE instruction set, which provides improved functionality, is only available in these archs: @@ -43,7 +46,7 @@ sed -i "s|\(^env.Append(CCFLAGS =\).*|\1 ['%{optflags}'.split(),'-msse','-mfpmat sed -i "s|\(^guienv.Append(CPPFLAGS =\).*|\1 ['%{optflags}'.split() ])|" SConstruct %build -scons-2 %{?_smp_mflags} +scons %{?_smp_mflags} %install rm -rf %{buildroot} @@ -67,6 +70,9 @@ install -pm 644 %{name}.xpm \ %{_datadir}/icons/hicolor/32x32/apps/%{name}.xpm %changelog +* Fri Nov 01 2019 Petr Viktorin - 1.41-28 +- Make the scons script compatible with Python 3 + * Wed Jan 29 2020 Fedora Release Engineering - 1.41-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild