From d1504cbf64c0cdb1fc63c9143aa07c58e2e18cca Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Sat, 9 Feb 2002 23:20:50 +0000 Subject: [PATCH] Added rpm patch from Paolo Ulivi --- d2x-ogl.sh | 42 ++++++++++++++++++ d2x-sdl.sh | 7 +++ rpm/.cvsignore | 1 + rpm/d2x.spec | 118 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 168 insertions(+) create mode 100644 d2x-ogl.sh create mode 100644 d2x-sdl.sh create mode 100644 rpm/.cvsignore create mode 100644 rpm/d2x.spec diff --git a/d2x-ogl.sh b/d2x-ogl.sh new file mode 100644 index 000000000..8f042b542 --- /dev/null +++ b/d2x-ogl.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# +# Enable some 3Dfx OpenGL hints +# +export MESA_GLX_FX="f" +export MESA_CONFIG="quake2" +# +# Disable the 3Dfx GLIDE logo +# +export FX_GLIDE_NO_SPLASH="1" +# +# Change the swap buffers in Voodoo FIFO from 2 to 4 +# +export MESA_FX_SWAP_PENDING="4" +# +# Print Mesa statistics at end of game +# +export MESA_FX_INFO="1" +# +# Enable monitor's vertical refresh rate syncing on _most_ NVidia cards. +# (see /usr/share/doc/NVIDIA_GLX-1.0/README) +export __GL_SYNC_TO_VBLANK="1" +# +# Enable Full Scene Anti-Aliasing on NVidia cards who supports it. +# (see /usr/share/doc/NVIDIA_GLX-1.0/README) +export __GL_FSAA_MODE="3" +# +# Note: this is *mandatory* with single-threaded applications +# like d2x-ogl on systems equipped with NVidia cards and an old +# version of ld.so. +# (see /usr/share/doc/NVIDIA_GLX-1.0/README) +# +export __GL_SINGLE_THREADED="1" +# +# Finally, run the real game. +# All switches can be overwritten by command-line arguments. +# +nice /usr/games/d2x-ogl.real -tmap fp -nocdrom -nomovies \ + -gl_mipmap -gl_alttexmerge -gl_reticle 2 \ + -nofades \ + $1 $2 $3 $4 $5 + diff --git a/d2x-sdl.sh b/d2x-sdl.sh new file mode 100644 index 000000000..003ee00ff --- /dev/null +++ b/d2x-sdl.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# +# Run the real game. +# All switches can be overwritten by command-line arguments. +# +nice /usr/games/d2x-sdl.real -nocdrom -nomovies -nofades $1 $2 $3 $4 $5 + diff --git a/rpm/.cvsignore b/rpm/.cvsignore new file mode 100644 index 000000000..fc9b82187 --- /dev/null +++ b/rpm/.cvsignore @@ -0,0 +1 @@ +d2x.spec diff --git a/rpm/d2x.spec b/rpm/d2x.spec new file mode 100644 index 000000000..26f2aac72 --- /dev/null +++ b/rpm/d2x.spec @@ -0,0 +1,118 @@ +# +# Spec file for package d2x. +# +Name: d2x +Version: 0.1.2 +Release: 1 +Copyright: Freely Redistributable +Packager: bradleyb@u.washington.edu + +Group: Contrib/Games +Summary: The port of Descent 2 Version 1.2 for Linux. +Provides: d2x, descent2 + +URL: http://shelob.classrooms.washington.edu/d2x/ +Source: d2x-%{version}.tar.gz +BuildRoot: /var/tmp/%name-buildroot + +%description +This is the port of Descent 2 Version 1.2, the famous 3D game for PC. + +D2X is based on source code that was released the 14 December 1999 by +Parallax Software Corporation. + +To use this package you'll need the datafiles from the Retail version +of Descent 2 Version 1.2 installed in /usr/share/games/descent2. + +%package -n d2x-sdl +Group: Contrib/Games +Summary: Descent 2 Version 1.2 for Linux, SDL version. +Provides: d2x-sdl +Requires: d2x + +%description -n d2x-sdl +This is the port of Descent 2 Version 1.2, the famous 3D game for PC. + +D2X is based on source code that was released the 14 December 1999 by +Parallax Software Corporation. + +To use this package you'll need the datafiles from the Retail version +of Descent 2 Version 1.2 installed in /usr/share/games/descent2. + +This version uses SDL for Audio, Input/Output and graphics rendering. + +%package -n d2x-ogl +Group: Contrib/Games +Summary: Descent 2 Version 1.2 for Linux, OpenGL version. +Provides: d2x-ogl +Requires: d2x + +%description -n d2x-ogl +This is the port of Descent 2 Version 1.2, the famous 3D game for PC. + +D2X is based on source code that was released the 14 December 1999 by +Parallax Software Corporation. + +To use this package you'll need the datafiles from the Retail version +of Descent 2 Version 1.2 installed in /usr/share/games/descent2. + +This version uses SDL for Audio and Input/Output and OpenGL for graphics +rendering. + +%prep +%setup -q -n d2x* +#./autogen.sh + +%build +# d2x-sdl +%configure --with-sharepath=/usr/share/games/descent2 --disable-debug +make +mv d2x-sdl d2x-sdl.real +# d2x-ogl +make clean +rm -f config.cache +# Tell configure where to find libGLU (nonstandard location). +export LDFLAGS="${LDFLAGS} -L/usr/X11R6/lib" +%configure --with-sharepath=/usr/share/games/descent2 --with-opengl \ + --disable-debug +# Tell make where to link libGLU (nonstandard location). +make LDFLAGS="${LDFLAGS} -L /usr/X11R6/lib" +mv d2x-ogl d2x-ogl.real + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/games/ +mkdir -p $RPM_BUILD_ROOT/usr/share/games/descent2/missions/ +install -m 755 d2x-sdl.sh $RPM_BUILD_ROOT/usr/games/d2x-sdl +install -m 755 d2x-ogl.sh $RPM_BUILD_ROOT/usr/games/d2x-ogl +install d2x-sdl.real $RPM_BUILD_ROOT/usr/games/ +install d2x-ogl.real $RPM_BUILD_ROOT/usr/games/ + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc README NEWS INSTALL COPYING AUTHORS +%doc readme.txt cvshowto.txt license.txt compilerdefs.txt +%doc installation.txt mingw32.txt +%dir /usr/share/games/descent2 +%dir /usr/share/games/descent2/missions + +%files -n d2x-sdl +%defattr(-,root,root) +/usr/games/d2x-sdl +/usr/games/d2x-sdl.real + +%files -n d2x-ogl +%defattr(-,root,root) +/usr/games/d2x-ogl +/usr/games/d2x-ogl.real + +%changelog +* Tue Feb 7 2002 - Paolo Ulivi +- New SPEC version for inclusion in d2x/rpm (CVS) +* Wed Nov 14 2001 - Paolo Ulivi +- New upstream version 0.1.2 (CVS) dated 11 Nov 2001 +* Sat Oct 13 2001 - Paolo Ulivi +- Release 1mdk of D2X Version 0.1.0 for Mandrake 8.0