[svn] r5158 - in trunk/rpms: . kobodeluxe

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Tue Feb 13 01:49:12 CET 2007


Author: dag
Date: 2007-02-13 01:49:10 +0100 (Tue, 13 Feb 2007)
New Revision: 5158

Added:
   trunk/rpms/kobodeluxe/
   trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-fix-segfault-in-midi.patch
   trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-gcc4.patch
   trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-various-from-debian.patch
   trunk/rpms/kobodeluxe/kobodeluxe-16.png
   trunk/rpms/kobodeluxe/kobodeluxe-32.png
   trunk/rpms/kobodeluxe/kobodeluxe-48.png
   trunk/rpms/kobodeluxe/kobodeluxe.spec
Log:
Initial import

Added: trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-fix-segfault-in-midi.patch
===================================================================
--- trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-fix-segfault-in-midi.patch	                        (rev 0)
+++ trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-fix-segfault-in-midi.patch	2007-02-13 00:49:10 UTC (rev 5158)
@@ -0,0 +1,32 @@
+--- KoboDeluxe-0.4pre10/eel/e_symtab.c.pix	2002-06-13 03:26:21.000000000 +0200
++++ KoboDeluxe-0.4pre10/eel/e_symtab.c	2006-07-07 13:15:05.000000000 +0200
+@@ -255,7 +255,7 @@
+ 		if(!sym)
+ 			sym = eel_s_table[scope];
+ 		for(; sym; sym = (eel_symbol_t *) sym->next)
+-			if(strcmp(sym->name, eel_s_name) == 0)
++			if(sym->name && strcmp(sym->name, eel_s_name) == 0)
+ 				return sym;
+ 		sym = NULL;
+ 		--scope;
+--- KoboDeluxe-0.4pre10/sound/a_midifile.c.pix	2002-10-13 12:43:01.000000000 +0200
++++ KoboDeluxe-0.4pre10/sound/a_midifile.c	2006-07-07 13:15:05.000000000 +0200
+@@ -111,7 +111,7 @@
+ 
+ static inline unsigned char datalook(midi_player_t *mp, unsigned pos)
+ {
+-	if(pos < 0 || pos > mp->mf->flen)
++	if(pos < 0 || !mp->mf || pos > mp->mf->flen)
+ 		return 0;
+ 	return mp->mf->data[pos];
+ }
+--- KoboDeluxe-0.4pre10/sound/a_patch.c.pix	2003-02-10 15:09:02.000000000 +0100
++++ KoboDeluxe-0.4pre10/sound/a_patch.c	2006-07-07 13:19:40.000000000 +0200
+@@ -549,6 +549,7 @@
+ 		int pitch, int velocity)
+ {
+ 	int wave = p->param[APP_WAVE];
++	return;
+ 	if((wave < 0) || (wave >= AUDIO_MAX_WAVES))
+ 		return;
+ 

Added: trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-gcc4.patch
===================================================================
--- trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-gcc4.patch	                        (rev 0)
+++ trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-gcc4.patch	2007-02-13 00:49:10 UTC (rev 5158)
@@ -0,0 +1,11 @@
+--- gamestate.h.orig	2005-08-02 14:53:43.000000000 +0200
++++ gamestate.h	2005-08-02 14:54:22.000000000 +0200
+@@ -29,7 +29,7 @@
+ 	friend class gamestatemanager_t;
+   private:
+ 	gamestate_t		*next;		//LIFO stack
+-	gamestatemanager_t	*manager;
++	class gamestatemanager_t	*manager;
+   protected:
+ 	const char		*name;
+ 	int			unicode;	//for last press()/release()

Added: trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-various-from-debian.patch
===================================================================
--- trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-various-from-debian.patch	                        (rev 0)
+++ trunk/rpms/kobodeluxe/kobodeluxe-0.4pre10-various-from-debian.patch	2007-02-13 00:49:10 UTC (rev 5158)
@@ -0,0 +1,157 @@
+--- kobodeluxe-0.4pre10.orig/eel/e_getargs.c
++++ kobodeluxe-0.4pre10/eel/e_getargs.c
+@@ -19,6 +19,7 @@
+  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+  */
+ 
++#include "../config.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+--- kobodeluxe-0.4pre10.orig/graphics/window.cpp
++++ kobodeluxe-0.4pre10/graphics/window.cpp
+@@ -243,7 +243,7 @@
+ }
+ 
+ 
+-void window_t::center_token(int _x, int _y, const char *txt, char token)
++void window_t::center_token(int _x, int _y, const char *txt, signed char token)
+ {
+ 	center_token_fxp(PIXEL2CS(_x), PIXEL2CS(_y), txt, token);
+ }
+@@ -286,7 +286,7 @@
+ }
+ 
+ 
+-void window_t::center_token_fxp(int _x, int _y, const char *txt, char token)
++void window_t::center_token_fxp(int _x, int _y, const char *txt, signed char token)
+ {
+ 	_x = CS2PIXEL(_x*xsc);
+ 	_y = CS2PIXEL(_y*ysc);
+--- kobodeluxe-0.4pre10.orig/graphics/window.h
++++ kobodeluxe-0.4pre10/graphics/window.h
+@@ -202,10 +202,10 @@
+ 	void font(int fnt);
+ 	void string(int _x, int _y, const char *txt);
+ 	void center(int _y, const char *txt);
+-	void center_token(int _x, int _y, const char *txt, char token = 0);
++	void center_token(int _x, int _y, const char *txt, signed char token = 0);
+ 	void string_fxp(int _x, int _y, const char *txt);
+ 	void center_fxp(int _y, const char *txt);
+-	void center_token_fxp(int _x, int _y, const char *txt, char token = 0);
++	void center_token_fxp(int _x, int _y, const char *txt, signed char token = 0);
+ 	int textwidth(const char *txt, int min = 0, int max = 255);
+ 	int fontheight();
+ 
+--- kobodeluxe-0.4pre10.orig/sound/a_bus.c
++++ kobodeluxe-0.4pre10/sound/a_bus.c
+@@ -222,7 +222,9 @@
+ 		unsigned c = ctl;
+ 		if(ctl < ABC_FIRST || ctl > ABC_LAST)
+ 			c = (unsigned)(ABC_LAST + 1);
++#ifdef DEBUG
+ 		printf("Bus %u, slot %u %s set to %d\n", bus, slot, ctls[c], arg);
++#endif
+ 	}
+ 
+ 	switch(ctl)
+--- kobodeluxe-0.4pre10.orig/sound/a_events.c
++++ kobodeluxe-0.4pre10/sound/a_events.c
+@@ -196,8 +196,10 @@
+ 
+ void aev_close(void)
+ {
++#ifdef DEBUG
+ 	fprintf(stderr, "aev_close(): max events used: %d\n",
+ 				aev_event_counter_max);
++#endif
+ #ifdef	AEV_TRACKING
+ 	if(aev_event_counter)
+ 	{
+--- kobodeluxe-0.4pre10.orig/sound/audio.c
++++ kobodeluxe-0.4pre10/sound/audio.c
+@@ -857,7 +857,9 @@
+ {
+ 	if(_audio_running)
+ 	{
++#ifdef DEBUG
+ 		printf("Stopping audio engine... ");
++#endif
+ 		_audio_pause = 1;
+ 		_stop_output();
+ 	}
+--- kobodeluxe-0.4pre10.orig/aconfig.h.in
++++ kobodeluxe-0.4pre10/aconfig.h.in
+@@ -180,9 +180,11 @@
+ /* Define to empty if `const' does not conform to ANSI C. */
+ #undef const
+ 
+-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+-   if it is not supported. */
++/* Define to `__inline__' or `__inline' if that's what the C compiler
++   calls it, or to nothing if 'inline' is not supported under any name.  */
++#ifndef __cplusplus
+ #undef inline
++#endif
+ 
+ /* Define to rpl_malloc if the replacement function should be used. */
+ #undef malloc
+--- kobodeluxe-0.4pre10.orig/kobo.cpp
++++ kobodeluxe-0.4pre10/kobo.cpp
+@@ -323,21 +323,21 @@
+ 	 * Graphics data
+ 	 */
+ 	/* Current dir; from within the build tree */
+-	fmap.addpath("GFX", "./data");
++	//fmap.addpath("GFX", "./data");
+ 	/* Real data dir */
+ 	fmap.addpath("GFX", "DATA>>gfx");
+ 	/* Current dir */
+-	fmap.addpath("GFX", "./gfx");
++	//fmap.addpath("GFX", "./gfx");
+ 
+ 	/*
+ 	 * Sound data
+ 	 */
+ 	/* Current dir; from within the build tree */
+-	fmap.addpath("SFX", "./data");
++	//fmap.addpath("SFX", "./data");
+ 	/* Real data dir */
+ 	fmap.addpath("SFX", "DATA>>sfx");
+ 	/* Current dir */
+-	fmap.addpath("SFX", "./sfx");
++	//fmap.addpath("SFX", "./sfx");
+ 
+ 	/*
+ 	 * Score files (user and global)
+@@ -355,7 +355,7 @@
+ 	/* System local */
+ 	fmap.addpath("CONFIG", SYSCONF_DIR);
+ 	/* In current dir (last resort) */
+-	fmap.addpath("CONFIG", "./");
++	//fmap.addpath("CONFIG", "./");
+ }
+ 
+ 
+--- kobodeluxe-0.4pre10.orig/kobodl.6
++++ kobodeluxe-0.4pre10/kobodl.6
+@@ -67,7 +67,7 @@
+ Enable/disable motion interpolation filter.
+ .TP
+ .B \-[no]cheat
+-Enable/disable cheat mode, which allows any level to be played and does not
++Enable/disable cheat mode, which gives you infinite ships and does not
+ update high score file.
+ .TP
+ .B \-[no]indicator
+--- kobodeluxe-0.4pre10.orig/scenes.h
++++ kobodeluxe-0.4pre10/scenes.h
+@@ -39,7 +39,7 @@
+     int x, y, h, v;
+ } _base;
+ 
+-typedef const struct {
++typedef const struct _scene_struct { /* name added for gcc 4.0 -- JEH */
+     int ratio;
+     int startx;
+     int starty;

Added: trunk/rpms/kobodeluxe/kobodeluxe-16.png
===================================================================
(Binary files differ)


Property changes on: trunk/rpms/kobodeluxe/kobodeluxe-16.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/rpms/kobodeluxe/kobodeluxe-32.png
===================================================================
(Binary files differ)


Property changes on: trunk/rpms/kobodeluxe/kobodeluxe-32.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/rpms/kobodeluxe/kobodeluxe-48.png
===================================================================
(Binary files differ)


Property changes on: trunk/rpms/kobodeluxe/kobodeluxe-48.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/rpms/kobodeluxe/kobodeluxe.spec
===================================================================
--- trunk/rpms/kobodeluxe/kobodeluxe.spec	                        (rev 0)
+++ trunk/rpms/kobodeluxe/kobodeluxe.spec	2007-02-13 00:49:10 UTC (rev 5158)
@@ -0,0 +1,109 @@
+# $Id$
+# Authority: dag
+
+%{?rh7:%define _without_freedesktop 1}
+%{?el2:%define _without_freedesktop 1}
+
+%define desktop_vendor rpmforge
+
+%define real_name KoboDeluxe
+
+Summary: SDL port of Akira Higuchi's game XKobo 
+Name: kobodeluxe
+Version: 0.4
+Release: 0.pre10
+License: GPL
+Group: Amusement/Games
+URL: http://www.olofson.net/kobodl/
+
+Source0: http://olofson.net/kobodl/download/KoboDeluxe-%{version}pre10.tar.gz
+Source5: kobodeluxe-16.png
+Source6: kobodeluxe-32.png
+Source7: kobodeluxe-48.png
+Patch0: kobodeluxe-0.4pre10-gcc4.patch
+Patch1: kobodeluxe-0.4pre10-various-from-debian.patch
+Patch2: kobodeluxe-0.4pre10-fix-segfault-in-midi.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+Obsoletes: skobo <= %{version}-%{release}
+Provides: skobo = %{version}-%{release}
+BuildRequires: SDL_image-devel
+
+%description
+Kobo Deluxe is an SDL port of Akira Higuchi's game XKobo. It adds sound,
+smoother animation, filtered high resolution support, a more intuitive menu
+driven user interface, joystick support and other features, and runs on most
+of the major operating systems.
+
+%prep
+%setup -n %{real_name}-%{version}pre10
+%patch0 -p0 -b .gcc4
+%patch1 -p1
+%patch2 -p1 -z .pix
+
+%{__cat} <<EOF >kobodeluxe.desktop
+[Desktop Entry]
+Encoding=UTF-8
+Name=Kobo Deluxe
+Comment=Arcade video game
+Exec=%{_bindir}/kobodl
+Icon=kobodeluxe
+Terminal=false
+Type=Application
+Categories=Game;ArcadeGame;
+EOF
+
+%build
+%configure \
+	--program-prefix="%{?_program_prefix}"
+%{__make} kobo_scoredir="%{_localstatedir}/games/kobo-deluxe"
+
+%install
+%{__rm} -rf %{buildroot}
+%{__install} -d -m0755 %{buildroot}%{_localstatedir}/games/kobo-deluxe/
+%{__make} install DESTDIR="%{buildroot}" kobo_scoredir="%{_localstatedir}/games/kobo-deluxe/"
+
+%{__install} -Dp -m0644 %{SOURCE6} %{buildroot}%{_datadir}/icons/hicolor/16x16/kobodeluxe.png
+%{__install} -Dp -m0644 %{SOURCE5} %{buildroot}%{_datadir}/icons/hicolor/32x32/kobodeluxe.png
+%{__install} -Dp -m0644 %{SOURCE7} %{buildroot}%{_datadir}/icons/hicolor/48x48/kobodeluxe.png
+
+%if %{?_without_freedesktop:1}0
+	%{__install} -Dp -m0644 kobodeluxe.desktop %{buildroot}%{_sysconfdir}/X11/applnk/Games/kobodeluxe.desktop
+%else
+	%{__install} -d -m0755 %{buildroot}%{_datadir}/applications/
+	desktop-file-install                               \
+		--vendor %{desktop_vendor}                 \
+		--add-category X-Red-Hat-Base              \
+		--dir %{buildroot}%{_datadir}/applications \
+		kobodeluxe.desktop
+%endif
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%post 
+update-desktop-database %{_datadir}/applications &>/dev/null || :
+
+%postun
+update-desktop-database %{_datadir}/applications &>/dev/null || :
+
+%files
+%defattr(-, root, root, 0755)
+%doc ChangeLog COPYING* README* TODO
+%doc %{_mandir}/man6/kobodl.6*
+%{!?_without_freedesktop:%{_datadir}/applications/%{desktop_vendor}-kobodeluxe.desktop}
+%{?_without_freedesktop:%{_sysconfdir}/X11/applnk/Games/kobodeluxe.desktop}
+%{_datadir}/games/kobo-deluxe/
+%{_datadir}/icons/hicolor/16x16/kobodeluxe.png
+%{_datadir}/icons/hicolor/32x32/kobodeluxe.png
+%{_datadir}/icons/hicolor/48x48/kobodeluxe.png
+
+%defattr(2755, root, games, 0755)
+%{_bindir}/kobodl
+
+%defattr(775, root, games, 0755)
+%{_localstatedir}/games/kobo-deluxe/
+
+%changelog
+* Tue Feb 13 2007 Dag Wieers <dag at wieers.com> - 0.4-0.pre10
+- Initial package. (using DAR)


Property changes on: trunk/rpms/kobodeluxe/kobodeluxe.spec
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native



More information about the svn-commits mailing list