summaryrefslogtreecommitdiffstats
path: root/games/gnomegames2
diff options
context:
space:
mode:
authorbland <bland@df743ca5-7f9a-e211-a948-0013205c9059>2003-11-25 15:32:04 +0800
committerbland <bland@df743ca5-7f9a-e211-a948-0013205c9059>2003-11-25 15:32:04 +0800
commit3407c7be10c2a0a4842e28bc62f433143427cdbe (patch)
treee7e8bcd2686649c64ec36c5884b9708dac966d72 /games/gnomegames2
parentac61cce0b2d1cb6c04dad9753763365e66acaf48 (diff)
downloadmarcuscom-ports-3407c7be10c2a0a4842e28bc62f433143427cdbe.tar
marcuscom-ports-3407c7be10c2a0a4842e28bc62f433143427cdbe.tar.gz
marcuscom-ports-3407c7be10c2a0a4842e28bc62f433143427cdbe.tar.bz2
marcuscom-ports-3407c7be10c2a0a4842e28bc62f433143427cdbe.tar.lz
marcuscom-ports-3407c7be10c2a0a4842e28bc62f433143427cdbe.tar.xz
marcuscom-ports-3407c7be10c2a0a4842e28bc62f433143427cdbe.tar.zst
marcuscom-ports-3407c7be10c2a0a4842e28bc62f433143427cdbe.zip
Fix bug wich prevents game variation selection from cli for
non-latin locale users. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1373 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'games/gnomegames2')
-rw-r--r--games/gnomegames2/Makefile1
-rw-r--r--games/gnomegames2/files/patch-aisleriot::sol.c37
2 files changed, 38 insertions, 0 deletions
diff --git a/games/gnomegames2/Makefile b/games/gnomegames2/Makefile
index 6a610c2f0..5c39ce51b 100644
--- a/games/gnomegames2/Makefile
+++ b/games/gnomegames2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= gnomegames2
PORTVERSION= 2.5.1
+PORTREVISION= 1
CATEGORIES= games gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-games/2.5
diff --git a/games/gnomegames2/files/patch-aisleriot::sol.c b/games/gnomegames2/files/patch-aisleriot::sol.c
new file mode 100644
index 000000000..7a281c20a
--- /dev/null
+++ b/games/gnomegames2/files/patch-aisleriot::sol.c
@@ -0,0 +1,37 @@
+--- aisleriot/sol.c.orig Wed Oct 1 20:19:36 2003
++++ aisleriot/sol.c Tue Nov 25 16:30:44 2003
+@@ -83,6 +83,15 @@
+ #define DEFAULT_VARIATION "klondike.scm"
+ #define GNOME_SESSION_BUG
+
++gchar* game_file_to_variation (const gchar* file)
++{
++ char* p, *buf = g_path_get_basename(file);
++
++ if ((p = strrchr (buf, '.'))) *p = '\0';
++
++ return buf;
++}
++
+ gchar* game_file_to_name (const gchar* file)
+ {
+ char* p, *buf = g_path_get_basename(file);
+@@ -545,14 +554,14 @@
+ n_games = 0;
+
+ for (i = 0; i < n_games; i++) {
+- gchar *game_name = game_file_to_name (game_dents[i]->d_name);
+- if (!strcasecmp (variation, game_name)) {
++ gchar *game_variation = game_file_to_variation (game_dents[i]->d_name);
++ if (!strcasecmp (variation, game_variation)) {
+ dont_save = TRUE;
+ start_game = g_strdup ((gchar*) game_dents[i]->d_name);
+- g_free (game_name);
++ g_free (game_variation);
+ break;
+ }
+- g_free (game_name);
++ g_free (game_variation);
+ }
+
+ gh_enter(argc, argv, main_prog);