summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-06-22 22:49:12 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-06-22 22:49:12 +0000
commita63aef42de8a7e7abbf958cffb789b2b854e436e (patch)
tree2a6bb7fe79a506cac8e9506e0e11b15375afec3f /games-emulation/grustibus
parentMarking 2.0-r2 stable on x86 and sparc. Removing old ebuilds. Blocking if m... (diff)
downloadgentoo-2-a63aef42de8a7e7abbf958cffb789b2b854e436e.tar.gz
gentoo-2-a63aef42de8a7e7abbf958cffb789b2b854e436e.tar.bz2
gentoo-2-a63aef42de8a7e7abbf958cffb789b2b854e436e.zip
Add patch for bug #53216
Diffstat (limited to 'games-emulation/grustibus')
-rw-r--r--games-emulation/grustibus/ChangeLog7
-rw-r--r--games-emulation/grustibus/files/0.43-crash.patch286
-rw-r--r--games-emulation/grustibus/grustibus-0.43-r4.ebuild14
3 files changed, 303 insertions, 4 deletions
diff --git a/games-emulation/grustibus/ChangeLog b/games-emulation/grustibus/ChangeLog
index 9f1563350b3a..addf98d8d904 100644
--- a/games-emulation/grustibus/ChangeLog
+++ b/games-emulation/grustibus/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-emulation/grustibus
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/grustibus/ChangeLog,v 1.3 2004/01/24 13:56:16 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/grustibus/ChangeLog,v 1.4 2004/06/22 22:49:12 mr_bones_ Exp $
+
+ 22 Jun 2004; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/0.43-crash.patch, grustibus-0.43-r4.ebuild:
+ Add patch from Roman 'gryf' Dobosz to fix crash with newer xmame command-line
+ arguments (bug #53216)
24 Jan 2004; Michael Sterrett <mr_bones_@gentoo.org>
grustibus-0.43-r4.ebuild:
diff --git a/games-emulation/grustibus/files/0.43-crash.patch b/games-emulation/grustibus/files/0.43-crash.patch
new file mode 100644
index 000000000000..3e04d35f7efa
--- /dev/null
+++ b/games-emulation/grustibus/files/0.43-crash.patch
@@ -0,0 +1,286 @@
+diff -Nur grustibus-0.43/src/grustibus.c grustibus-0.43p1/src/grustibus.c
+--- grustibus-0.43/src/grustibus.c 2001-05-10 14:18:21.000000000 +0200
++++ grustibus-0.43p1/src/grustibus.c 2003-12-24 11:30:29.000000000 +0100
+@@ -25,6 +25,10 @@
+ *
+ * Last modified: 25 April 2001 <kjetilt@users.sourceforge.net>
+ *
++ * Unofficial modification by Roman 'gryf' Dobosz <gryf@elysium.pl>
++ * for use with latest xmame releases (currently 0.77.1)
++ *
++ * Last modified: 24 December 2003
+ */
+
+ #include "grustibus.h"
+@@ -694,12 +698,12 @@
+
+ *exec = g_strconcat("\"", general_prefs.xmame_exe, "\"",
+ " -rompath ", "\"", general_prefs.rom_dir,
+- "\"", " -cheatfile ", "\"",
++ "\"", " -cheat_file ", "\"",
+ general_prefs.cheat_file, "\"",
+- " -historyfile ", "\"",
++ " -history_file ", "\"",
+ general_prefs.game_history_file, "\"",
+- " -screenshotdir ", "\"", screenshotdir, "\"",
+- " -spooldir ", "\"",
++ " -snapshot_directory ", "\"", screenshotdir, "\"",
++ " -hiscore_directory ", "\"",
+ general_prefs.highscore_dir, "\"",
+ game_settings.fullscreen ? fullscreen :
+ windowed,
+diff -Nur grustibus-0.43/src/gui.c grustibus-0.43p1/src/gui.c
+--- grustibus-0.43/src/gui.c 2001-05-10 14:26:30.000000000 +0200
++++ grustibus-0.43p1/src/gui.c 2003-12-24 11:18:39.000000000 +0100
+@@ -25,6 +25,13 @@
+ *
+ * Last modified: 28 April 2001 <kjetilt@users.sourceforge.net>
+ *
++ * Unofficial modification by Roman 'gryf' Dobosz <gryf@elysium.pl>
++ * modified function set_game_history(), for other then Mark's Longridge
++ * history.dat usability. Code was taken from gxmame's gui.c
++ * http://gxmame.sourceforge.net
++ *
++ * Last modified: 24 December 2003
++ *
+ */
+
+ #include "grustibus.h"
+@@ -2185,110 +2192,118 @@
+
+ gboolean set_game_history(const gchar * game)
+ {
+- FILE *history_file;
+- GtkText *history_txt;
+- gchar line[2000];
+- gint i, n;
+- gchar *tmp, *p;
+- gchar **games;
+- gboolean found_game = FALSE;
+- gboolean pointer_in_info = FALSE;
+-
+- history_txt = GTK_TEXT(gtk_object_get_data
+- (GTK_OBJECT(main_window),
+- "game_history_text"));
+-
+- gtk_text_freeze(history_txt);
+- gtk_text_set_point(history_txt, gtk_text_get_length(history_txt));
+- gtk_text_backward_delete(history_txt,
+- gtk_text_get_length(history_txt));
+-
+- history_file = fopen(general_prefs.game_history_file, "r");
+-
+- if (!history_file) {
+- gtk_text_insert(history_txt,
+- NULL,
+- NULL,
+- NULL,
+- _
+- ("\n\n History.dat file not found"),
+- -1);
+- gtk_text_thaw(history_txt);
+- return (FALSE);
+- }
+-
+- /* TODO: history.dat should be read in a function in fileio.c that should return
+- * the read text or NULL if no text was found
+- */
++ FILE *history_file;
++ GtkText *history_txt;
++ gchar line[2000];
++ gint i, n;
++ gchar *tmp, *p;
++ gchar **games;
++ gboolean found_game = FALSE;
++ gboolean pointer_in_info = FALSE;
++ gboolean extra_newline = FALSE;
++
++ history_txt = GTK_TEXT(gtk_object_get_data (GTK_OBJECT(main_window),"game_history_text"));
++
++ gtk_text_freeze(history_txt);
++ gtk_text_set_point(history_txt, gtk_text_get_length(history_txt));
++ gtk_text_backward_delete(history_txt, gtk_text_get_length(history_txt));
++
++ history_file = fopen(general_prefs.game_history_file, "r");
++
++ if (!history_file)
++ {
++ gtk_text_insert(history_txt,
++ NULL,
++ NULL,
++ NULL,
++ _
++ ("\n\n History.dat file not found"),
++ -1);
++ gtk_text_thaw(history_txt);
++ return (FALSE);
++ }
++
++ /* TODO: history.dat should be read in a function in fileio.c that should return
++ * the read text or NULL if no text was found
++ */
++
++ /* Scan through the file. First look for '$',then $info=game, $bio and $end */
++ while (fgets(line, 500, history_file)) {
++ p = line;
++ tmp = p;
++ if (*tmp == '$' && !found_game) {
++ /* Found a line */
++ if (!strncmp(p, "$info", 5)) {
++ p= tmp=p+6;
++ /* It is an info line */
++ i = 0;
++ while (*tmp && (*tmp++ != '\n'))
++ i++;
++ /* Sometimes the list is continued on the next line */
++ i--;
++ do {
++ p[i] = fgetc(history_file);
++ if (p[i] == '\n')
++ i--;
++ if (p[i] == '\r')
++ i--;
++ i++;
++
++ } while ((p[i - 1] != '$') && i < 2000 /* buffer size */);
++ if (p[i - 1] == '$')
++ ungetc('$', history_file);
++
++ p[i - 1] = 0;
++ games = g_strsplit(p, ",", 20);
++ n = 0;
++
++ while ((games[n] != NULL)) {
++ games[n] = g_strchomp(games[n]);
++
++ if (!strcmp(games[n], game)) {
++ /* It is the info for the wanted game */
++ found_game = TRUE;
++ }
++ n++;
++ }
++ g_strfreev(games);
++ }
++ } else if (found_game && (*tmp == '$')) {
++ if (!strncmp(p, "$bio", 4))
++ pointer_in_info = TRUE;
++ if (!strncmp(p, "$end", 4)) {
++ pointer_in_info = FALSE;
++ break;
++ }
++ } else if (found_game && pointer_in_info) {
++ i = 0;
++ while (*tmp && (*tmp != '\r') &&(*tmp++ != '\n'))
++ i++;
++ if (i == 0)
++ {/* and a new line but not severals*/
++ if (!extra_newline)
++ {
++ extra_newline = TRUE;
++ }
++ else
++ extra_newline = FALSE;
++ }
++ else
++ {
++ extra_newline = FALSE;
++ }
++ if (!extra_newline)
++ {
++ p[i] = '\n';
++ p[i + 1] = '\0';
++ gtk_text_insert(history_txt, NULL, NULL, NULL, p, -1);
++ grustibus_debug("Added history txt: %s", p);
++ }
++ }
++ }
+
+- /* Scan through the file. First look for '$',then $info=game, $bio and $end */
+- while (fgets(line, 500, history_file)) {
+- p = line;
+- tmp = p;
+- if (*tmp == '$' && !found_game) {
+- /* Found a line */
+- i = 0;
+- while (*tmp && (*tmp++ != '=') && (*tmp != '\n'))
+- i++;
+- p[i] = 0;
+- if (!strncmp(p, "$info", 5)) {
+- p = tmp;
+- /* It is an info line */
+- i = 0;
+- while (*tmp && (*tmp++ != '\n'))
+- i++;
+- /* Sometimes the list is continued on the next line */
+- i--;
+- do {
+- p[i] = fgetc(history_file);
+- if (p[i] == '\n')
+- i--;
+- if (p[i] == '\r')
+- i--;
+- i++;
+- } while ((p[i - 1] != '$'));
+- p[i - 1] = 0;
+- games = g_strsplit(p, ",", 20);
+- n = 0;
+- while ((games[n] != NULL)) {
+- games[n] = g_strchomp(games[n]);
+-
+- if (!strcmp(games[n], game)) {
+- /* It is the info for the wanted game */
+- found_game = TRUE;
+- }
+- n++;
+- }
+- g_strfreev(games);
+- }
+- } else if (found_game && (*tmp == '$')) {
+- i = 0;
+- while (*tmp && (*tmp++ != '=') && (*tmp != '\n'))
+- i++;
+- p[i] = 0;
+- if (!strncmp(p, "$bio", 4))
+- pointer_in_info = TRUE;
+- if (!strncmp(p, "$end", 4)) {
+- pointer_in_info = FALSE;
+- break;
+- }
+- } else if (found_game && pointer_in_info) {
+- i = 0;
+- while (*tmp && (*tmp++ != '=') && (*tmp != '\n'))
+- i++;
+- if (i == 0)
+- p[i] = '\n';
+- else
+- p[i] = ' ';
+-
+- p[i + 1] = 0;
+- gtk_text_insert(history_txt,
+- NULL, NULL, NULL, p, -1);
+- grustibus_debug("Added history txt: %s", p);
+- }
+- }
+-
+- if (!found_game) {
++ if (!found_game)
++ {
+ tmp = g_malloc(100);
+ g_snprintf(tmp, 100,
+ _
+@@ -2296,12 +2311,12 @@
+ game);
+ gtk_text_insert(history_txt, NULL, NULL, NULL, tmp, -1);
+ g_free(tmp);
+- }
++ }
+
+- fclose(history_file);
++ fclose(history_file);
+ gtk_text_thaw(history_txt);
+
+- return (found_game);
++ return (found_game);
+ }
+
+ void set_game_info_widgets()
diff --git a/games-emulation/grustibus/grustibus-0.43-r4.ebuild b/games-emulation/grustibus/grustibus-0.43-r4.ebuild
index fe45829d7631..fe90af1055d7 100644
--- a/games-emulation/grustibus/grustibus-0.43-r4.ebuild
+++ b/games-emulation/grustibus/grustibus-0.43-r4.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/grustibus/grustibus-0.43-r4.ebuild,v 1.4 2004/06/08 06:39:45 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/grustibus/grustibus-0.43-r4.ebuild,v 1.5 2004/06/22 22:49:12 mr_bones_ Exp $
+
+inherit eutils
DESCRIPTION="A GNOME-based front-end for the M.A.M.E. video game emulator"
HOMEPAGE="http://grustibus.sourceforge.net"
@@ -11,10 +13,16 @@ LICENSE="GPL-2"
SLOT="0"
IUSE="nls"
-DEPEND=">=games-emulation/xmame-0.56.1
+DEPEND=">=games-emulation/xmame-0.80.1
>=media-libs/gdk-pixbuf-0.17.0
>=gnome-base/gnome-libs-1.4.1.2"
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch "${FILESDIR}/${PV}-crash.patch"
+}
+
src_compile() {
export CPPFLAGS=$(gdk-pixbuf-config --cflags)
econf $(use_enable nls) || die
@@ -23,5 +31,5 @@ src_compile() {
src_install() {
einstall || die
- dodoc README INSTALL ChangeLog TODO NEWS || die "dodoc failed"
+ dodoc README INSTALL ChangeLog TODO NEWS
}