aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/zork-mit/README8
-rw-r--r--games/zork-mit/doinst.sh9
-rw-r--r--games/zork-mit/git2tarxz.sh70
-rw-r--r--games/zork-mit/icons/32.pngbin0 -> 4069 bytes
-rw-r--r--games/zork-mit/icons/48.pngbin0 -> 7102 bytes
-rw-r--r--games/zork-mit/icons/64.pngbin0 -> 2974 bytes
-rw-r--r--games/zork-mit/slack-desc19
-rw-r--r--games/zork-mit/zork-mit.SlackBuild101
-rw-r--r--games/zork-mit/zork-mit.desktop9
-rw-r--r--games/zork-mit/zork-mit.info10
10 files changed, 226 insertions, 0 deletions
diff --git a/games/zork-mit/README b/games/zork-mit/README
new file mode 100644
index 0000000000000..aa08501460c06
--- /dev/null
+++ b/games/zork-mit/README
@@ -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.
diff --git a/games/zork-mit/doinst.sh b/games/zork-mit/doinst.sh
new file mode 100644
index 0000000000000..3e5691a052b5b
--- /dev/null
+++ b/games/zork-mit/doinst.sh
@@ -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
diff --git a/games/zork-mit/git2tarxz.sh b/games/zork-mit/git2tarxz.sh
new file mode 100644
index 0000000000000..19735f712a8f0
--- /dev/null
+++ b/games/zork-mit/git2tarxz.sh
@@ -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 )\""
diff --git a/games/zork-mit/icons/32.png b/games/zork-mit/icons/32.png
new file mode 100644
index 0000000000000..c999632473a79
--- /dev/null
+++ b/games/zork-mit/icons/32.png
Binary files differ
diff --git a/games/zork-mit/icons/48.png b/games/zork-mit/icons/48.png
new file mode 100644
index 0000000000000..1ed26fcc4d1a9
--- /dev/null
+++ b/games/zork-mit/icons/48.png
Binary files differ
diff --git a/games/zork-mit/icons/64.png b/games/zork-mit/icons/64.png
new file mode 100644
index 0000000000000..fd4bebba0701b
--- /dev/null
+++ b/games/zork-mit/icons/64.png
Binary files differ
diff --git a/games/zork-mit/slack-desc b/games/zork-mit/slack-desc
new file mode 100644
index 0000000000000..c74f3ff4be7dc
--- /dev/null
+++ b/games/zork-mit/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------------------------------------------------------|
+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:
diff --git a/games/zork-mit/zork-mit.SlackBuild b/games/zork-mit/zork-mit.SlackBuild
new file mode 100644
index 0000000000000..bd43f939fbba3
--- /dev/null
+++ b/games/zork-mit/zork-mit.SlackBuild
@@ -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
diff --git a/games/zork-mit/zork-mit.desktop b/games/zork-mit/zork-mit.desktop
new file mode 100644
index 0000000000000..dfc22b568a81d
--- /dev/null
+++ b/games/zork-mit/zork-mit.desktop
@@ -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;
diff --git a/games/zork-mit/zork-mit.info b/games/zork-mit/zork-mit.info
new file mode 100644
index 0000000000000..3f44ac35a939c
--- /dev/null
+++ b/games/zork-mit/zork-mit.info
@@ -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"