[SCM] Packaging for sfxr, a small tool for generating basic sound effects branch, master, updated. upstream/1.0-5-ged498cb

Miriam Ruiz little_miry at yahoo.es
Sun Nov 16 15:58:22 UTC 2008


The following commit has been merged in the master branch:
commit ed498cbd72d2d3c35f3120241c7400ddc7dd0fc8
Author: Miriam Ruiz <little_miry at yahoo.es>
Date:   Sun Nov 16 17:00:47 2008 +0100

    Fix patches

diff --git a/debian/patches/data_directory.patch b/debian/patches/data_directory.patch
index 9448b18..3b68438 100644
--- a/debian/patches/data_directory.patch
+++ b/debian/patches/data_directory.patch
@@ -1,29 +1,44 @@
 # Copyright (C) 2008  Miriam Ruiz <little_miry at yahoo.es>
 # Distributed under the same license as the program. See debian/copyright.
 
-Index: sfxr-sdl/main.cpp
+Index: sfxr/main.cpp
 ===================================================================
---- sfxr-sdl.orig/main.cpp	2008-08-30 22:39:35.000000000 +0200
-+++ sfxr-sdl/main.cpp	2008-08-30 22:40:20.000000000 +0200
+--- sfxr.orig/main.cpp	2008-11-16 16:52:17.000000000 +0100
++++ sfxr/main.cpp	2008-11-16 16:55:11.000000000 +0100
 @@ -23,6 +23,10 @@
  #include "SDL/SDL.h"
  #endif
  
 +#ifndef DATADIR
-+DATADIR="."
++DATADIR="/usr/share/sfxr"
 +#endif
 +
  #define rnd(n) (rand()%(n+1))
  
  #define PI 3.14159265f
-@@ -1126,8 +1130,8 @@
+@@ -1126,21 +1130,21 @@
  
  	ddkSetMode(640,480, 32, 60, DDK_WINDOW, "sfxr"); // requests window size etc from ddrawkit
  
--	LoadTGA(font, "font.tga");
--	LoadTGA(ld48, "ld48.tga");
-+	LoadTGA(font, DATADIR "/font.tga");
-+	LoadTGA(ld48, DATADIR "/ld48.tga");
- 	ld48.width=ld48.pitch;
+-	if (LoadTGA(font, "/usr/share/sfxr/font.tga")) {
++	if (LoadTGA(font, DATADIR "/font.tga")) {
+         	/* Try again in cwd */
+ 		if (LoadTGA(font, "font.tga")) {
+ 			fprintf(stderr,
+-				"Error could not open /usr/share/sfxr/font.tga"
++				"Error could not open " DATADIR "/font.tga"
+ 				" nor font.tga\n");
+ 			exit(1);
+ 		}
+ 	}
  
- 	input=new DPInput(hWndMain, hInstanceMain); // WIN32
+-	if (LoadTGA(ld48, "/usr/share/sfxr/ld48.tga")) {
++	if (LoadTGA(ld48, DATADIR "/ld48.tga")) {
+         	/* Try again in cwd */
+ 		if (LoadTGA(ld48, "ld48.tga")) {
+ 			fprintf(stderr,
+-				"Error could not open /usr/share/sfxr/ld48.tga"
++				"Error could not open " DATADIR "/ld48.tga"
+ 				" nor ld48.tga\n");
+ 			exit(1);
+ 		}
diff --git a/debian/patches/series b/debian/patches/series
index b3bd30b..0b108b1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
 sdl_includes.patch
 data_directory.patch
-sfxr-fix-delay.patch
 sfxr-window-icon.patch
diff --git a/debian/patches/sfxr-fix-delay.patch b/debian/patches/sfxr-fix-delay.patch
deleted file mode 100644
index 4217da7..0000000
--- a/debian/patches/sfxr-fix-delay.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- sfxr-sdl/main.cpp	2008-11-13 22:26:03.000000000 +0100
-+++ sfxr-sdl.new/main.cpp	2008-11-13 22:10:22.000000000 +0100
-@@ -1162,6 +1162,7 @@
- 	des.freq = 44100;
- 	des.format = AUDIO_S16SYS;
- 	des.channels = 1;
-+	des.samples = 512;
- 	des.callback = SDLAudioCallback;
- 	des.userdata = NULL;
- 	VERIFY(!SDL_OpenAudio(&des, NULL));
diff --git a/debian/patches/sfxr-window-icon.patch b/debian/patches/sfxr-window-icon.patch
index e6a37dc..d432d7f 100644
--- a/debian/patches/sfxr-window-icon.patch
+++ b/debian/patches/sfxr-window-icon.patch
@@ -1,11 +1,24 @@
-diff -up sfxr-sdl/sdlkit.h~ sfxr-sdl/sdlkit.h
---- sfxr-sdl/sdlkit.h~	2008-11-13 17:25:52.000000000 +0100
-+++ sfxr-sdl/sdlkit.h	2008-11-13 17:31:05.000000000 +0100
-@@ -128,6 +128,7 @@ static void sdlquit ()
- static void sdlinit ()
+Index: sfxr/sdlkit.h
+===================================================================
+--- sfxr.orig/sdlkit.h	2008-11-16 16:47:19.000000000 +0100
++++ sfxr/sdlkit.h	2008-11-16 16:58:14.000000000 +0100
+@@ -7,6 +7,10 @@
+ #include <stdio.h>
+ #include <string.h>
+ 
++#ifndef DATADIR
++DATADIR="/usr/share/sfxr"
++#endif
++
+ static void error (const char *file, unsigned int line, const char *msg)
  {
+ 	fprintf(stderr, "[!] %s:%u  %s\n", file, line, msg);
+@@ -129,7 +133,7 @@
+ {
+ 	SDL_Surface *icon;
  	VERIFY(!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO));
-+	SDL_WM_SetIcon(SDL_LoadBMP("/usr/share/sfxr/sfxr.bmp"), NULL);
- 	atexit(sdlquit);
- 	memset(keys, 0, sizeof(keys));
- 	ddkInit();
+-	icon = SDL_LoadBMP("/usr/share/sfxr/sfxr.bmp");
++	icon = SDL_LoadBMP(DATADIR "/sfxr.bmp");
+ 	if (!icon)
+ 		icon = SDL_LoadBMP("sfxr.bmp");
+ 	if (icon)

-- 
Packaging for sfxr, a small tool for generating basic sound effects



More information about the Pkg-games-commits mailing list