aboutsummaryrefslogtreecommitdiffstats
path: root/games/linux-ut
diff options
context:
space:
mode:
authorscf <scf@FreeBSD.org>2009-06-15 03:03:54 +0800
committerscf <scf@FreeBSD.org>2009-06-15 03:03:54 +0800
commit4129ab2b3c4b392897f8db373e1532963c7d348e (patch)
treea09169c5e7cb0ab338df8a71317f4924886be1fc /games/linux-ut
parent48e135687324c9dde7a6881005cc57d23110860e (diff)
downloadfreebsd-ports-gnome-4129ab2b3c4b392897f8db373e1532963c7d348e.tar.gz
freebsd-ports-gnome-4129ab2b3c4b392897f8db373e1532963c7d348e.tar.zst
freebsd-ports-gnome-4129ab2b3c4b392897f8db373e1532963c7d348e.zip
- Use libSDL v1.2 from ports instead of the provided v1.1. The Nvidia
driver will not function with it when the Linux base is Fedora 8. - Detect the Nvidia driver and set Sync on VBlank (__GL_SYNC_TO_VBLANK) to provide a consistent speed within the game, otherwise, the game will increase speed dramatically when approaching walls. - Disable the use of DGA mouse support in libSDL to allow some mice to function within the game. - Preload the Linux libX11 library to prevent the following error: XDM authorization key matches an existing client - Remove an empty directory (Logs) that is never used. Approved by: itetcu
Diffstat (limited to 'games/linux-ut')
-rw-r--r--games/linux-ut/Makefile10
-rw-r--r--games/linux-ut/files/patch-bin::ut34
-rw-r--r--games/linux-ut/pkg-plist1
3 files changed, 42 insertions, 3 deletions
diff --git a/games/linux-ut/Makefile b/games/linux-ut/Makefile
index d343ec32603d..b93f2ac1f052 100644
--- a/games/linux-ut/Makefile
+++ b/games/linux-ut/Makefile
@@ -7,7 +7,7 @@
PORTNAME= linux-ut
PORTVERSION= ${UTVERSION}
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= games linux
MASTER_SITES= http://liflg.0wnitsch.de/files/final/:p436 \
@@ -21,7 +21,7 @@ COMMENT= Unreal Tournament for Linux
ONLY_FOR_ARCHS= i386
USE_LINUX= yes
-USE_LINUX_APPS= xorglibs
+USE_LINUX_APPS= xorglibs sdl12
NO_BUILD= yes
NO_PACKAGE= Distribution is 340MB; set FORCE_PACKAGE if you really want\
to build this package
@@ -169,6 +169,7 @@ do-install:
${TAR} x -C ${DATADIR} -f -
.endfor
@${RM} ${DATADIR}/Logs/delete_me.txt
+ @${RMDIR} ${DATADIR}/Logs
.endif
####################################
# End of CD release-specific install
@@ -228,6 +229,11 @@ do-install:
${MV} -f windrv.int WinDrv.int
.endif
+# Replace older libSDL included with UT; it has issues with the Nvidia driver
+# when using Fedora 8 at the base.
+ @${LN} -sf ${LINUXBASE}/usr/lib/libSDL-1.2.so.0\
+ ${DATADIR}/System/libSDL-1.1.so.0
+
# Remove /usr/local from ut-bin lib search path
@${ECHO_CMD} "Removing /usr/local from ut-bin's library search path"
@UTBIN=${DATADIR}/System/ut-bin &&\
diff --git a/games/linux-ut/files/patch-bin::ut b/games/linux-ut/files/patch-bin::ut
new file mode 100644
index 000000000000..e3f37b95c8ea
--- /dev/null
+++ b/games/linux-ut/files/patch-bin::ut
@@ -0,0 +1,34 @@
+--- bin/ut.orig 2005-03-01 03:04:02.000000000 -0600
++++ bin/ut 2009-06-13 10:03:01.000000000 -0500
+@@ -68,6 +66,21 @@
+ cd $GAME_DIR
+ cd $SUBDIR
+
++# The Nvidia driver needs this to prevent the speed from being too fast when
++# facing things such as walls.
++sysctl hw.nvidia.version > /dev/null 2>&1
++if [ ${?} -eq 0 ]
++then
++ export __GL_SYNC_TO_VBLANK=${__GL_SYNC_TO_VBLANK:-"1"}
++fi
++
++# The mouse will not work using a newer libSDL without this.
++export SDL_VIDEO_X11_DGAMOUSE=${SDL_VIDEO_X11_DGAMOUSE:-"0"}
++
++# This is needed to prevent the following error:
++# XDM authorization key matches an existing client
++export LD_PRELOAD=/usr/lib/libX11.so.6
++
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$PWD
+ export LD_LIBRARY_PATH
+
+@@ -75,6 +88,9 @@
+ ./$GAME_BINARY "$CMD_ARGS" "$@"
+ EXITCODE="$?"
+
++# Remove the preload before running any other command.
++unset LD_PRELOAD
++
+ # reset kb layout
+ setxkbmap
+
diff --git a/games/linux-ut/pkg-plist b/games/linux-ut/pkg-plist
index 8a28a2589a74..d1dfe95518d4 100644
--- a/games/linux-ut/pkg-plist
+++ b/games/linux-ut/pkg-plist
@@ -458,7 +458,6 @@ bin/ut
%%DATADIR%%/Web/plaintext/root.uhtm
%%DATADIR%%/Web/root.uhtm
@dirrm %%DATADIR%%/Help
-@dirrm %%DATADIR%%/Logs
%%ANTHOLOGY%%@dirrm %%DATADIR%%/Manual
@dirrm %%DATADIR%%/Maps
@dirrm %%DATADIR%%/Music