mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
tuxracer, revbump enable for 64bit, 32bit secondary architecture, enable sound, fix save/options path (#8897)
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
--- tuxracer-0.61/src/game_config.c.org 2016-04-26 17:44:17.903086080 +0200
|
||||
+++ tuxracer-0.61/src/game_config.c 2016-04-26 17:44:05.612892672 +0200
|
||||
@@ -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(
|
||||
--- tuxracer-0.61/src/main.c.org 2016-04-26 22:09:04.763887616 +0200
|
||||
+++ tuxracer-0.61/src/main.c 2016-04-26 22:08:49.627572736 +0200
|
||||
@@ -56,6 +56,11 @@
|
||||
#include "loading.h"
|
||||
#include "tcl_util.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <unistd.h>
|
||||
+#include <libgen.h>
|
||||
+#endif
|
||||
+
|
||||
#define WINDOW_TITLE "Tux Racer " VERSION
|
||||
|
||||
#define GAME_INIT_SCRIPT "tuxracer_init.tcl"
|
||||
@@ -122,6 +127,7 @@
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
+ chdir(dirname(argv[0]));
|
||||
/* Print copyright notice */
|
||||
fprintf( stderr, "Tux Racer " VERSION " -- a Sunspire Studios Production "
|
||||
"(http://www.sunspirestudios.com)\n"
|
||||
162
games-action/tuxracer/patches/tuxracer-0.61.patchset
Normal file
162
games-action/tuxracer/patches/tuxracer-0.61.patchset
Normal file
@@ -0,0 +1,162 @@
|
||||
From fdf87ba4f9d682a128aad3160ff1fae27727b5f1 Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Wed, 28 Jun 2023 19:31:06 +0000
|
||||
Subject: applying patch tuxracer-0.61.patch
|
||||
|
||||
|
||||
diff --git a/src/game_config.c b/src/game_config.c
|
||||
index f12bb2d..e66bfe5 100644
|
||||
--- a/src/game_config.c
|
||||
+++ b/src/game_config.c
|
||||
@@ -505,7 +505,7 @@ void init_game_configuration()
|
||||
"# 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(
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index cfa7f92..91c93ac 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -56,6 +56,11 @@
|
||||
#include "loading.h"
|
||||
#include "tcl_util.h"
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#include <unistd.h>
|
||||
+#include <libgen.h>
|
||||
+#endif
|
||||
+
|
||||
#define WINDOW_TITLE "Tux Racer " VERSION
|
||||
|
||||
#define GAME_INIT_SCRIPT "tuxracer_init.tcl"
|
||||
@@ -122,6 +127,7 @@ void read_game_init_script()
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
+ chdir(dirname(argv[0]));
|
||||
/* Print copyright notice */
|
||||
fprintf( stderr, "Tux Racer " VERSION " -- a Sunspire Studios Production "
|
||||
"(http://www.sunspirestudios.com)\n"
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From c097a4e51f0609ceb08206604ff8e0b0bdf54a53 Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Wed, 28 Jun 2023 19:31:06 +0000
|
||||
Subject: applying patch tuxracer-0.61-gcc33.patch
|
||||
|
||||
|
||||
diff --git a/src/game_config.c b/src/game_config.c
|
||||
index e66bfe5..c29c3d0 100644
|
||||
--- a/src/game_config.c
|
||||
+++ b/src/game_config.c
|
||||
@@ -114,27 +114,26 @@ struct param {
|
||||
*/
|
||||
|
||||
#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;
|
||||
+ INIT_PARAM( nam, val, string, commnt ); \
|
||||
+ Params. nam .type = PARAM_STRING;
|
||||
|
||||
#define INIT_PARAM_CHAR( nam, val, commnt ) \
|
||||
- INIT_PARAM( nam, val, char, commnt ); \
|
||||
- Params. ## nam ## .type = PARAM_CHAR;
|
||||
+ INIT_PARAM( nam, val, char, commnt ); \
|
||||
+ Params. nam .type = PARAM_CHAR;
|
||||
|
||||
#define INIT_PARAM_INT( nam, val, commnt ) \
|
||||
- INIT_PARAM( nam, val, int, commnt ); \
|
||||
- Params. ## nam ## .type = PARAM_INT;
|
||||
+ INIT_PARAM( nam, val, int, commnt ); \
|
||||
+ Params. nam .type = PARAM_INT;
|
||||
|
||||
#define INIT_PARAM_BOOL( nam, val, commnt ) \
|
||||
- INIT_PARAM( nam, val, bool, commnt ); \
|
||||
- Params. ## nam ## .type = PARAM_BOOL;
|
||||
-
|
||||
+ INIT_PARAM( nam, val, bool, commnt ); \
|
||||
+ Params. nam .type = PARAM_BOOL;
|
||||
|
||||
/*
|
||||
* These functions are used to get and set parameter values
|
||||
@@ -309,26 +308,26 @@ void set_param_bool( struct param *p, bool_t new_val )
|
||||
* Creates set/get functions for each parameter
|
||||
*/
|
||||
#define FN_PARAM( name, typename, type ) \
|
||||
- type getparam_ ## name() { \
|
||||
- if ( !Params. ## name ## .loaded ) { \
|
||||
- fetch_param_ ## typename( &( Params. ## name ) ); \
|
||||
- } \
|
||||
- return Params. ## name ## .val. ## typename ## _val; \
|
||||
- } \
|
||||
- void setparam_ ## name( type val) { \
|
||||
- set_param_ ## typename( &( Params. ## name ), val ); }
|
||||
+ type getparam_ ## name() { \
|
||||
+ if ( !Params. name .loaded ) { \
|
||||
+ fetch_param_ ## typename( &( Params. name ) ); \
|
||||
+ } \
|
||||
+ return Params. name .val. typename ## _val; \
|
||||
+ } \
|
||||
+ void setparam_ ## name( type val) { \
|
||||
+ set_param_ ## typename( &( Params. name ), val ); }
|
||||
|
||||
#define FN_PARAM_STRING( name ) \
|
||||
- FN_PARAM( name, string, char* )
|
||||
+ FN_PARAM( name, string, char* )
|
||||
|
||||
#define FN_PARAM_CHAR( name ) \
|
||||
- FN_PARAM( name, char, char )
|
||||
+ FN_PARAM( name, char, char )
|
||||
|
||||
#define FN_PARAM_INT( name ) \
|
||||
- FN_PARAM( name, int, int )
|
||||
+ FN_PARAM( name, int, int )
|
||||
|
||||
#define FN_PARAM_BOOL( name ) \
|
||||
- FN_PARAM( name, bool, bool_t )
|
||||
+ FN_PARAM( name, bool, bool_t )
|
||||
|
||||
|
||||
/*
|
||||
--
|
||||
2.37.3
|
||||
|
||||
|
||||
From a64b5895ff5a69ba56c949fc36d14dbb70e5e654 Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Wed, 28 Jun 2023 19:31:31 +0000
|
||||
Subject: Fix save/options path
|
||||
|
||||
|
||||
diff --git a/src/game_config.c b/src/game_config.c
|
||||
index c29c3d0..610ccc4 100644
|
||||
--- a/src/game_config.c
|
||||
+++ b/src/game_config.c
|
||||
@@ -71,7 +71,7 @@
|
||||
# define CONFIG_DIR "config"
|
||||
# define CONFIG_FILE "options.txt"
|
||||
#else
|
||||
-# define CONFIG_DIR ".tuxracer"
|
||||
+# define CONFIG_DIR "config/settings/TuxRacer"
|
||||
# define CONFIG_FILE "options"
|
||||
#endif /* defined( WIN32 ) */
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -6,50 +6,55 @@ the ability to race courses in fog, at night, and under high winds."
|
||||
HOMEPAGE="http://tuxracer.sourceforge.net"
|
||||
COPYRIGHT="1999-2001 Jasmin F. Patry"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="4"
|
||||
REVISION="5"
|
||||
SOURCE_URI="http://download.sourceforge.net/tuxracer/tuxracer-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="a311d09080598fe556134d4b9faed7dc0c2ed956ebb10d062e5d4df022f91eff"
|
||||
PATCHES="tuxracer-$portVersion.patch"
|
||||
PATCHES="tuxracer-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!all x86_gcc2 ?x86"
|
||||
ARCHITECTURES="!all x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
tuxracer = portVersion
|
||||
tuxracer$secondaryArchSuffix = portVersion
|
||||
app:TuxRacer = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
haiku$secondaryArchSuffix
|
||||
tuxracer_data
|
||||
lib:libGL
|
||||
lib:libGLU
|
||||
lib:libSDL_1.2
|
||||
lib:libtcl8.6 #tcl version in the recipe has to be set to >=8.0 instead of >=8.6
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libGLU$secondaryArchSuffix
|
||||
lib:libSDL_1.2$secondaryArchSuffix
|
||||
lib:libSDL_mixer_1.2$secondaryArchSuffix
|
||||
lib:libtcl8.6$secondaryArchSuffix #tcl version in the recipe has to be set to >=8.0 instead of >=8.6
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
devel:libGL
|
||||
devel:libGLU
|
||||
devel:libSDL
|
||||
devel:libtclstub8.6
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libGLU$secondaryArchSuffix
|
||||
devel:libSDL_1.2$secondaryArchSuffix
|
||||
devel:libSDL_mixer_1.2$secondaryArchSuffix
|
||||
devel:libtclstub8.6$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc
|
||||
cmd:libtoolize
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
libtoolize -fci
|
||||
./configure --prefix=$appsDir/TuxRacer --datadir=$appsDir/TuxRacer/data \
|
||||
--with-data-dir=$appsDir/TuxRacer/data --with-tcl-lib-name=tcl8.6
|
||||
./configure --prefix=$appsDir/TuxRacer \
|
||||
--datadir=$appsDir/TuxRacer/data \
|
||||
--with-data-dir=$appsDir/TuxRacer/data \
|
||||
--with-tcl-lib-name=tcl8.6
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
#install the date files first before installing TuxRacer
|
||||
#install the data files first before installing TuxRacer
|
||||
mkdir -p $appsDir/TuxRacer
|
||||
make install
|
||||
mv $appsDir/TuxRacer/bin/tuxracer $appsDir/TuxRacer/TuxRacer
|
||||
|
||||
Reference in New Issue
Block a user