[maniadrive-data] - Fix story mode not working with php >= 5.3.5 (rhbz#668657)
Hans de Goede
jwrdegoede at fedoraproject.org
Tue Jan 11 11:46:34 UTC 2011
commit 49cb6d70ebde439d38e395acfbbaf09e01264d70
Author: Hans de Goede <hdegoede at redhat.com>
Date: Tue Jan 11 12:54:15 2011 +0100
- Fix story mode not working with php >= 5.3.5 (rhbz#668657)
...data-1.2-fix-modifying-php-strings-inline.patch | 26 ++++++++++++++++++++
maniadrive-data.spec | 9 +++++-
2 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/maniadrive-data-1.2-fix-modifying-php-strings-inline.patch b/maniadrive-data-1.2-fix-modifying-php-strings-inline.patch
new file mode 100644
index 0000000..1ae052a
--- /dev/null
+++ b/maniadrive-data-1.2-fix-modifying-php-strings-inline.patch
@@ -0,0 +1,26 @@
+diff -up ManiaDrive-1.2-src/mania_localtracks.php~ ManiaDrive-1.2-src/mania_localtracks.php
+--- ManiaDrive-1.2-src/game/mania_localtracks.php~ 2006-08-16 23:15:49.000000000 +0200
++++ ManiaDrive-1.2-src/game/mania_localtracks.php 2011-01-11 11:56:20.764096983 +0100
+@@ -26,8 +26,7 @@ while( ($file = readdir($handle)) !== fa
+ closedir($handle);
+ }
+
+-$data_dir=str_pad('',1000);
+-raydium_file_home_path_cpy("data",$data_dir);
++$data_dir=raydium_file_home_path("data");
+
+ search_here(".");
+ search_here($data_dir);
+diff -up ManiaDrive-1.2-src/mania_story.php~ ManiaDrive-1.2-src/mania_story.php
+--- ManiaDrive-1.2-src/game/mania_story.php~ 2006-07-06 21:50:47.000000000 +0200
++++ ManiaDrive-1.2-src/game/mania_story.php 2011-01-11 11:54:35.100096998 +0100
+@@ -45,8 +45,7 @@ return $best;
+
+ $story=file($story_file);
+
+-$state_file=str_pad('',1000);
+-raydium_file_home_path_cpy("mania_drive.state",$state_file);
++$state_file=raydium_file_home_path("mania_drive.state");
+ if(file_exists($state_file))
+ $scores=file($state_file);
+
diff --git a/maniadrive-data.spec b/maniadrive-data.spec
index 1b1f9a5..43b5451 100644
--- a/maniadrive-data.spec
+++ b/maniadrive-data.spec
@@ -1,6 +1,6 @@
Name: maniadrive-data
Version: 1.2
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Data files for maniadrive, a 3D stunt driving game
Group: Amusements/Games
License: GPL+
@@ -11,10 +11,11 @@ URL: http://maniadrive.raydium.org/
# music (CC BY-NC-SA licensed)
Source0: ManiaDrive-%{version}-data.tar.gz
Patch0: maniadrive-data-1.2-fixes.patch
+Patch1: maniadrive-data-1.2-fix-modifying-php-strings-inline.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# to make sure this gets removed when maniadrive gets removed
-Requires: maniadrive
+Requires: maniadrive >= 1.2-26
%description
Data files for maniadrive, a 3D stunt driving game. Notice this package does
@@ -28,6 +29,7 @@ get automatically installed together with maniadrive itself).
%prep
%setup -q -n ManiaDrive-%{version}-data
%patch0 -p1
+%patch1 -p1
sed -i 's/\r//g' game/php.ini game/mania.cfg game/*.tri game/*.mni
iconv -f ISO-8859-1 -t UTF8 README > README.tmp
mv README.tmp README
@@ -55,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Jan 11 2011 Hans de Goede <hdegoede at redhat.com> - 1.2-5
+- Fix story mode not working with php >= 5.3.5 (rhbz#668657)
+
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the scm-commits
mailing list