games/glulxe: Added (Portable VM).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-03-07 10:29:36 +07:00 committed by Willy Sudiarto Raharjo
parent 2151fc617a
commit 1500b39f3c
No known key found for this signature in database
GPG key ID: 3F617144D7238786
6 changed files with 392 additions and 0 deletions

22
games/glulxe/README Normal file
View file

@ -0,0 +1,22 @@
glulxe (interactive fiction VM)
Glulx is a portable VM, like the Z-machine. Unlike the Z-machine, it
uses 32-bit data and addresses, so it can handle game files up to four
gigabytes long. Also unlike the Z-machine, it has native support for
Glk I/O, so game files can use any capability Glk provides. However,
like the Z-machine -- again -- you can write games in the Inform
language and compile them to Glulx game files.
Optional dependency: cheapglk. Although glulxe-cheapglk is not as
featureful as glulxe-glktermw, it does support the VM debugger,
which glulxe-glktermw does not. If you want this, install cheapglk
before building glulxe. The executable will be installed as
/usr/games/glulxe-cheapglk. If you have cheapglk installed, you can
build without it by setting CHEAPGLK=no in the environment.
Optional dependency: if you want a glulxe that speaks JSON, install
remglk before building this. The JSON executable will be installed
as /usr/games/glulxe-remglk. If you have remglk installed and want to
build without it, export REMGLK=no in the environment. Note that, by
itself, glulxe-remglk can't be used to play games in a human-friendly
way; it's intended for use with a frontend (possibly a web-based one).

View file

@ -0,0 +1,111 @@
.\" Automatically generated by Pandoc 3.1.6
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "GLULXE-GLKTERMW" "1" "March 2024" "0.6.1" "SlackBuilds.org"
.hy
.SH NAME
.PP
glulxe-glktermw - execute Glulx interactive fiction
.SH SYNOPSIS
.PP
\f[B]glulxe-glktermw\f[R] \f[I]filename\f[R] [ \f[I]options\f[R] ]
.SH OVERVIEW
.PP
\f[B]glulxe-glktermw\f[R] executes Glulx-format interactive fiction
games, which typically end with .ulx, .gblorb, .glb, .blorb, or .blb.
\f[B]glulxe-glktermw\f[R] can work with only a terminal.
.PP
The only required parameter is the filename of the game to play.
The remaining parameters are all optional, and come from the glktermw
library.
.PP
If you have \f[B]glulxe-remglk\f[R] and/or \f[B]glulxe-cheapglk\f[R]
executables, these support extra options.
Currently these don\[cq]t have man pages, but you can run them with
\f[B]-help\f[R] to see the options.
.PP
Further information can be found in /usr/doc/glulxe-0.6.1/README.md.
Note that the \f[B]-singleturn\f[R] example requires
\f[B]glulxe-remglk\f[R].
.SH OPTIONS
.PP
Game options (note: double dash, \f[B]--\f[R]).
\f[I]NUM\f[R] options can be any number.
.TP
\f[B]--undo\f[R] \f[I]NUM\f[R]
Number of undo states to store.
.TP
\f[B]--rngseed\f[R] \f[I]NUM\f[R]
Fix initial RNG if nonzero.
.TP
\f[B]--profile\f[R] \f[I]filename\f[R]
Generate profiling information to a file.
.TP
\f[B]--profcalls\f[R]
Include what-called-what details in profiling.
(Slow!)
.PP
Library options (note: single dash, \f[B]-\f[R]).
\f[I]BOOL\f[R] options can be \f[I]yes\f[R] or \f[I]no\f[R], or no value
to toggle.
.TP
\f[B]-width\f[R] \f[I]NUM\f[R], \f[B]-height\f[R] \f[I]NUM\f[R]
Sets the screen width or height.
Normally automatically determined.
.TP
\f[B]-ml\f[R] \f[I]BOOL\f[R]
Enables or disables the message line (default \[lq]yes\[rq]).
This is the bottom line of the screen.
.TP
\f[B]-revgrid\f[R] \f[I]BOOL\f[R]
Reverse text in grid (status) windows (default \[lq]no\[rq]).
.TP
\f[B]-historylen\f[R] \f[I]NUM\f[R]
Sets the number of commands to keep in the history for each window
(default 20).
.PP
\f[B]-border\f[R] \f[I]BOOL\f[R] :: Whether or not to force
one-character borders between windows.
The default turns on borders unless the game switches them off.
Setting to \[lq]yes\[rq] forces them on at all times, or \[lq]no\[rq]
forces them off at all times, ignoring the game\[cq]s request.
.TP
\f[B]-defprompt\f[R] \f[I]BOOL\f[R]
Provide defaults for file prompts (default \[lq]yes\[rq]).
.TP
\f[B]-precise\f[R] \f[I]BOOL\f[R]
Whether to use more precise timing for timed input (default
\[lq]no\[rq]).
.TP
\f[B]-version\f[R]
Display Glk library version.
.TP
\f[B]-help\f[R]
Display command-line help.
.SH ABOUT
.PP
glulxe was written by Andrew Plotkin <erkyrath@eblong.com> and can be
found at <https://www.eblong.com/zarf/glulx/>.
glktermw was written by Andrew Plotkin <erkyrath@eblong.com> and
Alexander Beels <arb28@columbia.edu> and can be found at
<https://www.eblong.com/zarf/glk/index.html>.
.PP
This manpage was written for Debian by John Goerzen
<jgoerzen@complete.org> based on information in the above locations.
It was updated for glulxe-0.6.1 by B.
Watson <urchlay@slackware.uk>.
.SH AUTHORS
Andrew Plotkin, John Goerzen.

View file

@ -0,0 +1,88 @@
% GLULXE-GLKTERMW(1) 0.6.1 | SlackBuilds.org
% Andrew Plotkin, John Goerzen
% March 2024
# NAME
glulxe-glktermw - execute Glulx interactive fiction
# SYNOPSIS
**glulxe-glktermw** *filename* [ *options* ]
# OVERVIEW
**glulxe-glktermw** executes Glulx-format interactive fiction games, which
typically end with .ulx, .gblorb, .glb, .blorb, or .blb. **glulxe-glktermw**
can work with only a terminal.
The only required parameter is the filename of the game to
play. The remaining parameters are all optional, and come
from the glktermw library.
If you have **glulxe-remglk** and/or **glulxe-cheapglk** executables,
these support extra options. Currently these don't have man pages, but
you can run them with **-help** to see the options.
Further information can be found in /usr/doc/glulxe-0.6.1/README.md.
Note that the **-singleturn** example requires **glulxe-remglk**.
# OPTIONS
Game options (note: double dash, **-\-**). *NUM* options can be any number.
**-\-undo** *NUM*
: Number of undo states to store.
**-\-rngseed** *NUM*
: Fix initial RNG if nonzero.
**-\-profile** *filename*
: Generate profiling information to a file.
**-\-profcalls**
: Include what-called-what details in profiling. (Slow!)
Library options (note: single dash, **-**). *BOOL* options can
be *yes* or *no*, or no value to toggle.
**-width** *NUM*, **-height** *NUM*
: Sets the screen width or height. Normally automatically determined.
**-ml** *BOOL*
: Enables or disables the message line (default "yes"). This is the bottom line
of the screen.
**-revgrid** *BOOL*
: Reverse text in grid (status) windows (default "no").
**-historylen** *NUM*
: Sets the number of commands to keep in the history for each window (default 20).
**-border** *BOOL*
:: Whether or not to force one-character borders between windows.
The default turns on borders unless the game switches them off.
Setting to "yes" forces them on at all times, or "no" forces them
off at all times, ignoring the game's request.
**-defprompt** *BOOL*
: Provide defaults for file prompts (default "yes").
**-precise** *BOOL*
: Whether to use more precise timing for timed input (default "no").
**-version**
: Display Glk library version.
**-help**
: Display command-line help.
# ABOUT
glulxe was written by Andrew Plotkin <erkyrath@eblong.com> and can be found at
<https://www.eblong.com/zarf/glulx/>. glktermw was written by Andrew Plotkin <erkyrath@eblong.com>
and Alexander Beels <arb28@columbia.edu> and can be found at
<https://www.eblong.com/zarf/glk/index.html>.
This manpage was written for Debian by John Goerzen <jgoerzen@complete.org> based
on information in the above locations. It was updated for glulxe-0.6.1 by B. Watson <urchlay@slackware.uk>.

View file

@ -0,0 +1,142 @@
#!/bin/bash
# Slackware build script for glulxe
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# Man page comes from debian. glulxe.6.md originally came from:
# http://deb.debian.org/debian/pool/main/g/glulxe/glulxe_0.5.4-1.1.debian.tar.xz
# ...and I added the new options in v0.6.1.
# convert to a man page via:
# pandoc --standalone --to man glulxe-glktermw.6.md -o glulxe-glktermw.6
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=glulxe
VERSION=${VERSION:-0.6.1}
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
# 0.6.1 => 061
TARVER=${VERSION//./}
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$TARVER.tar.gz
cd $PRGNAM
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 {} +
# Include glulxdump in package. Have to apply our flags.
sed -i "/-o glulxdump/s,-o,$SLKCFLAGS -o," Makefile
# glulxe requires a glk library, but there are at least 3 to choose
# from. The most-commonly used one (by people who just play games) is
# going to be glktermw, so I made it a required dep. cheapglk and
# remglk are more niche-market, so they're optional.
# glktermw first.
# Unfortunately we can't define VM_DEBUGGER with glktermw, it lacks
# support for it.
OPTS="-DOS_UNIX -DUNIX_RAND_GETRANDOM -DVM_PROFILING"
make all glulxdump \
OPTIONS="-Wall $SLKCFLAGS $OPTS" \
GLKINCLUDEDIR=/usr/include/glktermw \
GLKLIBDIR=/usr/lib$LIBDIRSUFFIX \
GLKMAKEFILE=Make.glktermw
# no 'make install' target.
mkdir -p $PKG/usr/games
install -s glulxdump $PKG/usr/games/
install -s $PRGNAM $PKG/usr/games/$PRGNAM-glktermw
ln -s $PRGNAM-glktermw $PKG/usr/games/$PRGNAM
install profile-analyze.py $PKG/usr/games/$PRGNAM-profile-analyze
# only have a man page for glulxe-glktermw
MAN6=$PKG/usr/man/man6
mkdir -p $MAN6
gzip -9c < $CWD/glulxe-glktermw.6 > $MAN6/glulxe-glktermw.6.gz
ln -s glulxe-glktermw.6.gz $MAN6/$PRGNAM.6.gz
# cheapglk, if available.
INCCG="does NOT include"
if [ "${CHEAPGLK:-yes}" = "yes" -a -e /usr/include/cheapglk/glk.h ]; then
INCCG="INCLUDES"
rm -f *.o $PRGNAM glulxdump profile-raw
# We *can* define VM_DEBUGGER with cheapglk, so do it.
make OPTIONS="-Wall $SLKCFLAGS $OPTS -DVM_DEBUGGER" \
GLKINCLUDEDIR=/usr/include/cheapglk \
GLKLIBDIR=/usr/lib$LIBDIRSUFFIX \
GLKMAKEFILE=Make.cheapglk \
XMLLIBINCLUDEDIR=-I/usr/include/libxml2 \
XMLLIB=-lxml2
install -s $PRGNAM $PKG/usr/games/$PRGNAM-cheapglk
fi
# remglk, if available.
INCREM="does NOT include"
if [ "${REMGLK:-yes}" = "yes" -a -e /usr/include/remglk/glk.h ]; then
INCREM="INCLUDES"
rm -f *.o $PRGNAM glulxdump profile-raw
# We *can* define VM_DEBUGGER with remglk, so do it.
make OPTIONS="-Wall $SLKCFLAGS $OPTS -DVM_DEBUGGER" \
GLKINCLUDEDIR=/usr/include/remglk \
GLKLIBDIR=/usr/lib$LIBDIRSUFFIX \
GLKMAKEFILE=Make.remglk \
XMLLIBINCLUDEDIR=-I/usr/include/libxml2 \
XMLLIB=-lxml2
install -s $PRGNAM $PKG/usr/games/$PRGNAM-remglk
fi
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a LICENSE README.md $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
sed -e "s,@INCREM@,$INCREM," \
-e "s,@INCCG@,$INCCG," \
< $CWD/slack-desc \
> $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

10
games/glulxe/glulxe.info Normal file
View file

@ -0,0 +1,10 @@
PRGNAM="glulxe"
VERSION="0.6.1"
HOMEPAGE="https://www.eblong.com/zarf/glulx/"
DOWNLOAD="https://www.eblong.com/zarf/glulx/glulxe-061.tar.gz"
MD5SUM="0d0438faa42fd09d08876f75372c97b1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="glktermw"
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"

19
games/glulxe/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------------------------------------------------------|
glulxe: glulxe (interactive fiction VM)
glulxe:
glulxe: Glulx is a portable VM, like the Z-machine. Unlike the Z-machine, it
glulxe: uses 32-bit data and addresses, so it can handle game files up to four
glulxe: gigabytes long. Also unlike the Z-machine, it has native support for
glulxe: Glk I/O, so game files can use any capability Glk provides. However,
glulxe: like the Z-machine -- again -- you can write games in the Inform
glulxe: language and compile them to Glulx game files.
glulxe:
glulxe: This package @INCREM@ glulxe-remglk.
glulxe: This package @INCCG@ glulxe-cheapglk.