parent
a847823411
commit
f2eaab6e43
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash ../install.sh
|
||||
|
||||
NAME='tuxracer'
|
||||
VERSION='0.61'
|
||||
DOWNLOAD_URL="http://download.sourceforge.net/tuxracer/tuxracer-$VERSION.tar.gz#a311d09080598fe556134d4b9faed7dc0c2ed956ebb10d062e5d4df022f91eff"
|
||||
DEPENDENCIES=('tcl' 'mesa' 'glu' 'sdl12-compat')
|
||||
CONFIGURE_OPTIONS=(
|
||||
'--with-data-dir=/usr/share/tuxracer'
|
||||
"--with-sdl-prefix=$BANAN_SYSROOT/usr"
|
||||
'--without-gl-libs'
|
||||
'--with-tcl-lib-name=tcl8.6'
|
||||
'--without-x'
|
||||
)
|
||||
|
||||
post_install() {
|
||||
pushd ..
|
||||
|
||||
if [ ! -f "tuxracer-data-$VERSION.tar.gz" ]; then
|
||||
wget "http://download.sourceforge.net/tuxracer/tuxracer-data-$VERSION.tar.gz" || exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "tuxracer-data-$VERSION" ]; then
|
||||
tar xf "tuxracer-data-$VERSION.tar.gz" || exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$BANAN_SYSROOT/usr/share/tuxracer" || exit 1
|
||||
cp -r "tuxracer-data-$VERSION"/* "$BANAN_SYSROOT/usr/share/tuxracer/" || exit 1
|
||||
find "$BANAN_SYSROOT/usr/share/tuxracer" -type f -exec chmod 644 {} +
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
export CFLAGS="-std=c99 -Wno-implicit-int -Wno-incompatible-pointer-types $CFLAGS"
|
||||
export ac_cv_func_isnan=yes
|
|
@ -0,0 +1,56 @@
|
|||
diff -ruN tuxracer-0.61/src/game_config.c tuxracer-0.61-banan_os/src/game_config.c
|
||||
--- tuxracer-0.61/src/game_config.c 2001-01-30 22:04:43.000000000 +0200
|
||||
+++ tuxracer-0.61-banan_os/src/game_config.c 2025-06-26 03:13:06.859798526 +0300
|
||||
@@ -114,26 +114,26 @@
|
||||
*/
|
||||
|
||||
#define INIT_PARAM( nam, val, typename, commnt ) \
|
||||
- Params. ## nam ## .loaded = False; \
|
||||
- Params. ## nam ## .name = #nam; \
|
||||
- Params. ## nam ## .deflt. ## typename ## _val = val; \
|
||||
- Params. ## nam ## .comment = commnt;
|
||||
+ Params.nam.loaded = False; \
|
||||
+ Params.nam.name = #nam; \
|
||||
+ Params.nam.deflt.typename ## _val = val; \
|
||||
+ Params.nam.comment = commnt;
|
||||
|
||||
#define INIT_PARAM_STRING( nam, val, commnt ) \
|
||||
INIT_PARAM( nam, val, string, commnt ); \
|
||||
- Params. ## nam ## .type = PARAM_STRING;
|
||||
+ Params.nam.type = PARAM_STRING;
|
||||
|
||||
#define INIT_PARAM_CHAR( nam, val, commnt ) \
|
||||
INIT_PARAM( nam, val, char, commnt ); \
|
||||
- Params. ## nam ## .type = PARAM_CHAR;
|
||||
+ Params.nam.type = PARAM_CHAR;
|
||||
|
||||
#define INIT_PARAM_INT( nam, val, commnt ) \
|
||||
INIT_PARAM( nam, val, int, commnt ); \
|
||||
- Params. ## nam ## .type = PARAM_INT;
|
||||
+ Params.nam.type = PARAM_INT;
|
||||
|
||||
#define INIT_PARAM_BOOL( nam, val, commnt ) \
|
||||
INIT_PARAM( nam, val, bool, commnt ); \
|
||||
- Params. ## nam ## .type = PARAM_BOOL;
|
||||
+ Params.nam.type = PARAM_BOOL;
|
||||
|
||||
|
||||
/*
|
||||
@@ -310,13 +310,13 @@
|
||||
*/
|
||||
#define FN_PARAM( name, typename, type ) \
|
||||
type getparam_ ## name() { \
|
||||
- if ( !Params. ## name ## .loaded ) { \
|
||||
- fetch_param_ ## typename( &( Params. ## name ) ); \
|
||||
+ if ( !Params.name.loaded ) { \
|
||||
+ fetch_param_ ## typename( &( Params.name ) ); \
|
||||
} \
|
||||
- return Params. ## name ## .val. ## typename ## _val; \
|
||||
+ return Params.name.val.typename ## _val; \
|
||||
} \
|
||||
void setparam_ ## name( type val) { \
|
||||
- set_param_ ## typename( &( Params. ## name ), val ); }
|
||||
+ set_param_ ## typename( &( Params.name ), val ); }
|
||||
|
||||
#define FN_PARAM_STRING( name ) \
|
||||
FN_PARAM( name, string, char* )
|
|
@ -0,0 +1,19 @@
|
|||
diff -ruN tuxracer-0.61/src/debug.c tuxracer-0.61-banan_os/src/debug.c
|
||||
--- tuxracer-0.61/src/debug.c 2001-01-14 00:09:50.000000000 +0200
|
||||
+++ tuxracer-0.61-banan_os/src/debug.c 2025-06-26 03:18:02.090898960 +0300
|
||||
@@ -165,6 +165,7 @@
|
||||
/* Redirect stderr to file; taken from SDL_main.c, which is in the
|
||||
public domain */
|
||||
newfp = freopen(BUGREPORT_FILE, "w", stderr);
|
||||
+#if !defined(__banan_os__)
|
||||
if ( newfp == NULL ) { /* This happens on NT */
|
||||
#if !defined(stderr)
|
||||
stderr = fopen(BUGREPORT_FILE, "w");
|
||||
@@ -175,6 +176,7 @@
|
||||
}
|
||||
#endif
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Write bug report header */
|
||||
fprintf( stderr, "Tux Racer Diagnostic Log\n\n" );
|
|
@ -0,0 +1,12 @@
|
|||
diff -ruN tuxracer-0.61/src/game_config.c tuxracer-0.61-banan_os/src/game_config.c
|
||||
--- tuxracer-0.61/src/game_config.c 2001-01-30 22:04:43.000000000 +0200
|
||||
+++ tuxracer-0.61-banan_os/src/game_config.c 2025-06-26 04:03:28.015311092 +0300
|
||||
@@ -505,7 +505,7 @@
|
||||
"# decreasing this number, at the cost of lower image quality." );
|
||||
|
||||
INIT_PARAM_BOOL(
|
||||
- fullscreen, True,
|
||||
+ fullscreen, False,
|
||||
"# If true then the game will run in full-screen mode." );
|
||||
|
||||
INIT_PARAM_INT(
|
|
@ -0,0 +1,15 @@
|
|||
diff -ruN tuxracer-0.61/src/winsys.c tuxracer-0.61-banan_os/src/winsys.c
|
||||
--- tuxracer-0.61/src/winsys.c 2001-01-14 00:09:51.000000000 +0200
|
||||
+++ tuxracer-0.61-banan_os/src/winsys.c 2025-06-26 04:05:10.894824478 +0300
|
||||
@@ -392,6 +392,11 @@
|
||||
}
|
||||
|
||||
break;
|
||||
+
|
||||
+ case SDL_QUIT:
|
||||
+ winsys_exit(0);
|
||||
+
|
||||
+ break;
|
||||
}
|
||||
|
||||
SDL_LockAudio();
|
Loading…
Reference in New Issue