rebuilt with libtcl 8.6 [release 0.61-4mamba;Tue Jul 02 2013]

This commit is contained in:
Silvan Calarco 2024-01-05 18:45:18 +01:00
parent 815b738691
commit f23d76c1ac
8 changed files with 329 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# tuxracer
Tux Racer is a simple OpenGL-based racing game featuring Tux.
The object of the game is to slide down a snow- and ice-covered mountain as quickly as possible, avoiding the trees and rocks that will slow you down.

13
tuxracer-0.60.1-GL.patch Normal file
View File

@ -0,0 +1,13 @@
--- tuxracer-0.60.1/src/gl_util.h.GL Tue Oct 3 09:34:14 2000
+++ tuxracer-0.60.1/src/gl_util.h Mon Oct 9 06:23:38 2000
@@ -51,6 +51,10 @@
* count on that... */
#include <GL/glext.h>
+#ifdef GL_GLEXT_VERSION_EXT
+#define GL_GLEXT_VERSION GL_GLEXT_VERSION_EXT
+#endif
+
#if !defined(GL_GLEXT_VERSION) || GL_GLEXT_VERSION < 6
# error "*** You need a more recent copy of glext.h. You can get one at http://oss.sgi.com/projects/ogl-sample/ABI/glext.h ; it goes in /usr/include/GL. ***"
#endif

View File

@ -0,0 +1,20 @@
--- tuxracer-0.61/configure.config 2001-01-23 21:12:19.000000000 +0100
+++ tuxracer-0.61/configure 2002-07-26 15:34:21.000000000 +0200
@@ -1795,13 +1795,13 @@
TR_CPPFLAGS=""
-TR_CFLAGS="-O2 -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations"
-TR_CXXFLAGS="-O2 -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations"
+TR_CFLAGS="$RPM_OPT_FLAGS -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations"
+TR_CXXFLAGS="$RPM_OPT_FLAGS -Wall -fomit-frame-pointer -ffast-math -fexpensive-optimizations"
TR_LIBS=""
case "$host" in
-i*86-*-*) TR_CFLAGS="$TR_CFLAGS -malign-loops=2 -malign-jumps=2 -malign-functions=2";
- TR_CXXFLAGS="$TR_CXXFLAGS -malign-loops=2 -malign-jumps=2 -malign-functions=2";;
+i*86-*-*) TR_CFLAGS="$TR_CFLAGS -falign-loops=2 -falign-jumps=2 -falign-functions=2";
+ TR_CXXFLAGS="$TR_CXXFLAGS -falign-loops=2 -falign-jumps=2 -falign-functions=2";;
alpha*-*-linux-*) TR_CFLAGS="$TR_CFLAGS -mieee";;
esac

81
tuxracer-0.61-gcc33.patch Normal file
View File

@ -0,0 +1,81 @@
--- tuxracer-0.61/src/game_config.c.gcc 2003-05-23 16:37:33.000000000 +0200
+++ tuxracer-0.61/src/game_config.c 2003-06-04 18:35:46.000000000 +0200
@@ -114,27 +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;
+ 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 @@
* 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 )
/*

105
tuxracer-0.61-ia64.patch Normal file
View File

@ -0,0 +1,105 @@
--- tuxracer-0.61/src/view.c.ia64 Thu Nov 8 11:56:54 2001
+++ tuxracer-0.61/src/view.c Thu Nov 8 15:11:31 2001
@@ -357,7 +357,7 @@
( speed - NO_INTERPOLATION_SPEED ) /
( BASELINE_INTERPOLATION_SPEED - NO_INTERPOLATION_SPEED )));
- up_dir = make_vector( 0, 1, 0 );
+ up_dir = make_vector( 0.0, 1.0, 0.0 );
vel_dir = plyr->vel;
normalize_vector( &vel_dir );
@@ -371,7 +371,7 @@
/* Camera-on-a-string mode */
/* Construct vector from player to camera */
- view_vec = make_vector( 0,
+ view_vec = make_vector( 0.0,
sin( ANGLES_TO_RADIANS(
course_angle -
CAMERA_ANGLE_ABOVE_SLOPE +
@@ -406,6 +406,7 @@
}
/* Interpolate view point */
+#if !defined(__ia64__)
if ( plyr->view.initialized ) {
/* Interpolate twice to get a second-order filter */
int i;
@@ -418,7 +419,7 @@
time_constant_mult );
}
}
-
+#endif
/* Make sure interpolated view point is above terrain */
ycoord = find_y_coord( view_pt.x, view_pt.z );
@@ -437,6 +438,7 @@
view_dir = scale_vector( -1.0,
transform_vector( rot_mat, view_vec ) );
+#if !defined(__ia64__)
/* Interpolate orientation of camera */
if ( plyr->view.initialized ) {
/* Interpolate twice to get a second-order filter */
@@ -448,7 +450,7 @@
up_dir = make_vector( 0.0, 1.0, 0.0 );
}
}
-
+#endif
break;
}
@@ -456,7 +458,7 @@
{
/* Camera follows player (above and behind) */
- up_dir = make_vector( 0, 1, 0 );
+ up_dir = make_vector( 0.0, 1.0, 0.0 );
/* Construct vector from player to camera */
view_vec = make_vector( 0,
@@ -493,6 +495,7 @@
view_pt.y = ycoord + MIN_CAMERA_HEIGHT;
}
+#if !defined(__ia64__)
/* Interpolate view point */
if ( plyr->view.initialized ) {
/* Interpolate twice to get a second-order filter */
@@ -506,6 +509,7 @@
time_constant_mult );
}
}
+#endif
/* Make sure interpolate view point is above terrain */
ycoord = find_y_coord( view_pt.x, view_pt.z );
@@ -525,6 +529,7 @@
view_dir = scale_vector( -1.0,
transform_vector( rot_mat, view_vec ) );
+#if !defined(__ia64__)
/* Interpolate orientation of camera */
if ( plyr->view.initialized ) {
/* Interpolate twice to get a second-order filter */
@@ -536,7 +541,7 @@
up_dir = make_vector( 0.0, 1.0, 0.0 );
}
}
-
+#endif
break;
}
@@ -544,7 +549,7 @@
{
/* Camera always uphill of player */
- up_dir = make_vector( 0, 1, 0 );
+ up_dir = make_vector( 0.0, 1.0, 0.0 );
/* Construct vector from player to camera */

12
tuxracer.desktop Normal file
View File

@ -0,0 +1,12 @@
[Desktop Entry]
Encoding=UTF-8
Categories=Application;Game;ArcadeGame
Name=Tux Racer
GenericName=Arcade Game
GenericName[it]=Gioco Arcade
Description=Race your penguin down an alpine slope
Description[it]=Conduci il pinguino lungo le discese alpine
Exec=tuxracer
Terminal=0
Type=Application
Icon=/usr/share/tuxracer/tuxracer.png

BIN
tuxracer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

95
tuxracer.spec Normal file
View File

@ -0,0 +1,95 @@
Name: tuxracer
Version: 0.61
Release: 4mamba
Summary: A simple OpenGL-based racing game featuring Tux
Group: Applications/Games
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://tuxracer.sourceforge.net/
Source: http://download.sourceforge.net/tuxracer/tuxracer-%{version}.tar.bz2
Source1: http://download.sourceforge.net/tuxracer/tuxracer-data-%{version}.tar.bz2
Source2: tuxracer.png
Source3: tuxracer.desktop
Patch: tuxracer-0.60.1-GL.patch
Patch1: tuxracer-0.61-config.patch
Patch2: tuxracer-0.61-ia64.patch
Patch3: tuxracer-0.61-gcc33.patch
License: GPL
BuildRequires: libtcl-devel >= 8.4.7
BuildRequires: libSDL_mixer-devel >= 1.2.5
BuildRequires: libSDL-devel >= 1.2.7
BuildRequires: libGL-devel
BuildRequires: libICE-devel
BuildRequires: libSM-devel
BuildRequires: libogg-devel
Obsoletes: tuxracer-data
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Tux Racer is a simple OpenGL-based racing game featuring Tux.
The object of the game is to slide down a snow- and ice-covered mountain as quickly as possible, avoiding the trees and rocks that will slow you down.
%prep
%setup -q
%patch -p1 -b .GL
%patch1 -p1 -b .config
%patch3 -p1 -b .gcc33
%build
CFLAGS="-DGLX_GLXEXT_LEGACY $RPM_OPT_FLAGS" \
%configure \
--with-data-dir=%{_datadir}/tuxracer \
--with-tcl-lib-name=tcl8.4
#--prefix=%{_prefix} \
#--with-gl-inc=/usr/X11R6/include \
#--with-gl-libs=/usr/X11R6/lib \
#--with-glut-inc=/usr/X11R6/include \
#--with-glut-libs=/usr/X11R6/lib \
make %{?_smp_mflags}
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
#make install \
# prefix=%{buildroot}%{_prefix} \
# datadir=%{buildroot}%{_datadir}/tuxracer
mkdir -p %{buildroot}%{_datadir}
pushd %{buildroot}%{_datadir}
bzip2 -dc %{SOURCE1} | tar xf -
mv tuxracer-data-0.61 tuxracer
cp %{SOURCE2} tuxracer/
find . -type f | xargs chmod 644
popd
mkdir -p %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/applications/tuxracer.desktop
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr (-, root, root, 755)
%{_bindir}/tuxracer
%dir %{_datadir}/tuxracer
%{_datadir}/tuxracer/*
%{_datadir}/applications/tuxracer.desktop
%doc AUTHORS COPYING ChangeLog README contrib
%changelog
* Tue Jul 02 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.61-4mamba
- rebuilt with libtcl 8.6
* Sun Sep 02 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 0.61-3mamba
- fixed desktop menu link
* Sun Nov 28 2004 Silvan Calarco <silvan.calarco@qilinux.it> 0.61-2qilnx
- rebuilt and moved from devel-contrib to devel repository
* Thu Nov 11 2004 Matteo Bernasconi <voyagernm@virgilio.it> 0.61-1qilnx
- First Build