mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
Ports: Update tuxracer's patches to use git patches
This commit is contained in:
parent
624c3c5a46
commit
4e979feb6e
3 changed files with 85 additions and 36 deletions
|
@ -1,6 +1,18 @@
|
||||||
--- tuxracer-0.61-original/configure 2021-12-23 14:26:17.978567580 +0000
|
From b00365ebd72508d88bc31da63b56230ed23a5c1d Mon Sep 17 00:00:00 2001
|
||||||
+++ tuxracer-0.61/configure 2021-12-24 12:12:08.718881004 +0000
|
From: Jelle Raaijmakers <jelle@gmta.nl>
|
||||||
@@ -1674,7 +1674,7 @@
|
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; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
|
@ -9,7 +21,7 @@
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
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
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
|
@ -18,7 +30,7 @@
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 3423 "configure"
|
#line 3423 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
@@ -3452,7 +3452,7 @@
|
@@ -3454,7 +3454,7 @@ fi
|
||||||
|
|
||||||
if test "x$have_SDL_mixer" = "xyes" ; then
|
if test "x$have_SDL_mixer" = "xyes" ; then
|
||||||
TR_CPPFLAGS="$TR_CPPFLAGS -DHAVE_SDL_MIXER=1"
|
TR_CPPFLAGS="$TR_CPPFLAGS -DHAVE_SDL_MIXER=1"
|
||||||
|
@ -27,3 +39,6 @@
|
||||||
else
|
else
|
||||||
echo "*** SDL_mixer not found. Configuring without audio support."
|
echo "*** SDL_mixer not found. Configuring without audio support."
|
||||||
fi
|
fi
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
|
@ -1,7 +1,21 @@
|
||||||
diff -ur tuxracer-0.61-original/src/game_config.c tuxracer-0.61/src/game_config.c
|
From 04c10bd91f64e3cbbcd827fc439ef8018473bcc9 Mon Sep 17 00:00:00 2001
|
||||||
--- tuxracer-0.61-original/src/game_config.c 2001-01-30 20:04:43.000000000 +0000
|
From: Jelle Raaijmakers <jelle@gmta.nl>
|
||||||
+++ tuxracer-0.61/src/game_config.c 2021-12-26 13:41:33.341076372 +0000
|
Date: Tue, 28 Dec 2021 00:15:59 +0100
|
||||||
@@ -114,26 +114,26 @@
|
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 ) \
|
#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 ) \
|
#define FN_PARAM( name, typename, type ) \
|
||||||
type getparam_ ## name() { \
|
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 ) \
|
#define FN_PARAM_STRING( name ) \
|
||||||
FN_PARAM( name, string, char* )
|
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." );
|
"# decreasing this number, at the cost of lower image quality." );
|
||||||
|
|
||||||
INIT_PARAM_BOOL(
|
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." );
|
"# If true then the game will run in full-screen mode." );
|
||||||
|
|
||||||
INIT_PARAM_INT(
|
INIT_PARAM_INT(
|
||||||
diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c
|
diff --git a/src/keyboard.c b/src/keyboard.c
|
||||||
--- tuxracer-0.61-original/src/keyboard.c 2001-01-13 22:09:51.000000000 +0000
|
index d2b01ed..b0d38f5 100644
|
||||||
+++ tuxracer-0.61/src/keyboard.c 2021-12-26 13:41:33.341076372 +0000
|
--- a/src/keyboard.c
|
||||||
|
+++ b/src/keyboard.c
|
||||||
@@ -23,11 +23,17 @@
|
@@ -23,11 +23,17 @@
|
||||||
#include "loop.h"
|
#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 keymap_t keymap[KEYMAP_SIZE];
|
||||||
static int num_keymap_entries = 0;
|
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 */
|
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 )
|
static int insert_keytable_entries( char *keys, key_cb_t callback )
|
||||||
{
|
{
|
||||||
key_desc_t *key_list;
|
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 ) {
|
if ( num_keys > 0 ) {
|
||||||
for ( i=0; i<num_keys; i++ ) {
|
for ( i=0; i<num_keys; i++ ) {
|
||||||
if ( key_list[i].special ) {
|
if ( key_list[i].special ) {
|
||||||
|
@ -124,7 +139,7 @@ diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,15 +89,14 @@
|
@@ -92,15 +89,14 @@ static void init_keytable( game_mode_t mode )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *keys;
|
char *keys;
|
||||||
|
@ -142,7 +157,7 @@ diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle other classes */
|
/* Handle other classes */
|
||||||
@@ -155,7 +151,9 @@
|
@@ -155,7 +151,9 @@ static void keyboard_handler( unsigned int key, bool_t special,
|
||||||
bool_t release, int x, int y )
|
bool_t release, int x, int y )
|
||||||
{
|
{
|
||||||
static game_mode_t last_mode = NO_MODE;
|
static game_mode_t last_mode = NO_MODE;
|
||||||
|
@ -153,7 +168,7 @@ diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c
|
||||||
|
|
||||||
if ( is_mode_change_pending() ) {
|
if ( is_mode_change_pending() ) {
|
||||||
/* Don't process keyboard events until the mode change happens */
|
/* Don't process keyboard events until the mode change happens */
|
||||||
@@ -168,18 +166,28 @@
|
@@ -168,18 +166,28 @@ static void keyboard_handler( unsigned int key, bool_t special,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( special ) {
|
if ( special ) {
|
||||||
|
@ -188,9 +203,10 @@ diff -ur tuxracer-0.61-original/src/keyboard.c tuxracer-0.61/src/keyboard.c
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_keyboard()
|
void init_keyboard()
|
||||||
diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
diff --git a/src/winsys.c b/src/winsys.c
|
||||||
--- tuxracer-0.61-original/src/winsys.c 2001-01-13 22:09:51.000000000 +0000
|
index d932a1d..636d8f2 100644
|
||||||
+++ tuxracer-0.61/src/winsys.c 2021-12-27 23:10:37.344295969 +0000
|
--- a/src/winsys.c
|
||||||
|
+++ b/src/winsys.c
|
||||||
@@ -36,7 +36,8 @@
|
@@ -36,7 +36,8 @@
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -201,7 +217,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
|
|
||||||
static winsys_display_func_t display_func = NULL;
|
static winsys_display_func_t display_func = NULL;
|
||||||
static winsys_idle_func_t idle_func = NULL;
|
static winsys_idle_func_t idle_func = NULL;
|
||||||
@@ -164,7 +165,7 @@
|
@@ -164,7 +165,7 @@ void winsys_set_passive_motion_func( winsys_motion_func_t func )
|
||||||
*/
|
*/
|
||||||
void winsys_swap_buffers()
|
void winsys_swap_buffers()
|
||||||
{
|
{
|
||||||
|
@ -210,7 +226,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -177,7 +178,7 @@
|
@@ -177,7 +178,7 @@ void winsys_swap_buffers()
|
||||||
*/
|
*/
|
||||||
void winsys_warp_pointer( int x, int y )
|
void winsys_warp_pointer( int x, int y )
|
||||||
{
|
{
|
||||||
|
@ -219,7 +235,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -190,14 +191,14 @@
|
@@ -190,14 +191,14 @@ void winsys_warp_pointer( int x, int y )
|
||||||
*/
|
*/
|
||||||
static void setup_sdl_video_mode()
|
static void setup_sdl_video_mode()
|
||||||
{
|
{
|
||||||
|
@ -237,7 +253,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( getparam_bpp_mode() ) {
|
switch ( getparam_bpp_mode() ) {
|
||||||
@@ -224,12 +225,16 @@
|
@@ -224,12 +225,16 @@ static void setup_sdl_video_mode()
|
||||||
width = getparam_x_resolution();
|
width = getparam_x_resolution();
|
||||||
height = getparam_y_resolution();
|
height = getparam_y_resolution();
|
||||||
|
|
||||||
|
@ -255,7 +271,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -266,8 +271,7 @@
|
@@ -266,8 +271,7 @@ void winsys_init( int *argc, char **argv, char *window_title,
|
||||||
|
|
||||||
setup_sdl_video_mode();
|
setup_sdl_video_mode();
|
||||||
|
|
||||||
|
@ -265,7 +281,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -280,6 +284,7 @@
|
@@ -280,6 +284,7 @@ void winsys_init( int *argc, char **argv, char *window_title,
|
||||||
*/
|
*/
|
||||||
void winsys_shutdown()
|
void winsys_shutdown()
|
||||||
{
|
{
|
||||||
|
@ -273,7 +289,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,12 +298,6 @@
|
@@ -293,12 +298,6 @@ void winsys_shutdown()
|
||||||
*/
|
*/
|
||||||
void winsys_enable_key_repeat( bool_t enabled )
|
void winsys_enable_key_repeat( bool_t enabled )
|
||||||
{
|
{
|
||||||
|
@ -286,7 +302,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -330,9 +329,6 @@
|
@@ -330,9 +329,6 @@ void winsys_process_events()
|
||||||
|
|
||||||
while (True) {
|
while (True) {
|
||||||
|
|
||||||
|
@ -296,7 +312,7 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
while ( SDL_PollEvent( &event ) ) {
|
while ( SDL_PollEvent( &event ) ) {
|
||||||
|
|
||||||
switch ( event.type ) {
|
switch ( event.type ) {
|
||||||
@@ -384,18 +380,19 @@
|
@@ -384,18 +380,19 @@ void winsys_process_events()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -322,10 +338,11 @@ diff -ur tuxracer-0.61-original/src/winsys.c tuxracer-0.61/src/winsys.c
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( redisplay && display_func ) {
|
if ( redisplay && display_func ) {
|
||||||
diff -ur tuxracer-0.61-original/src/winsys.h tuxracer-0.61/src/winsys.h
|
diff --git a/src/winsys.h b/src/winsys.h
|
||||||
--- tuxracer-0.61-original/src/winsys.h 2001-01-13 22:09:51.000000000 +0000
|
index 4a51f8d..1cf7ca9 100644
|
||||||
+++ tuxracer-0.61/src/winsys.h 2021-12-26 13:41:33.341076372 +0000
|
--- a/src/winsys.h
|
||||||
@@ -48,16 +48,16 @@
|
+++ b/src/winsys.h
|
||||||
|
@@ -48,16 +48,16 @@ typedef enum {
|
||||||
WSK_NOT_AVAIL = SDLK_UNKNOWN,
|
WSK_NOT_AVAIL = SDLK_UNKNOWN,
|
||||||
|
|
||||||
/* Numeric keypad */
|
/* Numeric keypad */
|
||||||
|
@ -352,7 +369,7 @@ diff -ur tuxracer-0.61-original/src/winsys.h tuxracer-0.61/src/winsys.h
|
||||||
WSK_KP_PERIOD = SDLK_KP_PERIOD,
|
WSK_KP_PERIOD = SDLK_KP_PERIOD,
|
||||||
WSK_KP_DIVIDE = SDLK_KP_DIVIDE,
|
WSK_KP_DIVIDE = SDLK_KP_DIVIDE,
|
||||||
WSK_KP_MULTIPLY = SDLK_KP_MULTIPLY,
|
WSK_KP_MULTIPLY = SDLK_KP_MULTIPLY,
|
||||||
@@ -95,17 +95,17 @@
|
@@ -95,17 +95,17 @@ typedef enum {
|
||||||
WSK_F15 = SDLK_F15,
|
WSK_F15 = SDLK_F15,
|
||||||
|
|
||||||
/* Key state modifier keys */
|
/* Key state modifier keys */
|
||||||
|
@ -374,3 +391,6 @@ diff -ur tuxracer-0.61-original/src/winsys.h tuxracer-0.61/src/winsys.h
|
||||||
|
|
||||||
WSK_LAST
|
WSK_LAST
|
||||||
|
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
14
Ports/tuxracer/patches/ReadMe.md
Normal file
14
Ports/tuxracer/patches/ReadMe.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Patches for tuxracer on SerenityOS
|
||||||
|
|
||||||
|
## `0001-Explicitly-link-in-SDL2.patch`
|
||||||
|
|
||||||
|
Explicitly link in SDL2
|
||||||
|
|
||||||
|
Also pretend that isnan() works correctly.
|
||||||
|
|
||||||
|
## `0002-Big-bag-of-random-changes-to-the-source.patch`
|
||||||
|
|
||||||
|
Big bag of random changes to the source
|
||||||
|
|
||||||
|
FIXME: Split this up sensibly
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue