diff options
author | bland <bland@FreeBSD.org> | 2003-12-04 14:42:38 +0800 |
---|---|---|
committer | bland <bland@FreeBSD.org> | 2003-12-04 14:42:38 +0800 |
commit | 48725bf7f34ce96146d5b497b371fa2f310cdd05 (patch) | |
tree | 1bf58d532ae0c0badd1181efa63f4454b8774022 /games | |
parent | d237236e110e535871ab81821f7a7a4daaa77578 (diff) | |
download | freebsd-ports-gnome-48725bf7f34ce96146d5b497b371fa2f310cdd05.tar.gz freebsd-ports-gnome-48725bf7f34ce96146d5b497b371fa2f310cdd05.tar.zst freebsd-ports-gnome-48725bf7f34ce96146d5b497b371fa2f310cdd05.zip |
Fix bug wich prevents game variation selection from cli for
non-latin locale users.
Diffstat (limited to 'games')
-rw-r--r-- | games/gnome-games/Makefile | 1 | ||||
-rw-r--r-- | games/gnome-games/files/patch-aisleriot::sol.c | 37 | ||||
-rw-r--r-- | games/gnomegames2/Makefile | 1 | ||||
-rw-r--r-- | games/gnomegames2/files/patch-aisleriot::sol.c | 37 |
4 files changed, 76 insertions, 0 deletions
diff --git a/games/gnome-games/Makefile b/games/gnome-games/Makefile index e26a4f02a05f..021957247abd 100644 --- a/games/gnome-games/Makefile +++ b/games/gnome-games/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnomegames2 PORTVERSION= 2.4.1.1 +PORTREVISION= 1 CATEGORIES= games gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-games/2.4 diff --git a/games/gnome-games/files/patch-aisleriot::sol.c b/games/gnome-games/files/patch-aisleriot::sol.c new file mode 100644 index 000000000000..24b42528682d --- /dev/null +++ b/games/gnome-games/files/patch-aisleriot::sol.c @@ -0,0 +1,37 @@ +--- aisleriot/sol.c.orig Tue Nov 25 15:31:30 2003 ++++ aisleriot/sol.c Tue Nov 25 15:57:59 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); +@@ -540,14 +549,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); diff --git a/games/gnomegames2/Makefile b/games/gnomegames2/Makefile index e26a4f02a05f..021957247abd 100644 --- a/games/gnomegames2/Makefile +++ b/games/gnomegames2/Makefile @@ -7,6 +7,7 @@ PORTNAME= gnomegames2 PORTVERSION= 2.4.1.1 +PORTREVISION= 1 CATEGORIES= games gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-games/2.4 diff --git a/games/gnomegames2/files/patch-aisleriot::sol.c b/games/gnomegames2/files/patch-aisleriot::sol.c new file mode 100644 index 000000000000..24b42528682d --- /dev/null +++ b/games/gnomegames2/files/patch-aisleriot::sol.c @@ -0,0 +1,37 @@ +--- aisleriot/sol.c.orig Tue Nov 25 15:31:30 2003 ++++ aisleriot/sol.c Tue Nov 25 15:57:59 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); +@@ -540,14 +549,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); |