diff options
-rw-r--r-- | games/tuxpuck/slack-desc | 4 | ||||
-rw-r--r-- | games/tuxpuck/tuxpuck.SlackBuild | 24 | ||||
-rw-r--r-- | games/tuxpuck/tuxpuck.info | 2 | ||||
-rw-r--r-- | games/tuxpuck/tuxpuck_0.8.2_fixes.diff | 100 |
4 files changed, 118 insertions, 12 deletions
diff --git a/games/tuxpuck/slack-desc b/games/tuxpuck/slack-desc index 7488999349015..3af58ff43dc3d 100644 --- a/games/tuxpuck/slack-desc +++ b/games/tuxpuck/slack-desc @@ -5,8 +5,8 @@ # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler------------------------------------------------------| -tuxpuck: Tuxpuck (Airhockey with a Twist) + |-----handy-ruler-----------------------------------------------------| +tuxpuck: Tuxpuck (Airhockey with a Twist) tuxpuck: tuxpuck: Tuxpuck is a clone of the Amiga/AtariST game "Shufflepuck Cafe" tuxpuck: It is written in C and uses SDL. The player moves a pad around diff --git a/games/tuxpuck/tuxpuck.SlackBuild b/games/tuxpuck/tuxpuck.SlackBuild index 3493bcd53bf4b..716514bc8d115 100644 --- a/games/tuxpuck/tuxpuck.SlackBuild +++ b/games/tuxpuck/tuxpuck.SlackBuild @@ -3,13 +3,12 @@ # Slackware build script for tuxpuck # Written by Erik Hanson erik@slackbuilds.org -# Modified by the SlackBuilds.org project - PRGNAM=tuxpuck VERSION=0.8.2 ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -19,6 +18,8 @@ if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" fi rm -rf $PKG @@ -30,13 +31,18 @@ cd $PRGNAM-$VERSION || exit 1 chown -R root:root . chmod -R u+w,go+r-w,a-s . -CFLAGS="$SLKCFLAGS" make || exit 1 -make install DESTDIR=$PKG || exit 1 +# Fix man page and buffer overflow: +patch -p1 < $CWD/tuxpuck_0.8.2_fixes.diff || exit 1 -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -) +# Use our SLKCFLAGS: +for i in Makefile data/Makefile utils/Makefile ; do + sed -i "s/-Wall/-Wall $SLKCFLAGS/" $i +done + +make || exit 1 +make install DESTDIR=$PKG || exit 1 +strip --strip-unneeded $PKG/usr/bin/tuxpuck +gzip -9 $PKG/usr/man/man6/tuxpuck.6 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp COPYING readme.txt $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/games/tuxpuck/tuxpuck.info b/games/tuxpuck/tuxpuck.info index f2f0682bf3bb0..af3e147a88fc7 100644 --- a/games/tuxpuck/tuxpuck.info +++ b/games/tuxpuck/tuxpuck.info @@ -5,4 +5,4 @@ DOWNLOAD="http://home.no.net/munsuun/tuxpuck/files/tuxpuck-0.8.2.tar.gz" MD5SUM="fc839abc2b1f3eafae397e1ed6487079" MAINTAINER="Erik Hanson" EMAIL="erik@slackbuilds.org" -APPROVED="elohim,rworkman" +APPROVED="rworkman" diff --git a/games/tuxpuck/tuxpuck_0.8.2_fixes.diff b/games/tuxpuck/tuxpuck_0.8.2_fixes.diff new file mode 100644 index 0000000000000..5979533bf6b9a --- /dev/null +++ b/games/tuxpuck/tuxpuck_0.8.2_fixes.diff @@ -0,0 +1,100 @@ +diff -Naur tuxpuck-0.8.2.orig/Makefile tuxpuck-0.8.2/Makefile +--- tuxpuck-0.8.2.orig/Makefile 2008-06-17 00:04:17.000000000 -0500 ++++ tuxpuck-0.8.2/Makefile 2008-06-17 00:04:29.000000000 -0500 +@@ -55,4 +55,4 @@ + install -d $(DESTDIR)/usr/bin + install -d $(DESTDIR)/usr/man/man6 + install -m755 $(NAME) $(DESTDIR)/usr/bin +- install -m644 man/$(NAME).6.gz $(DESTDIR)/usr/man/man6 ++ install -m644 man/$(NAME).6 $(DESTDIR)/usr/man/man6 +diff -Naur tuxpuck-0.8.2.orig/data/Makefile tuxpuck-0.8.2/data/Makefile +--- tuxpuck-0.8.2.orig/data/Makefile 2008-06-17 00:04:17.000000000 -0500 ++++ tuxpuck-0.8.2/data/Makefile 2008-06-17 00:04:29.000000000 -0500 +@@ -1,5 +1,6 @@ + # Makefile for TuxPuck , Copyright Jacob Kroon 2001-2002 + CC = gcc ++CFLAGS += -g -Wall + SOURCES = pad_png.c puck_png.c tux_png.c glass_png.c scoreboard_png.c \ + arcana_png.c mousebar_png.c title_jpg.c board_jpg.c \ + logo_jpg.c crash_ogg.c nock_ogg.c tux_apps_ogg.c \ +diff -Naur tuxpuck-0.8.2.orig/man/tuxpuck.6 tuxpuck-0.8.2/man/tuxpuck.6 +--- tuxpuck-0.8.2.orig/man/tuxpuck.6 1969-12-31 18:00:00.000000000 -0600 ++++ tuxpuck-0.8.2/man/tuxpuck.6 2008-06-17 00:04:29.000000000 -0500 +@@ -0,0 +1,63 @@ ++.\" Hey, EMACS: -*- nroff -*- ++.\" First parameter, NAME, should be all caps ++.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection ++.\" other parameters are allowed: see man(7), man(1) ++.TH "TUXPUCK" "6" "March 25, 2002" ++.\" Please adjust this date whenever revising the manpage. ++.\" ++.\" Some roff macros, for reference: ++.\" .nh disable hyphenation ++.\" .hy enable hyphenation ++.\" .ad l left justify ++.\" .ad b justify to both left and right margins ++.\" .nf disable filling ++.\" .fi enable filling ++.\" .br insert line break ++.\" .sp <n> insert n+1 empty lines ++.\" for manpage-specific macros, see man(7) ++.SH NAME ++tuxpuck \- "Shufflepuck Cafe" Clone ++.SH SYNOPSIS ++\fBtuxpuck\fP ++.\" .RI [ options ] " files" ... ++.SH DESCRIPTION ++Anyone remember "Shufflepuck Cafe" for the Amiga/AtariST? ++.br ++I do. ++.PP ++\fBTuxPuck\fP is a shufflepuck game written in C using SDL. The ++player moves a pad around a board and tries to shoot down the puck ++through the opponents defense. ++.SH OPTIONS ++This program does not take any command line arguments. ++.SH CONFIG FILE ++The config file ".tuxpuckrc" is located in your home directory. It is ++automatically written when the game quits. ++.SH CONFIG FILE FORMAT ++Just "\fBTAG\fP \fBVALUE\fP", each option seperated by Returns. ++.SH CONFIG FILE OPTIONS ++\fBSOUND\fP 1 = ON, 0 = OFF ++.br ++\fBFULLSCREEN\fP 1 = ON, 0 = OFF ++.br ++\fBMOUSESPEED\fP between 1 and 10, 1 slowest, 10 fastest ++.SH IN-GAME CONTROL ++\fBMOUSE\fP Move the pad ++.br ++\fBF\fP Toggle fullscreen mode ++.br ++\fBF1\fP Toggle sound ++.br ++\fBF5\fP Decrease mouse speed ++.br ++\fBF6\fP Increase mouse speed ++.\" .SH SEE ALSO ++.\" .BR bar (1), ++.\" .BR baz (1). ++.\" .br ++.\" The programs are documented fully by ++.\" .IR "The Rise and Fall of a Fooish Bar" , ++.\" available via the Info system. ++.SH AUTHOR ++The TuxPuck game was written by Jacob "noork" Kroon, <d00jkr@efd.lth.se>. ++This manual page was written by Sven Velt <sven@velt.de>. +diff -Naur tuxpuck-0.8.2.orig/tuxpuck.c tuxpuck-0.8.2/tuxpuck.c +--- tuxpuck-0.8.2.orig/tuxpuck.c 2008-06-17 00:04:17.000000000 -0500 ++++ tuxpuck-0.8.2/tuxpuck.c 2008-06-17 00:04:29.000000000 -0500 +@@ -250,7 +250,9 @@ + _settings->mouse_speed = 5; + #ifndef windows + homeDir = getenv("HOME"); +- sprintf(_settings_file, "%s/.tuxpuckrc", homeDir); ++ /* Buffer overflow fixed! ++ * sprintf(_settings_file, "%s/.tuxpuckrc", homeDir); */ ++ snprintf(_settings_file, sizeof(_settings_file)-1, "%s/.tuxpuckrc", homeDir); + #endif + _read_settings(); + audio_set_mute(!_settings->sound); |