diff options
author | B. Watson <yalhcru@gmail.com> | 2018-08-24 00:24:31 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-08-25 09:59:38 +0700 |
commit | faf2e7338b2a79eae57ea6112a33bba1c8079372 (patch) | |
tree | b8b936a6a9cdc34a0136902a0cac79178980fafb /games/z26v3 | |
parent | 212f8601ed90bdf6fdffc0a13fd4335b1b0865cb (diff) | |
download | slackbuilds-faf2e7338b2a79eae57ea6112a33bba1c8079372.tar.gz |
games/z26v3: Added (an Atari 2600 emulator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/z26v3')
-rw-r--r-- | games/z26v3/README | 24 | ||||
-rw-r--r-- | games/z26v3/doinst.sh | 7 | ||||
-rw-r--r-- | games/z26v3/fixsegfault.diff.gz | bin | 0 -> 253 bytes | |||
-rw-r--r-- | games/z26v3/slack-desc | 19 | ||||
-rw-r--r-- | games/z26v3/z26v3.SlackBuild | 94 | ||||
-rw-r--r-- | games/z26v3/z26v3.desktop | 10 | ||||
-rw-r--r-- | games/z26v3/z26v3.info | 10 |
7 files changed, 164 insertions, 0 deletions
diff --git a/games/z26v3/README b/games/z26v3/README new file mode 100644 index 0000000000..5ec1bdbeb4 --- /dev/null +++ b/games/z26v3/README @@ -0,0 +1,24 @@ +z26v3 (an Atari 2600 emulator) + +Z26 is one of the best emulators for the Atari 2600. The author reports +that the graphics part of the emulator is nearing perfection to a point +that there's little more to fix. + +This is z26 version 3.x, which may have some issues running on Linux +(depending on your hardware & config), and the authors aren't interested +in fixing them. If you have problems you can't solve, try the older 2.13 +release, by installing games/z26 (which won't conflict with this build; +you can have both installed). + +Specific Linux issues in this version: + +- The config file (z26.gui) is always read & written in the directory + where the ROM image is located. If the file doesn't exist and z26 can't + write to the directory, it refuses to start. This means no root-owned, + system-wide /usr/share/games/roms/2600 directory (even if users can + write there, they'll overwrite each others' config files). + +- The video timing relies on OpenGL VSync. If your card/driver combo is + incapable of this, the games will run insanely fast. Even with VSync + support, the games run at whatever your monitor refresh rate is set to + (for LCD panels this is usually 60Hz, which is correct for NTSC games). diff --git a/games/z26v3/doinst.sh b/games/z26v3/doinst.sh new file mode 100644 index 0000000000..9a8ded3c60 --- /dev/null +++ b/games/z26v3/doinst.sh @@ -0,0 +1,7 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi diff --git a/games/z26v3/fixsegfault.diff.gz b/games/z26v3/fixsegfault.diff.gz Binary files differnew file mode 100644 index 0000000000..a20fef4b4c --- /dev/null +++ b/games/z26v3/fixsegfault.diff.gz diff --git a/games/z26v3/slack-desc b/games/z26v3/slack-desc new file mode 100644 index 0000000000..7d795e12e7 --- /dev/null +++ b/games/z26v3/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +z26v3: z26v3 (an Atari 2600 emulator) +z26v3: +z26v3: Z26 is one of the best emulators for the Atari 2600. +z26v3: The author reports that the graphics part of the emulator is nearing +z26v3: perfection to a point that there's little more to fix. +z26v3: +z26v3: +z26v3: +z26v3: +z26v3: +z26v3: diff --git a/games/z26v3/z26v3.SlackBuild b/games/z26v3/z26v3.SlackBuild new file mode 100644 index 0000000000..354d812ad8 --- /dev/null +++ b/games/z26v3/z26v3.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/sh + +# Slackware build script for z26v3 + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Possibly TODO: write a man page. Upstream didn't bother to document +# the command line options (even went so far as to remove the man page +# and usage message that used to be in z26 2.x). The options have changed +# since 2.x, so it would be a tedious process of reading the source code. +# Not in the mood right now, maybe later. + +# Also possibly TODO: a patch to keep the config files (z26.gui and +# z26.cli) in the user's home directory instead of whatever dir the +# ROM file happens to live in. Leaving it as-is has its uses: different +# sets of ROMs might require different options, so you could separate +# them into dirs and each dir gets its own config file. Maybe the patch +# should leave the config file locations alone, but allow the emulator +# to start in the absence of a config file. Still thinking on this one. + +PRGNAM=z26v3 +VERSION=${VERSION:-3.02.01} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir -p $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +unzip $CWD/z26v${VERSION}s.zip +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# Fix segfault on exit, when a ROM filename is passed on the command +# line. Please don't gunzip the patch: it has CRLF line endings, git +# will "helpfully" remove them, and the patch will fail. +zcat $CWD/fixsegfault.diff.gz | patch -p1 + +cd src +make linux CFLAGS="$SLKCFLAGS" +mkdir -p $PKG/usr/games +install -s -m0755 -oroot -groot z26 $PKG/usr/games/$PRGNAM + +# .desktop file written by SlackBuild author. +mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +cat z26_icon.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +for i in doc/*; do + sed 's,\r,,' $i > $PKG/usr/doc/$PRGNAM-$VERSION/$( basename $i ) +done +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/z26v3/z26v3.desktop b/games/z26v3/z26v3.desktop new file mode 100644 index 0000000000..29f229c784 --- /dev/null +++ b/games/z26v3/z26v3.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Z26 v3.x +Comment=Atari 2600 emulator +Exec=z26v3 %f +Icon=z26v3 +Terminal=false +Type=Application +StartupNotify=false +Categories=Emulator;Game; +MimeType=application/x-2600rom; diff --git a/games/z26v3/z26v3.info b/games/z26v3/z26v3.info new file mode 100644 index 0000000000..5757da7ccd --- /dev/null +++ b/games/z26v3/z26v3.info @@ -0,0 +1,10 @@ +PRGNAM="z26v3" +VERSION="3.02.01" +HOMEPAGE="http://www.whimsey.com/z26/z26.html" +DOWNLOAD="http://www.whimsey.com/z26/z26v3.02.01s.zip" +MD5SUM="5c28a898a6a6145c222a8f0b5c8ce8d6" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" |