[Pkg-allegro-commits] r58 - in unstable/rafkill/debian: . patches

Samuel Hocevar sho at alioth.debian.org
Sat Feb 10 14:22:39 CET 2007


Author: sho
Date: 2007-02-10 14:22:39 +0100 (Sat, 10 Feb 2007)
New Revision: 58

Added:
   unstable/rafkill/debian/patches/100_save_game_crash.diff
Modified:
   unstable/rafkill/debian/changelog
   unstable/rafkill/debian/control
   unstable/rafkill/debian/patches/000_install_path.diff
   unstable/rafkill/debian/patches/series
Log:
rafkill (1.2.2-2) unstable; urgency=high

  * debian/control:
    + Added XS-Vcs-Svn field.

  * debian/patches/100_save_game_crash.diff:
    + Save games in the home directory instead of $PWD and do not crash if
      the directory is not writable (Closes: #406646).

 -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Fri,  9 Feb 2007 23:43:28 +0100


Modified: unstable/rafkill/debian/changelog
===================================================================
--- unstable/rafkill/debian/changelog	2007-02-09 23:22:30 UTC (rev 57)
+++ unstable/rafkill/debian/changelog	2007-02-10 13:22:39 UTC (rev 58)
@@ -1,3 +1,27 @@
+rafkill (1.2.2-2) unstable; urgency=high
+
+  * debian/control:
+    + Added XS-Vcs-Svn field.
+
+  * debian/patches/100_save_game_crash.diff:
+    + Save games in the home directory instead of $PWD and do not crash if
+      the directory is not writable (Closes: #406646).
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Fri,  9 Feb 2007 23:43:28 +0100
+
+rafkill (1.2.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * This release really fixes the "maxout shield" price issue.
+
+  * debian/patches/030_doc_spelling.diff:
+    + Patch was merged upstream. Dropping it.
+
+  * debian/patches/020_missing_strdup.diff:
+    + Patch rendered unnecessary by upstream fix. Dropping it.
+
+ -- Sam Hocevar (Debian packages) <sam+deb at zoy.org>  Fri,  9 Feb 2007 23:43:25 +0100
+
 rafkill (1.2.1-3) unstable; urgency=low
 
   * debian/rakfill.postinst:

Modified: unstable/rafkill/debian/control
===================================================================
--- unstable/rafkill/debian/control	2007-02-09 23:22:30 UTC (rev 57)
+++ unstable/rafkill/debian/control	2007-02-10 13:22:39 UTC (rev 58)
@@ -5,6 +5,7 @@
 Uploaders: Sam Hocevar (Debian packages) <sam+deb at zoy.org>
 Build-Depends: debhelper (>= 4.0), quilt, scons, liballegro4.2-dev (>= 2:4.2.0-4), libaldmb1-dev
 Standards-Version: 3.7.2
+XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-allegro/unstable/rafkill/
 
 Package: rafkill
 Section: games

Modified: unstable/rafkill/debian/patches/000_install_path.diff
===================================================================
--- unstable/rafkill/debian/patches/000_install_path.diff	2007-02-09 23:22:30 UTC (rev 57)
+++ unstable/rafkill/debian/patches/000_install_path.diff	2007-02-10 13:22:39 UTC (rev 58)
@@ -1,8 +1,8 @@
-Index: rafkill-1.2.1/SConstruct
+Index: rafkill-1.2.2/SConstruct
 ===================================================================
---- rafkill-1.2.1.orig/SConstruct	2006-05-16 09:23:41.000000000 +0200
-+++ rafkill-1.2.1/SConstruct	2006-05-16 09:23:58.000000000 +0200
-@@ -35,7 +35,7 @@
+--- rafkill-1.2.2.orig/SConstruct	2006-08-23 02:40:57.000000000 +0200
++++ rafkill-1.2.2/SConstruct	2007-02-09 23:56:28.000000000 +0100
+@@ -46,7 +46,7 @@
  # print "Install directory = $prefix"
  # print "Directory where symlinked binary will go = $bin"
  

Added: unstable/rafkill/debian/patches/100_save_game_crash.diff
===================================================================
--- unstable/rafkill/debian/patches/100_save_game_crash.diff	2007-02-09 23:22:30 UTC (rev 57)
+++ unstable/rafkill/debian/patches/100_save_game_crash.diff	2007-02-10 13:22:39 UTC (rev 58)
@@ -0,0 +1,114 @@
+Index: rafkill-1.2.2/src/loadsave.cpp
+===================================================================
+--- rafkill-1.2.2.orig/src/loadsave.cpp	2006-05-02 03:43:33.000000000 +0200
++++ rafkill-1.2.2/src/loadsave.cpp	2007-02-10 13:58:13.000000000 +0100
+@@ -2,6 +2,7 @@
+  */
+ 
+ #include "loadsave.h"
++#include "system.h"
+ #include <stdio.h>
+ #include "spaceobj.h"
+ #include "strings.h"
+@@ -50,15 +51,15 @@
+ #endif
+ 
+ /* savePlayer:
+- * Saves the player in at player#.rap where # = game_slot
++ * Saves the player in at .rafkill#.rap where # = game_slot
+  */
+ int savePlayer( SpaceObject * player, int game_slot ){
+ 
+ 	if ( player == NULL ) return 1;
+ 	printf("Save player\n");
+ 
+-	char filename[ 64 ];
+-	snprintf( filename, 64, "player%d.rap", game_slot );
++	char filename[ 2048 + 64 ];
++	snprintf( filename, 2048 + 64, "%s/.rafkill%d.rap", System::getHomeDirectory().c_str(), game_slot );
+ 
+ 	// PlayerHull * hull = dynamic_cast<PlayerHull *>(player->getHull());
+ 	PlayerHull * hull = (PlayerHull *)(player->getHull() );
+@@ -101,8 +102,10 @@
+ 
+ 	// printf("Save string = %s\n", final );
+ 	FILE * fv = fopen( filename, "wb" );
+-	fwrite( final, sizeof(char), strlen(final), fv );
+-	fclose( fv );
++	if( fv != NULL ) {
++		fwrite( final, sizeof(char), strlen(final), fv );
++		fclose( fv );
++	}
+ 
+ 	return 0;
+ 
+@@ -247,8 +250,8 @@
+ 
+ 	FILE * fv;
+ 	
+-	char filename[ 64 ];
+-	snprintf( filename, 64, "player%d.rap", game_slot );
++	char filename[ 2048 + 64 ];
++	snprintf( filename, 2048 + 64, "%s/.rafkill%d.rap", System::getHomeDirectory().c_str(), game_slot );
+ 	fv = fopen( filename, "rb" );
+ 	if ( fv == NULL ){
+ 		printf("Could not open %s\n", filename );
+Index: rafkill-1.2.2/src/menu.cpp
+===================================================================
+--- rafkill-1.2.2.orig/src/menu.cpp	2006-08-23 02:39:42.000000000 +0200
++++ rafkill-1.2.2/src/menu.cpp	2007-02-10 13:58:13.000000000 +0100
+@@ -2,6 +2,7 @@
+ #include "defs.h"
+ #include "menu.h"
+ #include "loadsave.h"
++#include "system.h"
+ #include "trigtable.h"
+ #include "strings.h"
+ #include <string.h>
+@@ -610,8 +611,8 @@
+ char * menuClass::getFileInfo( int number ){
+ 
+ 	char * temp = (char *)malloc( sizeof(char) * 1024 );
+-	char buf[ 64 ];
+-	sprintf( buf, "player%d.rap", number+1 );
++	char buf[ 2048 + 64 ];
++	sprintf( buf, "%s/.rafkill%d.rap", System::getHomeDirectory().c_str(), number+1 );
+ 	FILE * fv = fopen( buf, "rb" );
+ 	if ( !fv ){
+ 		sprintf( temp, "Slot %d Empty", number+1 );
+Index: rafkill-1.2.2/src/raptor.cpp
+===================================================================
+--- rafkill-1.2.2.orig/src/raptor.cpp	2006-08-22 04:28:18.000000000 +0200
++++ rafkill-1.2.2/src/raptor.cpp	2007-02-10 13:58:13.000000000 +0100
+@@ -12,6 +12,7 @@
+ #include <sstream>
+ #include <iostream>
+ #include "loadsave.h"
++#include "system.h"
+ #include "defs.h"
+ #include "ebox.h"
+ #include "raptor.h"
+@@ -217,8 +218,8 @@
+ 
+ 	menu->clear();
+ 	for ( int q = 0; q < 6; q++ ){
+-		char filename[ 64 ];
+-		snprintf( filename, 64, "player%d.rap", q+1 );
++		char filename[ 2048 + 64 ];
++		snprintf( filename, 2048 + 64, "%s/.rafkill%d.rap", System::getHomeDirectory().c_str(), q+1 );
+ 		if ( Util::exists( filename ) ){
+ 			time_t tl = Util::fileTime( filename );
+ 			struct tm * real_time = localtime( &tl );
+Index: rafkill-1.2.2/src/defs.cpp
+===================================================================
+--- rafkill-1.2.2.orig/src/defs.cpp	2007-02-10 13:58:17.000000000 +0100
++++ rafkill-1.2.2/src/defs.cpp	2007-02-10 13:58:43.000000000 +0100
+@@ -133,7 +133,7 @@
+ }
+ 	
+ bool Util::exists( const char * filename ){
+-	return ::exists( filename );
++	return ::file_exists( filename, FA_ALL, NULL );
+ }
+ 
+ const char * Util::getOS() {

Modified: unstable/rafkill/debian/patches/series
===================================================================
--- unstable/rafkill/debian/patches/series	2007-02-09 23:22:30 UTC (rev 57)
+++ unstable/rafkill/debian/patches/series	2007-02-10 13:22:39 UTC (rev 58)
@@ -1,3 +1,2 @@
 000_install_path.diff
-020_missing_strdup.diff 
-030_doc_spelling.diff 
+100_save_game_crash.diff




More information about the Pkg-allegro-commits mailing list