1
0
forked from pool/trigger-rally

Accepting request 458713 from home:susnux:branches:games

New version, some fixes

OBS-URL: https://build.opensuse.org/request/show/458713
OBS-URL: https://build.opensuse.org/package/show/games/trigger-rally?expand=0&rev=25
This commit is contained in:
Matthias Mailänder 2017-02-21 20:00:12 +00:00 committed by Git OBS Bridge
parent 7266e9721f
commit cece270b1c
5 changed files with 33 additions and 55 deletions

View File

@ -1,44 +0,0 @@
diff -rupN src/include/hiscore1.h src_patched/include/hiscore1.h
--- src/include/hiscore1.h 2016-04-08 20:58:38.000000000 +0200
+++ src_patched/include/hiscore1.h 2016-04-28 15:27:43.763427992 +0200
@@ -41,6 +41,17 @@
return InputStream; \
} else (void)0
+
+// TODO: remove duplicate code
+#define GETLINE_SKIP_EMPTY_LINES_B(InputStream, String) if (true) { \
+ while (std::getline(InputStream, String)) { \
+ if (!String.empty()) \
+ break; \
+ } \
+ if (String.empty()) \
+ return static_cast<bool> (InputStream); \
+} else (void)0
+
///
/// @brief Basic structure to load and save race results.
///
@@ -724,19 +735,19 @@ private:
std::istringstream sspdata(decrypt(pdata));
#undef decrypt
- GETLINE_SKIP_EMPTY_LINES(sspdata, ts);
+ GETLINE_SKIP_EMPTY_LINES_B(sspdata, ts);
nu = std::stoul(ts);
while (nu-- != 0)
{
- GETLINE_SKIP_EMPTY_LINES(sspdata, ts);
+ GETLINE_SKIP_EMPTY_LINES_B(sspdata, ts);
allunlocks[pname].insert(ts);
}
while (sspdata >> rd)
alltimes.insert({rd.mapname, rd});
- return sspdata;
+ return static_cast<bool> (sspdata);
}
///

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a60439cd21f427427794e33bad5e72a3d38929d547c36eae044f0f21d35eb7e4
size 67231153

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f2db8784d8c0dd51c7a2812a9d294db05bb2e9df992038b3a232060dba26ba24
size 82290843

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Feb 17 10:47:11 UTC 2017 - rpm@fthiessen.de
- Update to version 0.6.5
* Fixed compilation error of "hiscore1.h" by C++11 compilers
* Added 2 new events and 13 new single races (total 25 new races)
* Added "road sign" option for map creators
* Updated code to use TinyXML-2, SDL2 and SDL2_image
* Improved code friendliness to Linux when searching for the
default configuration file "trigger-rally.config.defs"
- Dropped upstream merged hiscore1.h.patch
- Upstream switched from SDL to SDL2, corrected BuildRequires.
- Fixed file-contains-date-and-time warning
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Aug 28 07:27:57 UTC 2016 - mailaender@opensuse.org Sun Aug 28 07:27:57 UTC 2016 - mailaender@opensuse.org

View File

@ -1,7 +1,7 @@
# #
# spec file for package trigger-rally # spec file for package trigger-rally
# #
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: trigger-rally Name: trigger-rally
Version: 0.6.4 Version: 0.6.5
Release: 0 Release: 0
Summary: Fast-paced single-player rally racing game Summary: Fast-paced single-player rally racing game
License: GPL-2.0 License: GPL-2.0
@ -28,21 +28,24 @@ Source0: http://downloads.sourceforge.net/project/trigger-rally/trigger-%
Source1: %{name}.desktop Source1: %{name}.desktop
# PATCH-FEATURE-UPSTREAM https://sourceforge.net/p/trigger-rally/patches/15/ # PATCH-FEATURE-UPSTREAM https://sourceforge.net/p/trigger-rally/patches/15/
Source2: %{name}.appdata.xml Source2: %{name}.appdata.xml
# PATCH-FIX-UPSTREAM https://sourceforge.net/p/trigger-rally/patches/13/ Source99: %{name}.changes
Patch0: hiscore1.h.patch
BuildRequires: dos2unix BuildRequires: dos2unix
BuildRequires: fdupes BuildRequires: fdupes
%if %{?suse_version} > 1320
BuildRequires: gcc-c++ >= 5.0
%else
BuildRequires: gcc5-c++ BuildRequires: gcc5-c++
%endif
BuildRequires: hicolor-icon-theme BuildRequires: hicolor-icon-theme
BuildRequires: physfs-devel BuildRequires: physfs-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(SDL_image) BuildRequires: pkgconfig(SDL2_image)
BuildRequires: pkgconfig(freealut) BuildRequires: pkgconfig(freealut)
BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(sdl) BuildRequires: pkgconfig(sdl2)
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -53,11 +56,16 @@ notes and co-driver icons.
%prep %prep
%setup -q %setup -q
%patch0
dos2unix doc/*.txt bin/*.defs dos2unix doc/*.txt bin/*.defs
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE99}")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" src/PEngine/app.cpp src/Trigger/menu.cpp
%build %build
CXX=g++-5 CC=gcc-5 \ %if %{?suse_version} <= 1320
export CXX=g++-5 CC=gcc-5
%endif
make --directory=src prefix=%{_prefix} exec_prefix=%{_prefix} bindir=%{_bindir} make --directory=src prefix=%{_prefix} exec_prefix=%{_prefix} bindir=%{_bindir}
%install %install