From fffd6a3276be90e935f41622fc40c2e15e776a80 Mon Sep 17 00:00:00 2001 From: Karol Trzcionka Date: Dec 03 2007 15:35:27 +0000 Subject: Update to v2.0.8 and apply fixsound --- diff --git a/.cvsignore b/.cvsignore index 21071ad..50cd577 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -warzone2100-2.0.8_rc1.tar.bz2 +warzone2100-2.0.8.tar.bz2 diff --git a/sources b/sources index ab3e5c8..16ff5cc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5633f8b4a859d2acde7894ea88dc829c warzone2100-2.0.8_rc1.tar.bz2 +e804486bee52e3f6f1f3a7622fd7af1f warzone2100-2.0.8.tar.bz2 diff --git a/warzone2100-2.0.8.fixsound.patch b/warzone2100-2.0.8.fixsound.patch new file mode 100644 index 0000000..01627a8 --- /dev/null +++ b/warzone2100-2.0.8.fixsound.patch @@ -0,0 +1,67 @@ +diff -up ./lib/sound/openal_track.c.fixsound ./lib/sound/openal_track.c +--- ./lib/sound/openal_track.c.fixsound 2007-07-17 22:25:28.000000000 +0200 ++++ ./lib/sound/openal_track.c 2007-12-03 15:46:33.000000000 +0100 +@@ -288,6 +288,11 @@ static size_t ovbuf_read(void *ptr, size + return read_size; + } + ++/* ++ * See http://xiph.org/vorbis/doc/vorbisfile/callbacks.html for what these ++ * functions have to do. ++ */ ++ + static int ovbuf_seek(void *datasource, ogg_int64_t offset, int whence) { + ov_buffer_t* ovbuf = (ov_buffer_t*)datasource; + int new_pos = 0; +@@ -297,19 +302,18 @@ static int ovbuf_seek(void *datasource, + new_pos = offset; + break; + case SEEK_CUR: +- new_pos = ovbuf->pos+offset; ++ new_pos = ovbuf->pos + offset; + break; + case SEEK_END: +- new_pos = ovbuf->size-offset-1; ++ new_pos = ovbuf->size - offset; + break; + } + +- if (new_pos >= 0 && new_pos < ovbuf->size) { +- ovbuf->pos = new_pos; +- return new_pos; +- } else { +- return -1; +- } ++ if (new_pos < 0) ++ new_pos = 0; ++ else if (new_pos > ovbuf->size) ++ new_pos = ovbuf->size; ++ return ovbuf->pos = new_pos; + } + + static int ovbuf_close(void *datasource) { +@@ -325,7 +329,7 @@ static long ovbuf_tell(void *datasource) + static ov_callbacks ovbuf_callbacks = { + ovbuf_read, + ovbuf_seek, +- ovbuf_close, ++ NULL, // close + ovbuf_tell + }; + +@@ -346,11 +350,12 @@ static long ovPHYSFS_tell(void *datasour + return -1; + } + ++// seek/tell/close don't do anything right now, so tell physfs not to bother. + static ov_callbacks ovPHYSFS_callbacks = { + ovPHYSFS_read, +- ovPHYSFS_seek, +- ovPHYSFS_close, +- ovPHYSFS_tell ++ NULL, // seek ++ NULL, // close ++ NULL // tell + }; + + static BOOL sound_ReadTrack( TRACK *psTrack, ov_callbacks callbackFuncs, void* datasource ) diff --git a/warzone2100.spec b/warzone2100.spec index 226a415..e7ead4c 100644 --- a/warzone2100.spec +++ b/warzone2100.spec @@ -1,13 +1,13 @@ -%define relc rc1 Name: warzone2100 Version: 2.0.8 -Release: 0.1.%{relc}%{?dist} +Release: 1%{?dist} Summary: Innovative 3D real-time strategy Group: Amusements/Games License: GPLv2+ URL: http://wz2100.net/ -Source0: http://download.gna.org/warzone/releases/2.0/%{name}-%{version}_rc1.tar.bz2 +Source0: http://download.gna.org/warzone/releases/2.0/%{name}-%{version}.tar.bz2 +Patch0: warzone2100-2.0.8.fixsound.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: x86_64 ppc64 sparc64 alpha @@ -25,7 +25,8 @@ game's source code was liberated on December 6th, 2004, under a GPL license ReDev project was formed to take care of its future. %prep -%setup -q -n warzone2100-2.0.8_rc1 +%setup -q +%patch0 %build ./autogen.sh @@ -52,9 +53,11 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/warzone* %{_datadir}/applications/fedora-%{name}.desktop %{_datadir}/warzone2100 -%doc AUTHORS ChangeLog COPYING COPYING.README README TODO +%doc AUTHORS ChangeLog COPYING COPYING.README TODO %changelog +* Mon Dec 03 2007 Karol Trzcionka - 2.0.8-1 +- Update to v2.0.8 and apply fixsound * Mon Nov 19 2007 Karol Trzcionka - 2.0.8-0.1.rc1 - Update to v2.0.8_rc1 * Wed Oct 17 2007 Karol Trzcionka - 2.0.7-5