From 4e979feb6e1efc812a694249f409d91d8031106c Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 16 May 2022 23:53:17 +0430 Subject: [PATCH] Ports: Update tuxracer's patches to use git patches --- ...tch => 0001-Explicitly-link-in-SDL2.patch} | 25 ++++-- ...bag-of-random-changes-to-the-source.patch} | 82 ++++++++++++------- Ports/tuxracer/patches/ReadMe.md | 14 ++++ 3 files changed, 85 insertions(+), 36 deletions(-) rename Ports/tuxracer/patches/{configure.patch => 0001-Explicitly-link-in-SDL2.patch} (54%) rename Ports/tuxracer/patches/{source.patch => 0002-Big-bag-of-random-changes-to-the-source.patch} (80%) create mode 100644 Ports/tuxracer/patches/ReadMe.md diff --git a/Ports/tuxracer/patches/configure.patch b/Ports/tuxracer/patches/0001-Explicitly-link-in-SDL2.patch similarity index 54% rename from Ports/tuxracer/patches/configure.patch rename to Ports/tuxracer/patches/0001-Explicitly-link-in-SDL2.patch index d6e803788d..bf01fd5863 100644 --- a/Ports/tuxracer/patches/configure.patch +++ b/Ports/tuxracer/patches/0001-Explicitly-link-in-SDL2.patch @@ -1,6 +1,18 @@ ---- tuxracer-0.61-original/configure 2021-12-23 14:26:17.978567580 +0000 -+++ tuxracer-0.61/configure 2021-12-24 12:12:08.718881004 +0000 -@@ -1674,7 +1674,7 @@ +From b00365ebd72508d88bc31da63b56230ed23a5c1d Mon Sep 17 00:00:00 2001 +From: Jelle Raaijmakers +Date: Fri, 24 Dec 2021 15:24:16 +0100 +Subject: [PATCH 1/2] Explicitly link in SDL2 + +Also pretend that isnan() works correctly. +--- + configure | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index 20d409b..e4de165 100755 +--- a/configure ++++ b/configure +@@ -1674,7 +1674,7 @@ $ac_func(); ; return 0; } EOF @@ -9,7 +21,7 @@ rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else -@@ -3415,7 +3415,7 @@ +@@ -3417,7 +3417,7 @@ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" @@ -18,7 +30,7 @@ cat > conftest.$ac_ext < +Date: Tue, 28 Dec 2021 00:15:59 +0100 +Subject: [PATCH 2/2] Big bag of random changes to the source + +FIXME: Split this up sensibly +--- + src/game_config.c | 26 +++++++++---------- + src/keyboard.c | 66 ++++++++++++++++++++++++++--------------------- + src/winsys.c | 45 +++++++++++++++----------------- + src/winsys.h | 28 ++++++++++---------- + 4 files changed, 85 insertions(+), 80 deletions(-) + +diff --git a/src/game_config.c b/src/game_config.c +index f12bb2d..35b6036 100644 +--- a/src/game_config.c ++++ b/src/game_config.c +@@ -114,26 +114,26 @@ struct param { */ #define INIT_PARAM( nam, val, typename, commnt ) \ @@ -36,7 +50,7 @@ diff -ur tuxracer-0.61-original/src/game_config.c tuxracer-0.61/src/game_config. /* -@@ -310,13 +310,13 @@ +@@ -310,13 +310,13 @@ void set_param_bool( struct param *p, bool_t new_val ) */ #define FN_PARAM( name, typename, type ) \ type getparam_ ## name() { \ @@ -54,7 +68,7 @@ diff -ur tuxracer-0.61-original/src/game_config.c tuxracer-0.61/src/game_config. #define FN_PARAM_STRING( name ) \ FN_PARAM( name, string, char* ) -@@ -505,7 +505,7 @@ +@@ -505,7 +505,7 @@ void init_game_configuration() "# decreasing this number, at the cost of lower image quality." ); INIT_PARAM_BOOL( @@ -63,9 +77,10 @@ diff -ur tuxracer-0.61-original/src/game_config.c tuxracer-0.61/src/game_config. "# If true then the game will run in full-screen mode." ); INIT_PARAM_INT( -diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c ---- tuxracer-0.61-original/src/keyboard.c 2001-01-13 22:09:51.000000000 +0000 -+++ tuxracer-0.61/src/keyboard.c 2021-12-26 13:41:33.341076372 +0000 +diff --git a/src/keyboard.c b/src/keyboard.c +index d2b01ed..b0d38f5 100644 +--- a/src/keyboard.c ++++ b/src/keyboard.c @@ -23,11 +23,17 @@ #include "loop.h" @@ -88,7 +103,7 @@ diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c static keymap_t keymap[KEYMAP_SIZE]; static int num_keymap_entries = 0; -@@ -50,19 +56,6 @@ +@@ -50,19 +56,6 @@ int add_keymap_entry( game_mode_t mode, keymap_class_t keymap_class, return 0; /* success */ } @@ -108,7 +123,7 @@ diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c static int insert_keytable_entries( char *keys, key_cb_t callback ) { key_desc_t *key_list; -@@ -74,9 +67,13 @@ +@@ -74,9 +67,13 @@ static int insert_keytable_entries( char *keys, key_cb_t callback ) if ( num_keys > 0 ) { for ( i=0; i