games/zork-mit: Added (PDP/10 Zork from MIT, circa 1981)

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-04-06 22:16:06 +01:00 committed by Willy Sudiarto Raharjo
parent 4902427f2d
commit 268f20a2c8
No known key found for this signature in database
GPG key ID: 3F617144D7238786
10 changed files with 226 additions and 0 deletions

8
games/zork-mit/README Normal file
View file

@ -0,0 +1,8 @@
zork-mit (PDP/10 Zork from MIT, circa 1981)
This is a modern C++-17 port of the final 616-point Zork, originally
written in MDL at MIT around 1978-1981.
See also: games/zork and games/dungeon. This version of Zork is newer
than the Dungeon version that was ported to Fortran, but older than
the commercial Zork games for PCs.

9
games/zork-mit/doinst.sh Normal file
View file

@ -0,0 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

View file

@ -0,0 +1,70 @@
#!/bin/sh
# Create source tarball from git repo, with generated version number.
# NOTE: if you're copying this to use in another build, get rid of
# the "rm -rf platform" or you might get surprised!
# Takes one optional argument, which is the commit or tag to create a
# tarball of. With no arg, HEAD is used.
# Version number example: 0.0.1+20200227_ad7ec17
# Notes:
# Do not use this if you're packaging a release.
# This script doesn't need to be run as root. It does need to be able
# to write to the current directory it's run from.
# Running this script twice for the same commit will NOT give identical
# tarballs, even if the contents are identical. This is because tar
# includes the current time in a newly-created tarball (plus there may
# be other git-related reasons).
# Once you've generated a tarball, you'll still need a place to host it.
# Ask on the mailing list, if you don't have your own web server to
# play with.
## Config:
# final tarball and slackbuild PRGNAM:
PRGNAM=zork-mit
# what it says on the tin:
CLONE_URL=https://jclaar3@bitbucket.org/jclaar3/zork.git
## End of config.
set -e
GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
rm -rf $GITDIR
git clone $CLONE_URL $GITDIR
CWD="$( pwd )"
cd $GITDIR
if [ "$1" != "" ]; then
git reset --hard "$1" || exit 1
fi
GIT_SHA=$( git rev-parse --short HEAD )
DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
VERTAG=$( git tag -l | tail -1 )
VERSION=${VERTAG}+${DATE}_${GIT_SHA}
rm -rf .git
find . -name .gitignore -print0 | xargs -0 rm -f
cd "$CWD"
rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
mv $GITDIR $PRGNAM-$VERSION
tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
echo
echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
echo "VERSION=\"$VERSION\""
echo "MD5SUM=\"$( md5sum $PRGNAM-$VERSION.tar.xz | cut -d' ' -f1 )\""

BIN
games/zork-mit/icons/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

BIN
games/zork-mit/icons/48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
games/zork-mit/icons/64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

19
games/zork-mit/slack-desc Normal file
View file

@ -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------------------------------------------------------|
zork-mit: zork-mit (PDP/10 Zork from MIT, circa 1981)
zork-mit:
zork-mit: This is a modern C++-17 port of the final 616-point Zork, originally
zork-mit: written in MDL at MIT around 1978-1981.
zork-mit:
zork-mit:
zork-mit:
zork-mit:
zork-mit:
zork-mit:
zork-mit:

View file

@ -0,0 +1,101 @@
#!/bin/bash
# Slackware build script for zork-mit
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=zork-mit
VERSION=${VERSION:-1.1.2+20220404_cc4406e}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
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-v$VERSION
tar xvf $CWD/$PRGNAM-v$VERSION.tar.xz
cd $PRGNAM-v$VERSION
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 {} \+
# No way to override cleanly, so:
sed -i "/^CFLAGS/s,-Os,$SLKCFLAGS,g" */makefile
# Fugly, but this works:
make BOOSTLIB="-lboost_program_options \
-lboost_serialization \
-lboost_filesystem \
-lboost_system"
install -s -D -m0755 -oroot -groot mdlfun/zork_linux $PKG/usr/games/$PRGNAM
# Icons made by combining a color-shifted version of the MIT logo
# with the Zork icons. The result isn't very pretty, but at least
# it's distinctive. If you can make better icons, please do, I'll
# include them here.
for i in 32 48 64; do
size=${i}x${i}
dir=$PKG/usr/share/icons/hicolor/$size/apps
mkdir -p $dir
cat $CWD/icons/$i.png > $dir/$PRGNAM.png
done
mkdir -p $PKG/usr/share/pixmaps
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# .desktop file made by SlackBuild author.
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
# As fascinating as it is, don't include the MDL programmer's manual
# (MIT-LCS-TR-292.pdf) in the package. It's large and not useful for
# players...
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a README* dungeon-1981.jpg $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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

View file

@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Name=Zork (MIT version)
GenericName=Interactive Fiction Game
Icon=zork-mit
Exec=/usr/games/zork-mit
Terminal=true
Type=Application
Categories=Game;AdventureGame;

View file

@ -0,0 +1,10 @@
PRGNAM="zork-mit"
VERSION="1.1.2+20220404_cc4406e"
HOMEPAGE="https://bitbucket.org/jclaar3/zork/src/master/"
DOWNLOAD="https://slackware.uk/~urchlay/src/zork-mit-v1.1.2+20220404_cc4406e.tar.xz"
MD5SUM="790963e6a1b72a4dffdb126501078889"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"