commit bff6a9311367df3dc8083e6ace1c2a43ed6133f5
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Tue Aug 15 10:33:12 2017 +0200
First import
.gitignore | 1 +
cannonball-0.3-fixes.patch | 90 +++++++++++++++++++++++++++++++
cannonball.desktop | 9 ++++
cannonball.png | Bin 0 -> 3311 bytes
cannonball.sh | 13 +++++
cannonball.spec | 130 +++++++++++++++++++++++++++++++++++++++++++++
cannonball_README.Fedora | 4 ++
sources | 1 +
8 files changed, 248 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..83158ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cannonball-0.3.tar.gz
diff --git a/cannonball-0.3-fixes.patch b/cannonball-0.3-fixes.patch
new file mode 100644
index 0000000..742e0fa
--- /dev/null
+++ b/cannonball-0.3-fixes.patch
@@ -0,0 +1,90 @@
+From 47363e093857f29c0b4fc4dde0d588b64e37283f Mon Sep 17 00:00:00 2001
+From: Carsten Teibes <dev(a)f4ke.de>
+Date: Wed, 1 Apr 2015 21:33:42 +0200
+Subject: [PATCH 1/2] Adapt XML Writer to new boost api
+
+---
+ src/main/frontend/config.cpp | 24 +++++++++++-------------
+ 1 file changed, 11 insertions(+), 13 deletions(-)
+
+diff --git a/src/main/frontend/config.cpp b/src/main/frontend/config.cpp
+index dfe4547..ca5c1b5 100644
+--- a/src/main/frontend/config.cpp
++++ b/src/main/frontend/config.cpp
+@@ -22,6 +22,14 @@
+ #include "engine/ohiscore.hpp"
+ #include "engine/audio/osoundint.hpp"
+
++// api change in boost 1.56
++#include <boost/version.hpp>
++#if (BOOST_VERSION >= 105600)
++typedef boost::property_tree::xml_writer_settings<std::string>
xml_writer_settings;
++#else
++typedef boost::property_tree::xml_writer_settings<char> xml_writer_settings;
++#endif
++
+ Config config;
+
+ Config::Config(void)
+@@ -237,13 +245,9 @@ bool Config::save(const std::string &filename)
+ ttrial.traffic = pt_config.get("time_trial.traffic", 3);
+ cont_traffic = pt_config.get("continuous.traffic", 3);
+
+-
+- // Tab space 1
+- boost::property_tree::xml_writer_settings<char> settings('\t', 1);
+-
+ try
+ {
+- write_xml(filename, pt_config, std::locale(), settings);
++ write_xml(filename, pt_config, std::locale(), xml_writer_settings('\t',
1)); // Tab space 1
+ }
+ catch (std::exception &e)
+ {
+@@ -309,12 +313,9 @@ void Config::save_scores(const std::string &filename)
+ pt.put(xmltag + ".time", Utils::to_hex_string(e->time));
+ }
+
+- // Tab space 1
+- boost::property_tree::xml_writer_settings<char> settings('\t', 1);
+-
+ try
+ {
+- write_xml(engine.jap ? filename + "_jap.xml" : filename +
".xml", pt, std::locale(), settings);
++ write_xml(engine.jap ? filename + "_jap.xml" : filename +
".xml", pt, std::locale(), xml_writer_settings('\t', 1)); // Tab space
1
+ }
+ catch (std::exception &e)
+ {
+@@ -365,12 +366,9 @@ void Config::save_tiletrial_scores()
+ pt.put("time_trial.score" + Utils::to_string(i),
ttrial.best_times[i]);
+ }
+
+- // Tab space 1
+- boost::property_tree::xml_writer_settings<char> settings('\t', 1);
+-
+ try
+ {
+- write_xml(engine.jap ? filename + "_jap.xml" : filename +
".xml", pt, std::locale(), settings);
++ write_xml(engine.jap ? filename + "_jap.xml" : filename +
".xml", pt, std::locale(), xml_writer_settings('\t', 1)); // Tab space
1
+ }
+ catch (std::exception &e)
+ {
+
+From 20b2c5ff3900c22571b829dc8f35eb22f4fdb94f Mon Sep 17 00:00:00 2001
+From: Carsten Teibes <dev(a)f4ke.de>
+Date: Wed, 1 Apr 2015 21:38:07 +0200
+Subject: [PATCH 2/2] Add missing include
+
+---
+ src/main/hwvideo/hwtiles.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/main/hwvideo/hwtiles.cpp b/src/main/hwvideo/hwtiles.cpp
+index 7488f42..350d598 100644
+--- a/src/main/hwvideo/hwtiles.cpp
++++ b/src/main/hwvideo/hwtiles.cpp
+@@ -1,3 +1,4 @@
++#include <cstring> // memcpy
+ #include "globals.hpp"
+ #include "romloader.hpp"
+ #include "hwvideo/hwtiles.hpp"
diff --git a/cannonball.desktop b/cannonball.desktop
new file mode 100644
index 0000000..c367596
--- /dev/null
+++ b/cannonball.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Cannonball
+Comment=An Enhanced OutRun Engine
+Exec=cannonball
+Icon=cannonball
+Terminal=false
+Type=Application
+Categories=Game;Emulator;
+
diff --git a/cannonball.png b/cannonball.png
new file mode 100644
index 0000000..89816f5
Binary files /dev/null and b/cannonball.png differ
diff --git a/cannonball.sh b/cannonball.sh
new file mode 100644
index 0000000..b4f0c75
--- /dev/null
+++ b/cannonball.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+echo "Cannonball launcher"
+
+mkdir -p ~/.cannonball/roms
+
+# config
+if [ ! -f ~/.cannonball/config.xml ]; then
+ cp /usr/share/cannonball/config.xml ~/.cannonball
+fi
+
+# run the game
+cd ~/.cannonball && exec /usr/libexec/cannonball/cannonball "$@"
diff --git a/cannonball.spec b/cannonball.spec
new file mode 100644
index 0000000..597362e
--- /dev/null
+++ b/cannonball.spec
@@ -0,0 +1,130 @@
+Name: cannonball
+Version: 0.3
+Release: 3%{?dist}
+Summary: An Enhanced OutRun Engine
+
+License: MAME
+URL:
https://github.com/djyt/cannonball/wiki
+Source0:
https://github.com/djyt/%{name}/archive/v0.3/%{name}-%{version}.tar.gz
+# Launcher and README adapted from AUR package
+#
https://aur.archlinux.org/packages/cannonball/
+Source1: %{name}.sh
+Source2: %{name}_README.Fedora
+# Cannonball icon by Joseph Wharton
+#
http://joeystitch.deviantart.com/art/Outrun-Icon-256x256-435538436
+Source3: %{name}.png
+Source4: %{name}.desktop
+# Adapt XML Writer to new boost api
+# Add missing include
+#
https://github.com/djyt/cannonball/pull/14
+Patch0: %{name}-0.3-fixes.patch
+
+BuildRequires: SDL-devel
+BuildRequires: cmake
+BuildRequires: boost-devel
+BuildRequires: desktop-file-utils
+Requires: hicolor-icon-theme
+
+%description
+Cannonball is a program which allows you to play an enhanced version of
+Yu Suzuki's seminal arcade racer, OutRun, on a variety of systems:
+- 60 fps gameplay (smoother than the original game)
+- True widescreen mode (extend the play area by 25%)
+- High Resolution mode (improves sprite scaling)
+- Time Trial Mode
+- Cheats
+- Customisable Music
+- High Score Saving
+- Western, Japanese & prototype track support
+- Analog & Digital controllers supported
+- Force Feedback / Haptic support (Windows only)
+- Fixes bugs present in the original game
+
+
+%prep
+%autosetup -p1
+
+# Do not link SDLmail
+sed -i '/SDLmain/d' cmake/debian.cmake
+
+# Fix boost path
+sed -i 's!${lib_base}/boost_1_54_0!${lib_base}/boost!' \
+ cmake/CMakeLists.txt
+
+
+%build
+mkdir build
+cd build
+%cmake ../cmake \
+ -DTARGET=debian \
+ -DCMAKE_SKIP_BUILD_RPATH=TRUE
+%make_build
+
+
+%install
+# Install launcher and binary
+mkdir -p %{buildroot}%{_bindir}
+install -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
+mkdir -p %{buildroot}%{_libexecdir}/%{name}
+install -p -m 755 build/%{name} %{buildroot}%{_libexecdir}/%{name}
+
+# Install config
+mkdir -p %{buildroot}%{_datadir}/%{name}
+install -p -m 644 build/config.xml %{buildroot}%{_datadir}/%{name}/config.xml
+
+# Install Fedora README
+install -p -m 644 %{SOURCE2} README.Fedora
+
+# Install desktop file
+mkdir -p %{buildroot}%{_datadir}/applications
+desktop-file-install \
+ --dir %{buildroot}%{_datadir}/applications \
+ %{SOURCE4}
+
+# Install icon
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/256x256/apps
+install -p -m 644 %{SOURCE3} \
+ %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
+
+
+%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}/%{name}
+%{_libexecdir}/%{name}
+%{_datadir}/%{name}
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/*/apps/%{name}.png
+%license docs/license.txt
+%doc roms/roms.txt
+%doc README.Fedora
+
+
+%changelog
+* Fri Aug 11 2017 Andrea Musuruane <musuruan(a)gmail.com> - 0.3-3
+- Fixed boost include path
+
+* Tue Aug 08 2017 Andrea Musuruane <musuruan(a)gmail.com> - 0.3-2
+- Updated Source URL
+- Fixed License
+- Added missing BuildRequires (desktop-file-utils)
+- Added missing Requires (hicolor-icon-theme)
+- Improved macro usage
+- Preserved timestamps
+
+* Sun Oct 18 2015 Andrea Musuruane <musuruan(a)gmail.com> - 0.3-1
+- First release
+
diff --git a/cannonball_README.Fedora b/cannonball_README.Fedora
new file mode 100644
index 0000000..cd0f036
--- /dev/null
+++ b/cannonball_README.Fedora
@@ -0,0 +1,4 @@
+You need the 'Out Run (Rev B)' Rom set data files. Put them under
+'~/.cannonball/roms'. The launcher script will also place a config
+file there, if not already existing.
+
diff --git a/sources b/sources
index e69de29..22c557e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+428e08ed19537b1444175aa54639fb6d cannonball-0.3.tar.gz