aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2013-11-04 21:39:07 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-11-06 00:53:35 -0600
commitb861e7aaee2b71709061b88615b3a523cffcb97d (patch)
tree43f41d124f31622888889b31e7290cf027fd96d9
parent85ebdac868e5699972dba15a370decd6f16b131f (diff)
games/trackball: Fix building with the newer guile.
Also fix the Esc key behaviour Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--games/trackballs/patches/trackballs-1.1.4-guile20.patch310
-rw-r--r--games/trackballs/patches/trackballs-1.1.4-remove-old-sdl-workarounds.patch117
-rw-r--r--games/trackballs/trackballs.SlackBuild6
3 files changed, 432 insertions, 1 deletions
diff --git a/games/trackballs/patches/trackballs-1.1.4-guile20.patch b/games/trackballs/patches/trackballs-1.1.4-guile20.patch
new file mode 100644
index 000000000000..79a9174ce063
--- /dev/null
+++ b/games/trackballs/patches/trackballs-1.1.4-guile20.patch
@@ -0,0 +1,310 @@
+--- trackballs-1.1.4/src/game.cc 2007-05-25 12:24:42.000000000 +0200
++++ trackballs-1.1.4.new/src/game.cc 2011-05-18 12:51:33.350253294 +0200
+@@ -65,7 +65,7 @@
+ /* Load the bootup script */
+ char scmname[256];
+ snprintf(scmname,sizeof(scmname),"%s/levels/boot.scm",SHARE_DIR);
+- gh_eval_file(scmname);
++ scm_c_primitive_load(scmname);
+
+ player1 = new Player(gamer);
+ loadLevel(name);
+@@ -110,7 +110,7 @@
+
+ if(map) delete map;
+ map = new Map(mapname);
+- gh_eval_file(scmname);
++ scm_c_primitive_load(scmname);
+
+ if(player1)
+ player1->timeLeft = startTime;
+--- trackballs-1.1.4/src/guile.cc.x 2007-05-25 16:40:36.000000000 +0200
++++ trackballs-1.1.4.new/src/guile.cc.x 2011-05-18 12:55:59.574253365 +0200
+@@ -1,88 +1,88 @@
+ /* cpp arguments: guile.cc -DLOCALEDIR="/usr/local/share/locale" -DHAVE_CONFIG_H -I. -I.. -DSHARE_DIR="/usr/local/share/trackballs" -DPACKAGE="trackballs" -DVERSION="1.1.4" -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I./ -I../ */
+- scm_c_define_gsubr (s_player, 0, 0, 0, (SCM (*)()) player); ;
+- scm_c_define_gsubr (s_new_mr_black, 2, 0, 0, (SCM (*)()) new_mr_black); ;
+- scm_c_define_gsubr (s_new_baby, 2, 0, 0, (SCM (*)()) new_baby); ;
+- scm_c_define_gsubr (s_add_teleport, 5, 0, 0, (SCM (*)()) add_teleport); ;
+- scm_c_define_gsubr (s_add_bird, 6, 0, 0, (SCM (*)()) add_bird); ;
+- scm_c_define_gsubr (s_add_flag, 5, 0, 0, (SCM (*)()) add_flag); ;
+- scm_c_define_gsubr (s_add_colormodifier, 7, 0, 0, (SCM (*)()) add_colormodifier); ;
+- scm_c_define_gsubr (s_add_heightmodifier, 7, 3, 0, (SCM (*)()) add_heightmodifier); ;
+- scm_c_define_gsubr (s_add_cactus, 3, 0, 0, (SCM (*)()) add_cactus); ;
+- scm_c_define_gsubr (s_add_spike, 4, 0, 0, (SCM (*)()) add_spike); ;
+- scm_c_define_gsubr (s_add_sidespike, 5, 0, 0, (SCM (*)()) add_sidespike); ;
+- scm_c_define_gsubr (s_add_goal, 4, 0, 0, (SCM (*)()) add_goal); ;
+- scm_c_define_gsubr (s_sign, 6, 1, 0, (SCM (*)()) sign); ;
+- scm_c_define_gsubr (s_add_modpill, 5, 0, 0, (SCM (*)()) add_modpill); ;
+- scm_c_define_gsubr (s_forcefield, 8, 0, 0, (SCM (*)()) forcefield); ;
+- scm_c_define_gsubr (s_fun_switch, 4, 0, 0, (SCM (*)()) fun_switch); ;
+- scm_c_define_gsubr (s_new_pipe, 7, 0, 0, (SCM (*)()) new_pipe); ;
+- scm_c_define_gsubr (s_pipe_connector, 4, 0, 0, (SCM (*)()) pipe_connector); ;
+- scm_c_define_gsubr (s_diamond, 2, 1, 0, (SCM (*)()) diamond); ;
+- scm_c_define_gsubr (s_fountain, 6, 0, 0, (SCM (*)()) fountain); ;
+- scm_c_define_gsubr (s_set_position, 3, 1, 0, (SCM (*)()) set_position); ;
+- scm_c_define_gsubr (s_get_position_x, 1, 0, 0, (SCM (*)()) get_position_x); ;
+- scm_c_define_gsubr (s_get_position_y, 1, 0, 0, (SCM (*)()) get_position_y); ;
+- scm_c_define_gsubr (s_get_position_z, 1, 0, 0, (SCM (*)()) get_position_z); ;
+- scm_c_define_gsubr (s_set_modtime, 3, 0, 0, (SCM (*)()) set_modtime); ;
+- scm_c_define_gsubr (s_set_acceleration, 2, 0, 0, (SCM (*)()) set_acceleration); ;
+- scm_c_define_gsubr (s_set_horizon, 2, 0, 0, (SCM (*)()) set_horizon); ;
+- scm_c_define_gsubr (s_set_primary_color, 4, 1, 0, (SCM (*)()) set_primary_color); ;
+- scm_c_define_gsubr (s_set_secondary_color, 4, 1, 0, (SCM (*)()) set_secondary_color); ;
+- scm_c_define_gsubr (s_set_specular_color, 4, 1, 0, (SCM (*)()) set_specular_color); ;
+- scm_c_define_gsubr (s_set_flag, 3, 0, 0, (SCM (*)()) set_flag); ;
+- scm_c_define_gsubr (s_set_wind, 3, 0, 0, (SCM (*)()) set_wind); ;
+- scm_c_define_gsubr (s_set_speed, 2, 0, 0, (SCM (*)()) set_speed); ;
+- scm_c_define_gsubr (s_set_texture, 2, 0, 0, (SCM (*)()) set_texture); ;
+- scm_c_define_gsubr (s_set_fountain_strength, 2, 0, 0, (SCM (*)()) set_fountain_strength); ;
+- scm_c_define_gsubr (s_set_fountain_velocity, 4, 0, 0, (SCM (*)()) set_fountain_velocity); ;
+- scm_c_define_gsubr (s_score_on_death, 2, 0, 0, (SCM (*)()) score_on_death); ;
+- scm_c_define_gsubr (s_time_on_death, 2, 0, 0, (SCM (*)()) time_on_death); ;
+- scm_c_define_gsubr (s_default_on_death, 3, 0, 0, (SCM (*)()) default_on_death); ;
+- scm_c_define_gsubr (s_add_cyclic_platform, 8, 0, 0, (SCM (*)()) add_cyclic_platform); ;
+- scm_c_define_gsubr (s_animator, 7, 0, 0, (SCM (*)()) animator); ;
+- scm_c_define_gsubr (s_set_onoff, 2, 0, 0, (SCM (*)()) set_onoff); ;
+- scm_c_define_gsubr (s_animator_value, 1, 0, 0, (SCM (*)()) animator_value); ;
+- scm_c_define_gsubr (s_set_animator_direction, 2, 0, 0, (SCM (*)()) set_animator_direction); ;
+- scm_c_define_gsubr (s_set_animator_position, 2, 0, 0, (SCM (*)()) set_animator_position); ;
+- scm_c_define_gsubr (s_day, 0, 0, 0, (SCM (*)()) day); ;
+- scm_c_define_gsubr (s_night, 0, 0, 0, (SCM (*)()) night); ;
+- scm_c_define_gsubr (s_fog, 0, 1, 0, (SCM (*)()) fog); ;
+- scm_c_define_gsubr (s_thick_fog, 0, 0, 0, (SCM (*)()) thick_fog); ;
+- scm_c_define_gsubr (s_fog_color, 3, 0, 0, (SCM (*)()) fog_color); ;
+- scm_c_define_gsubr (s_set_bonus_level, 1, 0, 0, (SCM (*)()) set_bonus_level); ;
+- scm_c_define_gsubr (s_set_track_name, 1, 0, 0, (SCM (*)()) set_track_name); ;
+- scm_c_define_gsubr (s_set_author, 1, 0, 0, (SCM (*)()) set_author); ;
+- scm_c_define_gsubr (s_start_time, 1, 0, 0, (SCM (*)()) start_time); ;
+- scm_c_define_gsubr (s_set_time, 1, 0, 0, (SCM (*)()) set_time); ;
+- scm_c_define_gsubr (s_get_time, 0, 0, 0, (SCM (*)()) get_time); ;
+- scm_c_define_gsubr (s_add_time, 1, 0, 0, (SCM (*)()) add_time); ;
+- scm_c_define_gsubr (s_set_score, 1, 0, 0, (SCM (*)()) set_score); ;
+- scm_c_define_gsubr (s_get_score, 0, 0, 0, (SCM (*)()) get_score); ;
+- scm_c_define_gsubr (s_add_score, 1, 0, 0, (SCM (*)()) add_score); ;
+- scm_c_define_gsubr (s_set_start_position, 2, 0, 0, (SCM (*)()) set_start_position); ;
+- scm_c_define_gsubr (s_snow, 1, 0, 0, (SCM (*)()) snow); ;
+- scm_c_define_gsubr (s_rain, 1, 0, 0, (SCM (*)()) rain); ;
+- scm_c_define_gsubr (s_difficulty, 0, 0, 0, (SCM (*)()) difficulty); ;
+- scm_c_define_gsubr (s_use_grid, 1, 0, 0, (SCM (*)()) use_grid); ;
+- scm_c_define_gsubr (s_map_is_transparent, 1, 0, 0, (SCM (*)()) map_is_transparent); ;
+- scm_c_define_gsubr (s_jump, 1, 0, 0, (SCM (*)()) jump); ;
+- scm_c_define_gsubr (s_scale_oxygen, 1, 0, 0, (SCM (*)()) scale_oxygen); ;
+- scm_c_define_gsubr (s_set_cell_flag, 6, 0, 0, (SCM (*)()) set_cell_flag); ;
+- scm_c_define_gsubr (s_set_cell_velocity, 6, 0, 0, (SCM (*)()) set_cell_velocity); ;
+- scm_c_define_gsubr (s_set_cell_heights, 8, 1, 0, (SCM (*)()) set_cell_heights); ;
+- scm_c_define_gsubr (s_set_cell_water_heights, 8, 1, 0, (SCM (*)()) set_cell_water_heights); ;
+- scm_c_define_gsubr (s_set_cell_colors, 8, 1, 0, (SCM (*)()) set_cell_colors); ;
+- scm_c_define_gsubr (s_set_cell_wall_colors, 8, 1, 0, (SCM (*)()) set_cell_wall_colors); ;
+- scm_c_define_gsubr (s_play_effect, 1, 0, 0, (SCM (*)()) play_effect); ;
+- scm_c_define_gsubr (s_camera_angle, 2, 0, 0, (SCM (*)()) camera_angle); ;
+- scm_c_define_gsubr (s_restart_time, 1, 0, 0, (SCM (*)()) restart_time); ;
+- scm_c_define_gsubr (s_clear_song_preferences, 0, 0, 0, (SCM (*)()) clear_song_preferences); ;
+- scm_c_define_gsubr (s_force_next_song, 0, 0, 0, (SCM (*)()) force_next_song); ;
+- scm_c_define_gsubr (s_set_song_preference, 2, 0, 0, (SCM (*)()) set_song_preference); ;
+- scm_c_define_gsubr (s_trigger, 4, 0, 0, (SCM (*)()) trigger); ;
+- scm_c_define_gsubr (s_smart_trigger, 5, 0, 0, (SCM (*)()) smart_trigger); ;
+- scm_c_define_gsubr (s_on_event, 3, 0, 0, (SCM (*)()) on_event); ;
+- scm_c_define_gsubr (s_get_event_callback, 2, 0, 0, (SCM (*)()) get_event_callback); ;
++ scm_c_define_gsubr (s_player, 0, 0, 0, (void *) player); ;
++ scm_c_define_gsubr (s_new_mr_black, 2, 0, 0, (void *) new_mr_black); ;
++ scm_c_define_gsubr (s_new_baby, 2, 0, 0, (void *) new_baby); ;
++ scm_c_define_gsubr (s_add_teleport, 5, 0, 0, (void *) add_teleport); ;
++ scm_c_define_gsubr (s_add_bird, 6, 0, 0, (void *) add_bird); ;
++ scm_c_define_gsubr (s_add_flag, 5, 0, 0, (void *) add_flag); ;
++ scm_c_define_gsubr (s_add_colormodifier, 7, 0, 0, (void *) add_colormodifier); ;
++ scm_c_define_gsubr (s_add_heightmodifier, 7, 3, 0, (void *) add_heightmodifier); ;
++ scm_c_define_gsubr (s_add_cactus, 3, 0, 0, (void *) add_cactus); ;
++ scm_c_define_gsubr (s_add_spike, 4, 0, 0, (void *) add_spike); ;
++ scm_c_define_gsubr (s_add_sidespike, 5, 0, 0, (void *) add_sidespike); ;
++ scm_c_define_gsubr (s_add_goal, 4, 0, 0, (void *) add_goal); ;
++ scm_c_define_gsubr (s_sign, 6, 1, 0, (void *) sign); ;
++ scm_c_define_gsubr (s_add_modpill, 5, 0, 0, (void *) add_modpill); ;
++ scm_c_define_gsubr (s_forcefield, 8, 0, 0, (void *) forcefield); ;
++ scm_c_define_gsubr (s_fun_switch, 4, 0, 0, (void *) fun_switch); ;
++ scm_c_define_gsubr (s_new_pipe, 7, 0, 0, (void *) new_pipe); ;
++ scm_c_define_gsubr (s_pipe_connector, 4, 0, 0, (void *) pipe_connector); ;
++ scm_c_define_gsubr (s_diamond, 2, 1, 0, (void *) diamond); ;
++ scm_c_define_gsubr (s_fountain, 6, 0, 0, (void *) fountain); ;
++ scm_c_define_gsubr (s_set_position, 3, 1, 0, (void *) set_position); ;
++ scm_c_define_gsubr (s_get_position_x, 1, 0, 0, (void *) get_position_x); ;
++ scm_c_define_gsubr (s_get_position_y, 1, 0, 0, (void *) get_position_y); ;
++ scm_c_define_gsubr (s_get_position_z, 1, 0, 0, (void *) get_position_z); ;
++ scm_c_define_gsubr (s_set_modtime, 3, 0, 0, (void *) set_modtime); ;
++ scm_c_define_gsubr (s_set_acceleration, 2, 0, 0, (void *) set_acceleration); ;
++ scm_c_define_gsubr (s_set_horizon, 2, 0, 0, (void *) set_horizon); ;
++ scm_c_define_gsubr (s_set_primary_color, 4, 1, 0, (void *) set_primary_color); ;
++ scm_c_define_gsubr (s_set_secondary_color, 4, 1, 0, (void *) set_secondary_color); ;
++ scm_c_define_gsubr (s_set_specular_color, 4, 1, 0, (void *) set_specular_color); ;
++ scm_c_define_gsubr (s_set_flag, 3, 0, 0, (void *) set_flag); ;
++ scm_c_define_gsubr (s_set_wind, 3, 0, 0, (void *) set_wind); ;
++ scm_c_define_gsubr (s_set_speed, 2, 0, 0, (void *) set_speed); ;
++ scm_c_define_gsubr (s_set_texture, 2, 0, 0, (void *) set_texture); ;
++ scm_c_define_gsubr (s_set_fountain_strength, 2, 0, 0, (void *) set_fountain_strength); ;
++ scm_c_define_gsubr (s_set_fountain_velocity, 4, 0, 0, (void *) set_fountain_velocity); ;
++ scm_c_define_gsubr (s_score_on_death, 2, 0, 0, (void *) score_on_death); ;
++ scm_c_define_gsubr (s_time_on_death, 2, 0, 0, (void *) time_on_death); ;
++ scm_c_define_gsubr (s_default_on_death, 3, 0, 0, (void *) default_on_death); ;
++ scm_c_define_gsubr (s_add_cyclic_platform, 8, 0, 0, (void *) add_cyclic_platform); ;
++ scm_c_define_gsubr (s_animator, 7, 0, 0, (void *) animator); ;
++ scm_c_define_gsubr (s_set_onoff, 2, 0, 0, (void *) set_onoff); ;
++ scm_c_define_gsubr (s_animator_value, 1, 0, 0, (void *) animator_value); ;
++ scm_c_define_gsubr (s_set_animator_direction, 2, 0, 0, (void *) set_animator_direction); ;
++ scm_c_define_gsubr (s_set_animator_position, 2, 0, 0, (void *) set_animator_position); ;
++ scm_c_define_gsubr (s_day, 0, 0, 0, (void *) day); ;
++ scm_c_define_gsubr (s_night, 0, 0, 0, (void *) night); ;
++ scm_c_define_gsubr (s_fog, 0, 1, 0, (void *) fog); ;
++ scm_c_define_gsubr (s_thick_fog, 0, 0, 0, (void *) thick_fog); ;
++ scm_c_define_gsubr (s_fog_color, 3, 0, 0, (void *) fog_color); ;
++ scm_c_define_gsubr (s_set_bonus_level, 1, 0, 0, (void *) set_bonus_level); ;
++ scm_c_define_gsubr (s_set_track_name, 1, 0, 0, (void *) set_track_name); ;
++ scm_c_define_gsubr (s_set_author, 1, 0, 0, (void *) set_author); ;
++ scm_c_define_gsubr (s_start_time, 1, 0, 0, (void *) start_time); ;
++ scm_c_define_gsubr (s_set_time, 1, 0, 0, (void *) set_time); ;
++ scm_c_define_gsubr (s_get_time, 0, 0, 0, (void *) get_time); ;
++ scm_c_define_gsubr (s_add_time, 1, 0, 0, (void *) add_time); ;
++ scm_c_define_gsubr (s_set_score, 1, 0, 0, (void *) set_score); ;
++ scm_c_define_gsubr (s_get_score, 0, 0, 0, (void *) get_score); ;
++ scm_c_define_gsubr (s_add_score, 1, 0, 0, (void *) add_score); ;
++ scm_c_define_gsubr (s_set_start_position, 2, 0, 0, (void *) set_start_position); ;
++ scm_c_define_gsubr (s_snow, 1, 0, 0, (void *) snow); ;
++ scm_c_define_gsubr (s_rain, 1, 0, 0, (void *) rain); ;
++ scm_c_define_gsubr (s_difficulty, 0, 0, 0, (void *) difficulty); ;
++ scm_c_define_gsubr (s_use_grid, 1, 0, 0, (void *) use_grid); ;
++ scm_c_define_gsubr (s_map_is_transparent, 1, 0, 0, (void *) map_is_transparent); ;
++ scm_c_define_gsubr (s_jump, 1, 0, 0, (void *) jump); ;
++ scm_c_define_gsubr (s_scale_oxygen, 1, 0, 0, (void *) scale_oxygen); ;
++ scm_c_define_gsubr (s_set_cell_flag, 6, 0, 0, (void *) set_cell_flag); ;
++ scm_c_define_gsubr (s_set_cell_velocity, 6, 0, 0, (void *) set_cell_velocity); ;
++ scm_c_define_gsubr (s_set_cell_heights, 8, 1, 0, (void *) set_cell_heights); ;
++ scm_c_define_gsubr (s_set_cell_water_heights, 8, 1, 0, (void *) set_cell_water_heights); ;
++ scm_c_define_gsubr (s_set_cell_colors, 8, 1, 0, (void *) set_cell_colors); ;
++ scm_c_define_gsubr (s_set_cell_wall_colors, 8, 1, 0, (void *) set_cell_wall_colors); ;
++ scm_c_define_gsubr (s_play_effect, 1, 0, 0, (void *) play_effect); ;
++ scm_c_define_gsubr (s_camera_angle, 2, 0, 0, (void *) camera_angle); ;
++ scm_c_define_gsubr (s_restart_time, 1, 0, 0, (void *) restart_time); ;
++ scm_c_define_gsubr (s_clear_song_preferences, 0, 0, 0, (void *) clear_song_preferences); ;
++ scm_c_define_gsubr (s_force_next_song, 0, 0, 0, (void *) force_next_song); ;
++ scm_c_define_gsubr (s_set_song_preference, 2, 0, 0, (void *) set_song_preference); ;
++ scm_c_define_gsubr (s_trigger, 4, 0, 0, (void *) trigger); ;
++ scm_c_define_gsubr (s_smart_trigger, 5, 0, 0, (void *) smart_trigger); ;
++ scm_c_define_gsubr (s_on_event, 3, 0, 0, (void *) on_event); ;
++ scm_c_define_gsubr (s_get_event_callback, 2, 0, 0, (void *) get_event_callback); ;
+ s_mod_speed = scm_permanent_object (scm_c_define ("*mod-speed*", scm_long2num(0))); ;
+ s_mod_jump = scm_permanent_object (scm_c_define ("*mod-jump*", scm_long2num(1))); ;
+ s_mod_spike = scm_permanent_object (scm_c_define ("*mod-spike*", scm_long2num(2))); ;
+--- trackballs-1.1.4/src/guile.h 2007-05-17 17:09:28.000000000 +0200
++++ trackballs-1.1.4.new/src/guile.h 2011-05-18 12:46:26.197253216 +0200
+@@ -21,7 +21,6 @@
+ #ifndef GUILE_H
+ #define GUILE_H
+
+-#include <guile/gh.h>
+ #include <libguile.h>
+
+ void initGuileInterface();
+diff -up trackballs-1.1.4/share/levels/fourSeasons_2.scm~ trackballs-1.1.4/share/levels/fourSeasons_2.scm
+--- trackballs-1.1.4/share/levels/fourSeasons_2.scm~ 2004-02-08 21:21:36.000000000 +0100
++++ trackballs-1.1.4/share/levels/fourSeasons_2.scm 2011-05-18 14:40:43.959255037 +0200
+@@ -23,7 +23,7 @@
+
+
+ (if (> (difficulty) *easy*)
+- (begin
++ (let ()
+ (define enemy-1 (new-mr-black 198.5 175.5))
+ (if (= (difficulty) *hard*) (set-modtime enemy-1 *mod-spike* -1.))
+ (set-acceleration enemy-1 2.0)
+diff -up trackballs-1.1.4/share/levels/frg5.scm~ trackballs-1.1.4/share/levels/frg5.scm
+--- trackballs-1.1.4/share/levels/frg5.scm~ 2006-10-18 19:59:14.000000000 +0200
++++ trackballs-1.1.4/share/levels/frg5.scm 2011-05-18 14:47:09.175255141 +0200
+@@ -26,16 +26,11 @@
+
+ (diamond 190.0 182.0)
+
++(define speed .3)
+ (cond
+- ((= (difficulty) *easy*)
+- (define speed .4)
+- )
+- ((= (difficulty) *normal*)
+- (define speed .3)
+- )
+- ((= (difficulty) *hard*)
+- (define speed .2)
+- )
++ ((= (difficulty) *easy*) (set! speed .4))
++ ((= (difficulty) *normal*) (set! speed .3))
++ ((= (difficulty) *hard*) (set! speed .2))
+ )
+
+ (add-cyclic-platform 204 191 204 191 4.9 6.4 1. speed)
+diff -up trackballs-1.1.4/share/levels/frg9.scm~ trackballs-1.1.4/share/levels/frg9.scm
+--- trackballs-1.1.4/share/levels/frg9.scm~ 2006-10-30 21:23:38.000000000 +0100
++++ trackballs-1.1.4/share/levels/frg9.scm 2011-05-18 14:47:04.903255137 +0200
+@@ -65,16 +65,11 @@
+ (add-flag 208 219 30 0 1.5)
+ (add-flag 209 216 30 0 1.5)
+
++(define speed .4)
+ (cond
+- ((= (difficulty) *easy*)
+- (define speed .6)
+- )
+- ((= (difficulty) *normal*)
+- (define speed .4)
+- )
+- ((= (difficulty) *hard*)
+- (define speed .2)
+- )
++ ((= (difficulty) *easy*) (set! speed .6))
++ ((= (difficulty) *normal*) (set! speed .4))
++ ((= (difficulty) *hard*) (set! speed .2))
+ )
+
+ (add-cyclic-platform 220 238 220 238 3.0 5.0 1. speed)
+diff -up trackballs-1.1.4/share/levels/hxtst.scm~ trackballs-1.1.4/share/levels/hxtst.scm
+--- trackballs-1.1.4/share/levels/hxtst.scm~ 2003-03-29 23:59:44.000000000 +0100
++++ trackballs-1.1.4/share/levels/hxtst.scm 2011-05-18 14:41:57.399255057 +0200
+@@ -26,7 +26,7 @@
+
+ ;; This would create a forcefield and a switch turning it on/off
+ (if (= (difficulty) *hard*)
+- (begin
++ (let ()
+ (define ff (forcefield 251.5 250.5 0.0
+ 2.0 0.0 0.0
+ 0.5 *ff-kill*))
+diff -up trackballs-1.1.4/share/levels/lv1.scm~ trackballs-1.1.4/share/levels/lv1.scm
+--- trackballs-1.1.4/share/levels/lv1.scm~ 2007-05-25 16:58:49.000000000 +0200
++++ trackballs-1.1.4/share/levels/lv1.scm 2011-05-18 14:37:40.552254989 +0200
+@@ -39,7 +39,7 @@
+
+ ;; This creates a forcefield and a switch turning it on/off
+ (if (= (difficulty) *hard*)
+- (begin
++ (let ()
+ (define ff (forcefield 251.5 250.5 0.0
+ 2.0 0.0 0.0
+ 0.5 *ff-kill*))
+diff -up trackballs-1.1.4/src/mmad.cc~ trackballs-1.1.4/src/mmad.cc
+--- trackballs-1.1.4/src/mmad.cc~ 2011-05-18 12:58:04.000000000 +0200
++++ trackballs-1.1.4/src/mmad.cc 2011-05-18 14:54:00.999255250 +0200
+@@ -38,6 +38,7 @@ char *SHARE_DIR_DEFAULT=SHARE_DIR;
+ #include "hofMode.h"
+ #include <SDL/SDL_image.h>
+ #include <unistd.h>
++#include <stdlib.h>
+ #include <settingsMode.h>
+ #include <settings.h>
+ #include <setupMode.h>
+@@ -554,6 +555,9 @@ int main(int argc,char **argv) {
+ char guileLoadPath[256+16];/*longest effective share directory plus"GUILE_LOAD_PATH="*/
+ program_name = argv[0];
+
++ /* Disable guile deprecated warning, unless explicitly requested */
++ setenv("GUILE_WARN_DEPRECATED", "no", 0);
++
+ /*** Autmatic detection of SHARE_DIR ***/
+ effectiveShareDir[0]=0;
+ /* From environment variable */
diff --git a/games/trackballs/patches/trackballs-1.1.4-remove-old-sdl-workarounds.patch b/games/trackballs/patches/trackballs-1.1.4-remove-old-sdl-workarounds.patch
new file mode 100644
index 000000000000..21c9a58c20b5
--- /dev/null
+++ b/games/trackballs/patches/trackballs-1.1.4-remove-old-sdl-workarounds.patch
@@ -0,0 +1,117 @@
+diff -up trackballs-1.1.4/src/gameMode.cc~ trackballs-1.1.4/src/gameMode.cc
+--- trackballs-1.1.4/src/gameMode.cc~ 2006-08-06 14:01:39.000000000 +0200
++++ trackballs-1.1.4/src/gameMode.cc 2011-05-18 15:51:03.320256212 +0200
+@@ -26,9 +26,8 @@ using namespace std;
+
+ GameMode *GameMode::current;
+
+-GameMode::GameMode() { keyUpReceived=1; }
+-GameMode::~GameMode() {
+-}
++GameMode::GameMode() {}
++GameMode::~GameMode() {}
+ void GameMode::activate(GameMode* gm) {
+ if(current) current->deactivated();
+ current = gm;
+@@ -36,7 +35,6 @@ void GameMode::activate(GameMode* gm) {
+ }
+ void GameMode::display(){}
+ void GameMode::key(int){}
+-void GameMode::keyUp(int){ keyUpReceived=1; }
+ void GameMode::special(int key,int x,int y){}
+ void GameMode::idle(Real td){}
+ void GameMode::mouse(int state,int x,int y){}
+diff -up trackballs-1.1.4/src/gameMode.h~ trackballs-1.1.4/src/gameMode.h
+--- trackballs-1.1.4/src/gameMode.h~ 2006-08-06 14:01:20.000000000 +0200
++++ trackballs-1.1.4/src/gameMode.h 2011-05-18 15:49:50.760256145 +0200
+@@ -33,7 +33,6 @@ class GameMode {
+
+ virtual void display();
+ virtual void key(int);
+- virtual void keyUp(int);
+ virtual void special(int,int,int);
+ virtual void idle(Real dt);
+ virtual void doExpensiveComputations();
+@@ -44,9 +43,6 @@ class GameMode {
+
+ static void activate(GameMode*);
+ static GameMode *current;
+- protected:
+- int keyUpReceived;
+- private:
+ };
+
+ #endif
+diff -up trackballs-1.1.4/src/mainMode.cc~ trackballs-1.1.4/src/mainMode.cc
+--- trackballs-1.1.4/src/mainMode.cc~ 2007-05-25 12:23:50.000000000 +0200
++++ trackballs-1.1.4/src/mainMode.cc 2011-05-18 15:45:44.458256059 +0200
+@@ -464,11 +464,6 @@ void MainMode::activated() {
+ camFocus[1] = Game::current->map->startPosition[1] - 5;
+ time = 0.0;
+ flash = 0.0;
+-
+- /* Fix for an apparanet bug in my SDL + Xorg combination... */
+- SDL_WM_ToggleFullScreen(screen);
+- SDL_WM_ToggleFullScreen(screen);
+-
+ }
+ void MainMode::deactivated() { free(viewportData); viewportData=NULL; }
+ void MainMode::playerLoose() { Game::current->gamer->playerLoose(); gameStatus=statusGameOver; }
+diff -up trackballs-1.1.4/src/mmad.cc~ trackballs-1.1.4/src/mmad.cc
+--- trackballs-1.1.4/src/mmad.cc~ 2011-05-18 14:55:38.000000000 +0200
++++ trackballs-1.1.4/src/mmad.cc 2011-05-18 16:11:33.817256492 +0200
+@@ -411,7 +411,6 @@ void innerMain(void *closure,int argc,ch
+ /* Initialize random number generator */
+ int seed=(int) getSystemTime();
+ srand(seed);
+- int keyUpReceived=1;
+
+ while(is_running) {
+
+@@ -469,9 +468,6 @@ void innerMain(void *closure,int argc,ch
+ if(GameMode::current) GameMode::current->mouseDown(e->button,e->x,e->y);
+ break;
+ case SDL_KEYUP:
+- /* Prevent repeated keys */
+- keyUpReceived=1;
+-
+ /* Use Caps lock key to determine if mouse should be hidden+grabbed */
+ if(event.key.keysym.sym == SDLK_CAPSLOCK) {
+ if(SDL_GetModState() & KMOD_CAPS) {
+@@ -481,12 +477,12 @@ void innerMain(void *closure,int argc,ch
+ SDL_WM_GrabInput(SDL_GRAB_ON);
+ SDL_ShowCursor(SDL_DISABLE);
+ }
+- } else
+- GameMode::current->keyUp(event.key.keysym.sym);
++ }
++ break;
+ case SDL_KEYDOWN:
+-
+ /* Always quit if the 'q' key is pressed */
+- if(event.key.keysym.sym == 'q' && SDL_GetModState() & KMOD_CTRL) exit(0);
++ if(event.key.keysym.sym == 'q' && SDL_GetModState() & KMOD_CTRL)
++ exit(0);
+
+ /* Change between fullscreen/windowed mode if the 'f' key
+ is pressed */
+@@ -525,14 +521,13 @@ void innerMain(void *closure,int argc,ch
+ ((EditMode*)GameMode::current)->askQuit();
+ } else if((GameMode::current && GameMode::current == MenuMode::menuMode))
+ is_running=0;
+- else { GameMode::activate(MenuMode::menuMode); while(SDL_PollEvent(&event)) {} }
+-
++ else {
++ GameMode::activate(MenuMode::menuMode);
++ while(SDL_PollEvent(&event)) {}
++ }
+ }
+- else if(GameMode::current) {
+- /* Prevent repeated keys */
+- if(!keyUpReceived) break;
+- keyUpReceived=0;
+
++ else if(GameMode::current) {
+ GameMode::current->key(event.key.keysym.sym);
+ }
+
diff --git a/games/trackballs/trackballs.SlackBuild b/games/trackballs/trackballs.SlackBuild
index 2be097e49692..4dfee298a716 100644
--- a/games/trackballs/trackballs.SlackBuild
+++ b/games/trackballs/trackballs.SlackBuild
@@ -8,7 +8,7 @@
PRGNAM=trackballs
VERSION=${VERSION:-1.1.4}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
@@ -58,6 +58,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Apply two patches from redhat: one to fix building and running with guile-2.0.x,
+# another to fix "Esc" behaviour
+for i in $CWD/patches/* ; do patch -p1 < $i ; done
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \