diff options
Diffstat (limited to 'games')
-rw-r--r-- | games/tuxnes/Makefile.patch | 11 | ||||
-rw-r--r-- | games/tuxnes/README | 17 | ||||
-rw-r--r-- | games/tuxnes/configure.in.patch | 56 | ||||
-rw-r--r-- | games/tuxnes/emu.c.patch | 38 | ||||
-rw-r--r-- | games/tuxnes/slack-desc | 19 | ||||
-rw-r--r-- | games/tuxnes/tuxnes.SlackBuild | 95 | ||||
-rw-r--r-- | games/tuxnes/tuxnes.info | 8 |
7 files changed, 244 insertions, 0 deletions
diff --git a/games/tuxnes/Makefile.patch b/games/tuxnes/Makefile.patch new file mode 100644 index 0000000000..041bb27927 --- /dev/null +++ b/games/tuxnes/Makefile.patch @@ -0,0 +1,11 @@ +--- Makefile~ 2007-06-30 09:16:58.000000000 -0500 ++++ Makefile 2007-06-30 09:18:26.000000000 -0500 +@@ -3,7 +3,7 @@ + panels.o debug.o config.o `gtk-config --cflags --libs` + + %.o: %.c gtuxnes.h +- gcc `gtk-config --cflags` -c $*.c -o $@ ++ gcc $(CFLAGS) `gtk-config --cflags` -c $*.c -o $@ + + clean: + rm -f *.o diff --git a/games/tuxnes/README b/games/tuxnes/README new file mode 100644 index 0000000000..9de5ce42e0 --- /dev/null +++ b/games/tuxnes/README @@ -0,0 +1,17 @@ +TuxNES is an emulator for the 8-bit Nintendo Entertainment System. It is +based on Nestra, a great public-domain NES emulator by Quor. TuxNES adds many +features not found in Nestra, and uses a more collaborative development model. +Enhancements to Nestra often find their way into TuxNES. Enhancements to +TuxNES don't generally find their way into Nestra due to licensing +restrictions (since pieces of TuxNES are generally copyrighted by their +authors, and covered by the GNU General Public License), although similar +changes by the same authors sometimes find their way back into Nestra. + +TuxNES requires an x86-family processor. + +If you would also like to install GTuxNES (a graphical launcher for TuxNES), +download its source tarball and place it in the same directory as the +SlackBuild. The GTuxNES homepage is http://www.scottweber.com/projects/gtuxnes/ + +The GTuxNES site appears to be down, but the source is mirrored here: +http://www.sourcefiles.org/Emulators/Videogames/gtuxnes-0.75.tar.gz diff --git a/games/tuxnes/configure.in.patch b/games/tuxnes/configure.in.patch new file mode 100644 index 0000000000..38a91de2cb --- /dev/null +++ b/games/tuxnes/configure.in.patch @@ -0,0 +1,56 @@ +--- configure.in~ 2007-06-30 08:03:35.000000000 -0500 ++++ configure.in 2007-06-30 08:21:46.000000000 -0500 +@@ -8,15 +8,16 @@ + ## + + dnl -------------------------------------------------------------------- +-dnl Made the prerequisite autoconf 2.13, lower it to each version we ++dnl Made the prerequisite autoconf 2.60, lower it to each version we + dnl find to work correctly with this script + dnl -------------------------------------------------------------------- +-AC_PREREQ(2.13) ++AC_PREREQ(2.60) + + dnl -------------------------------------------------------------------- + dnl Process this file with autoconf to produce a configure script + dnl -------------------------------------------------------------------- +-AC_INIT(consts.h) ++AC_INIT ++AC_CONFIG_SRCDIR([consts.h]) + AM_INIT_AUTOMAKE(tuxnes,0.75) + #AM_INIT_AUTOMAKE(tuxnes,devel) + +@@ -28,16 +29,10 @@ + AC_CANONICAL_HOST + + dnl -------------------------------------------------------------------- +-dnl Don't assume we want high level optimisations, it is known to +-dnl produce broken code on certain architectures using certain compilers +-dnl -------------------------------------------------------------------- +-CFLAGS="-O" +-AC_SUBST(CFLAGS) +- +-dnl -------------------------------------------------------------------- + dnl Check for programs which we might need + dnl -------------------------------------------------------------------- + AC_PROG_CC ++AM_PROG_AS + AC_PROG_INSTALL + + dnl -------------------------------------------------------------------- +@@ -175,7 +170,7 @@ + *-freebsd*) + OLDFLAGS="$LDFLAGS" + LDFLAGS="-L/usr/local/lib" +- AC_CHECK_LIB(gnugetopt, getopt, [AC_DEFINE(HAVE_LIBGNUGETOPT) GNUGETOPT_LIB="-lgnugetopt"]) ++ AC_CHECK_LIB(gnugetopt, getopt, [AC_DEFINE([HAVE_LIBGNUGETOPT], 1, [Define to 1 if you have the `gnugetopt' library (-lgnugetopt).]) GNUGETOPT_LIB="-lgnugetopt"]) + if test -n "$GNUGETOPT_LIB"; then + LDFLAGS="$OLDFLAGS -L/usr/local/lib -lgnugetopt" + AC_SUBST(LDFLAGS) +@@ -209,4 +204,5 @@ + AC_TYPE_SIGNAL + AC_CHECK_FUNCS(gettimeofday strtod strtoul) + +-AC_OUTPUT(Makefile) ++AC_CONFIG_FILES([Makefile]) ++AC_OUTPUT diff --git a/games/tuxnes/emu.c.patch b/games/tuxnes/emu.c.patch new file mode 100644 index 0000000000..0b33a7190c --- /dev/null +++ b/games/tuxnes/emu.c.patch @@ -0,0 +1,38 @@ +--- emu.c~ 2007-06-30 02:02:34.000000000 -0500 ++++ emu.c 2007-06-30 02:04:48.000000000 -0500 +@@ -890,7 +890,7 @@ + len = strlen(palfile) + 1; + if (! (buffer = malloc(len))) + { +- perror (__FUNCTION__ ": malloc"); ++ perror ("loadpal: malloc"); + return; + } + memcpy (buffer, palfile, len); +@@ -912,7 +912,7 @@ + len = strlen(filename) + 1; + if (! (buffer = malloc(len))) + { +- perror (__FUNCTION__ ": malloc"); ++ perror ("loadpal: malloc"); + return; + } + memcpy (buffer, filename, len); +@@ -924,7 +924,7 @@ + return; + if (!(palfile = malloc ((len = strlen (filename)) + 11))) + { +- perror (__FUNCTION__ ": malloc"); ++ perror ("loadpal: malloc"); + return; + } + strcpy (palfile, filename); +@@ -1602,7 +1602,7 @@ + + if (! (basefilename = malloc(baseend - basestart + 1))) + { +- perror (__FUNCTION__ ": malloc"); ++ perror ("main: malloc"); + exit (1); + } + diff --git a/games/tuxnes/slack-desc b/games/tuxnes/slack-desc new file mode 100644 index 0000000000..6dde390eee --- /dev/null +++ b/games/tuxnes/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +tuxnes: TuxNES (emulator for the 8-bit Nintendo) +tuxnes: +tuxnes: TuxNES is an emulator for the 8-bit Nintendo Entertainment System. +tuxnes: Currently, the emulator has been tested on Linux, FreeBSD, and +tuxnes: NetBSD, all running on i386 processors. TuxNES is based on Nestra, +tuxnes: a great public-domain NES emulator by Quor. +tuxnes: +tuxnes: +tuxnes: +tuxnes: +tuxnes: diff --git a/games/tuxnes/tuxnes.SlackBuild b/games/tuxnes/tuxnes.SlackBuild new file mode 100644 index 0000000000..15c8270c44 --- /dev/null +++ b/games/tuxnes/tuxnes.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/sh + +# Slackware build script for tuxnes +# Written by Kyle Guinn <elyk03@gmail.com> +# Modified by the SlackBuilds.org project + +set -e + +PRGNAM=tuxnes +VERSION=0.75 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# __FUNCTION__ is now a variable instead of a static string/macro in GCC 3.4+. +# Replace __FUNCTION__ with the actual function names where it appears. +patch -p0 < $CWD/emu.c.patch + +# Regenerate the build system so that it will support $CFLAGS. +patch -p0 < $CWD/configure.in.patch +rm acconfig.h install-sh missing mkinstalldirs +aclocal +autoheader +automake -a +autoconf + +CFLAGS="$SLKCFLAGS -fno-strict-aliasing" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-x + +make +make install-strip DESTDIR=$PKG + +# If the gtuxnes source tarball exists, install that too. +# http://www.sourcefiles.org/Emulators/Videogames/gtuxnes-0.75.tar.gz +( cd $TMP + PRGNAM=gtuxnes + VERSION=0.75 + if [ -e $CWD/$PRGNAM-$VERSION.tar.gz ]; then + rm -rf $PRGNAM-$VERSION + tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz + cd $PRGNAM-$VERSION + chown -R root:root . + chmod -R u+w,go+r-w,a-s . + + # Patch the Makefile to support $CFLAGS + patch -p0 < $CWD/Makefile.patch + CFLAGS="$SLKCFLAGS" make + cp gtuxnes $PKG/usr/bin + chown root:root $PKG/usr/bin/gtuxnes + chmod 0755 $PKG/usr/bin/gtuxnes + + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION + cp -a AUTHORS CHANGES COPYING INSTALL README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION + fi +) + +( 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 +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS BUGS CHANGES COPYING ChangeLog INSTALL* NEWS README THANKS \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/games/tuxnes/tuxnes.info b/games/tuxnes/tuxnes.info new file mode 100644 index 0000000000..9f73788caa --- /dev/null +++ b/games/tuxnes/tuxnes.info @@ -0,0 +1,8 @@ +PRGNAM="tuxnes" +VERSION="0.75" +HOMEPAGE="http://tuxnes.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/tuxnes/tuxnes-0.75.tar.gz" +MD5SUM="5db0cd42dfdff3e681805e93b4867c43" +MAINTAINER="Kyle Guinn" +EMAIL="elyk03@gmail.com" +APPROVED="rworkman" |