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
commitea773052babdb82b905abaeec8de19c4307a0860 (patch)
tree2dccc74c67a8d5721741545eed30e36e15982457 /games-emulation
parentMarking 2.0-r2 stable on x86 and sparc. Removing old ebuilds. Blocking if m... (diff)
downloadhistorical-ea773052babdb82b905abaeec8de19c4307a0860.tar.gz
historical-ea773052babdb82b905abaeec8de19c4307a0860.tar.bz2
historical-ea773052babdb82b905abaeec8de19c4307a0860.zip
Add patch for bug #53216
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/grustibus/ChangeLog7
-rw-r--r--games-emulation/grustibus/Manifest5
-rw-r--r--games-emulation/grustibus/files/0.43-crash.patch286
-rw-r--r--games-emulation/grustibus/grustibus-0.43-r4.ebuild14
4 files changed, 306 insertions, 6 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/Manifest b/games-emulation/grustibus/Manifest
index c13612e52724..1463216b9103 100644
--- a/games-emulation/grustibus/Manifest
+++ b/games-emulation/grustibus/Manifest
@@ -1,4 +1,5 @@
-MD5 74de1763d6c360046b6180692c829499 ChangeLog 1770
-MD5 70438c223366532bf5dbb275db609d4e grustibus-0.43-r4.ebuild 801
+MD5 e15cc0e5d88d1469aef1bc23b5342152 ChangeLog 1983
+MD5 d26a9aba0f5aa08d7fbbba0dfc0d8c46 grustibus-0.43-r4.ebuild 875
MD5 f17b9b8fa07a38914fe1c03268f51678 metadata.xml 158
+MD5 946795d8f2dee0a69b475525a126710a files/0.43-crash.patch 9810
MD5 dd4620294ac5183f481b4a0b563d3673 files/digest-grustibus-0.43-r4 66
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
}