diff options
author | B. Watson <yalhcru@gmail.com> | 2018-01-23 01:02:37 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-01-27 07:43:52 +0700 |
commit | f06c9cfe6b4d0d82fa18c3d578cb4cb3b949d8b8 (patch) | |
tree | e494150130d697397bdf0dc12857dd437b0fa9e7 /games | |
parent | d986f637b4acc688ce751e86dfc8f5b00bde82da (diff) | |
download | slackbuilds-f06c9cfe6b4d0d82fa18c3d578cb4cb3b949d8b8.tar.gz |
games/adl: Updated for version 20110628.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games')
-rw-r--r-- | games/adl/README | 8 | ||||
-rw-r--r-- | games/adl/README_versions.txt | 21 | ||||
-rw-r--r-- | games/adl/adl.SlackBuild | 125 | ||||
-rw-r--r-- | games/adl/adl.info | 24 | ||||
-rw-r--r-- | games/adl/compilefixes11.diff | 99 | ||||
-rw-r--r-- | games/adl/compilefixes93.diff (renamed from games/adl/compilefixes.diff) | 2 | ||||
-rw-r--r-- | games/adl/slack-desc | 2 |
7 files changed, 261 insertions, 20 deletions
diff --git a/games/adl/README b/games/adl/README index 02bfbf10be..a01c834562 100644 --- a/games/adl/README +++ b/games/adl/README @@ -1,10 +1,14 @@ adl (compiler and runtime for adventure definition language) -ADL stands for Adventure Definition Language. It is a superset, with +ADL stands for Adventure Definition Language. It is a superset, with greatly enhanced capabilities, of an older language named DDL. DDL was originally written in 1981 by Michael Urban, Chris Kostanick, Michael Stein, Bruce Adler, and Warren Usui, all of the UCLA Computer Club. Includes compiler (adlcomp), runtime (adlrun), debugger (adldebug), and two sample games (aard and mpu). Documentation and sample code is -installed in /usr/doc/adl-$VERSION. +installed in /usr/doc/adl-$VERSION. Also, the ADL Programmer's Reference +Manual is available at: http://adl.sourceforge.net/ + +The package includes 3 versions of ADL, for maximum compatibility. See +README_versions.txt for details. diff --git a/games/adl/README_versions.txt b/games/adl/README_versions.txt new file mode 100644 index 0000000000..e25623ed5c --- /dev/null +++ b/games/adl/README_versions.txt @@ -0,0 +1,21 @@ +ADL has a long history, and both the source and compilied bytecode +formats have changed several times in incompatible ways. + +This package includes 3 versions of ADL: + +adl93: The version found in the Interactive Fiction Archive. This is +mainly included for historical interest. Confusingly enough, even though +this version dates from 1993, adlcomp93's banner reports "Version 3.2 - +June 7, 1987". + +adl03: The only sourceforge.net release done by the author. Most Windows +users will be using this version, since it's the only version released +as a Windows executable. If you want to share games with Windows users, +this is the version to use. Banner reports "Version 4.1 - January 25, +2002. This package installs these in /usr/games as adlcomp, adlrun, +adldebug. + +adl11: Last development version by the author, from sourceforge CVS. This +version has more and better documentation than the earlier versions, +and might be a good choice for a new game if Windows compatibility isn't +an issue. Banner reports "Version 5.0 - May 1, 2004". diff --git a/games/adl/adl.SlackBuild b/games/adl/adl.SlackBuild index da464f8818..3bad33f5c3 100644 --- a/games/adl/adl.SlackBuild +++ b/games/adl/adl.SlackBuild @@ -7,7 +7,7 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ # for details. -# VERSION is the timestamp of the tarball. Most of the files +# 93 (1993) is the timestamp of the tarball. Most of the files # inside are stamped May 10 1991, and the copyright notice # says 1987. @@ -15,11 +15,19 @@ # independent. 32-bit adlcomp produces files that won't run on a 64-bit # adlrun, and vice versa. +# 20180122 bkw: It turns out that adl development continued up +# through 2011, with a Windows and Linux binary release in 2003. +# The ADL language and bytecode formats were changed for the 2003 +# binary release, and changed again afterwards. For maximum +# compatibility, I'm now including 3 versions of adl in the package. +# If the code in this script hurts your head, don't feel too bad, +# mine's aching right now. + # 20170621 bkw: add -j1 to the make commands. I got a mysterious # build failure that I couldn't duplicate, hopefully this fixes it. PRGNAM=adl -VERSION=${VERSION:-19930322} +VERSION=${VERSION:-20110628} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -36,18 +44,16 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +BITS=32 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" + BITS="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi set -e @@ -56,6 +62,11 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM +mkdir -p $PRGNAM +cd $PRGNAM + +### First, the old 19930322 version, installed as adl93. +YEAR=93 tar xvf $CWD/$PRGNAM.tar.Z cd $PRGNAM chown -R root:root . @@ -69,10 +80,10 @@ find -L . \ # - fix various compile errors (mostly relating to lack of ANSI prototypes). # - remove 'extern char *malloc()' and such, include system headers instead. # - add support for OPTFLAGS (instead of hard-coded -O in CFLAGS). -# - -DADL_NAME="/usr/games/adlrun" (for adlcomp's emitted shebang lines). +# - -DADL_NAME="/usr/games/adlrun93" (for adlcomp's emitted shebang lines). # - stop adlrun from opening game files read/write: it never writes to them, # and the open fails for e.g. non-root user trying to run /usr/games/aard. -patch -p1 < $CWD/compilefixes.diff +patch -p1 < $CWD/compilefixes$YEAR.diff # 'make install' doesn't create directories. mkdir -p $PKG/usr/games $PKG/usr/man/man6 @@ -92,17 +103,111 @@ make -j1 -C samples clean # use reconstituted man pages instead of the preformatted ones in the # source. See fixman.sh. +# Even though we're shipping 3 versions of adl, there's only one set +# of man pages because nobody ever updated them. for page in $CWD/man/*.6; do gzip -9c < $page > $PKG/usr/man/man6/$( basename $page ).gz done -DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION +DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM$YEAR mkdir -p $DOCDIR # rename this so no GUIs think it's a MS Word doc: cp -a man/adl.doc $DOCDIR/adl.doc.txt cp -a copyrigh readme samples $DOCDIR -cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$PRGNAM.SlackBuild +# rename everything +for bin in adlcomp adlrun adldebug; do + mv $PKG/usr/games/$bin $PKG/usr/games/$bin$YEAR + ln -s $bin.6.gz $PKG/usr/man/man6/$bin$YEAR.6.gz +done + +### Next, the 2003 binary-only release. No man pages, almost no docs, +# and don't install compiled sample games. The "64-bit" binaries are +# actually statified (static) 32-bit, which MUST NOT be stripped! +# AFAICT, this is the most commonly used version in the ADL community, +# so these get symlinked to the bare names (adlrun03 => adlrun). +YEAR=03 +cd $TMP/$PRGNAM +tar xvf $CWD/${PRGNAM}_linux${BITS}_1_0.tar.gz +cd ADL_linux${BITS}_1_0 +chown -R root:root . + +# Bonus tutorial for hardcore SlackBuilders: +# The shebang line is hard-coded in adlcomp, but sed works on binaries, +# and we can use it to change the compiled-in string. +# The rules for doing this: +# 1. All occurrences of the text to replace will be changed, so make +# sure either (a) it occurs only once, or else (b) you really do want +# them all changed. +# 2. Replacement must be shorter than the original text. +# 3. Replacement must end with \x00. This is the famous NUL terminator +# that C uses to terminate strings. +# 4. Only replace as many original characters as the replacement length, +# including the NUL terminator. +# 5. The modified binary *must be* **exactly** the same size in bytes as +# the original was. If not, you didn't follow rules 1-4 correctly! +# 6. If you're dealing with non-ASCII character encoding (e.g. UTF-8 or +# UCS-2), make *damn sure* you know what you're doing! It's possible +# but not necessarily straightforward. ASCII is easier (one byte is +# one character). +# In the line below, the full original text was plain ASCII, +# "/users/cunniff/bin/adlrun". We only replace "/users/cunniff/bin/a". The +# \x00 terminates the string, replacing the "a", and the rest of the +# original text ("dlrun\x00") is left as-is in the binary (C code will +# ignore anything after the first \x00, so it just acts as padding). + +sed -i 's,/users/cunniff/bin/a,/usr/games/adlrun03\x00,' adlcomp + +# DO NOT strip these. The pseudo-64-bit binaries break if you do, +# because they're actually 32-bit pseudo-static, created by statifier. +# "file" shows them as "dynamically linked" but "ldd" says they're not, +# and strip gets powerfully confused by this state of affairs. +for bin in adlcomp adlrun adldebug; do + install -m0755 -oroot -groot $bin $PKG/usr/games/$bin$YEAR + ln -s $bin$YEAR $PKG/usr/games/$bin + ln -s $bin.6.gz $PKG/usr/man/man6/$bin$YEAR.6.gz +done + +DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM$YEAR +mkdir -p $DOCDIR +cp -a readme *.txt $DOCDIR + +# The samples come from CVS, circa 2003 +tar xvf $CWD/$PRGNAM$YEAR-samples.tar.gz +chown -R root:root $PRGNAM$YEAR-samples +cp -a $PRGNAM$YEAR-samples $DOCDIR/samples + +### Last, the 2011 development version, from CVS. We install the docs +# but not the man pages or compiled sample games. +YEAR=11 +cd $TMP/$PRGNAM +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . + +# Patch is similar to the one for adl93. +patch -p1 < $CWD/compilefixes$YEAR.diff + +# Install the docs first, so we don't get the compiled samples/demos. +DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM$YEAR +mkdir -p $DOCDIR +chmod 644 doc/*.* +cp -a C* porting readme doc samples $DOCDIR + +make -j1 all BIN=$PKG/usr/games OPTFLAGS="$SLKCFLAGS" + +install -s -m0755 adlcomp/adlcomp $PKG/usr/games/adlcomp$YEAR +install -s -m0755 adlrun/adlrun $PKG/usr/games/adlrun$YEAR +install -s -m0755 misc/adldebug $PKG/usr/games/adldebug$YEAR + +for bin in adlcomp adlrun adldebug; do + ln -s $bin.6.gz $PKG/usr/man/man6/$bin$YEAR.6.gz +done + +### OK, now regular SBo stuff from here on out. + +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README_versions.txt > $PKG/usr/doc/$PRGNAM-$VERSION/README_versions.txt mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/games/adl/adl.info b/games/adl/adl.info index af05f49e30..0747e3215f 100644 --- a/games/adl/adl.info +++ b/games/adl/adl.info @@ -1,10 +1,22 @@ PRGNAM="adl" -VERSION="19930322" -HOMEPAGE="http://www.ifarchive.org/indexes/if-archiveXprogrammingXadl.html" -DOWNLOAD="http://www.ifarchive.org/if-archive/programming/adl/adl.tar.Z" -MD5SUM="b01115cc2625441caf818e60527b4095" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" +VERSION="20110628" +HOMEPAGE="http://adl.sourceforge.net/" +DOWNLOAD="http://www.ifarchive.org/if-archive/programming/adl/adl.tar.Z \ + https://sourceforge.net/projects/adl/files/adl/adl%20binary%201.0/adl_linux32_1_0.tar.gz \ + http://urchlay.naptime.net/~urchlay/src/adl-20110628.tar.gz \ + http://urchlay.naptime.net/~urchlay/src/adl03-samples.tar.gz" +MD5SUM="b01115cc2625441caf818e60527b4095 \ + c487cd233972bd5de694d303806ac653 \ + 57b75b90bd09a5051270732a61c6e288 \ + 6edfe44f23a99078ca797c75273fbb0e" +DOWNLOAD_x86_64="http://www.ifarchive.org/if-archive/programming/adl/adl.tar.Z \ + http://urchlay.naptime.net/~urchlay/src/adl_linux64_1_0.tar.gz \ + http://urchlay.naptime.net/~urchlay/src/adl-20110628.tar.gz \ + http://urchlay.naptime.net/~urchlay/src/adl03-samples.tar.gz" +MD5SUM_x86_64="b01115cc2625441caf818e60527b4095 \ + 9c19e5a4ca7fa78b2d283b7ee00985c9 \ + 57b75b90bd09a5051270732a61c6e288 \ + 6edfe44f23a99078ca797c75273fbb0e" REQUIRES="" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" diff --git a/games/adl/compilefixes11.diff b/games/adl/compilefixes11.diff new file mode 100644 index 0000000000..332c3ec40a --- /dev/null +++ b/games/adl/compilefixes11.diff @@ -0,0 +1,99 @@ +diff -Naur adl-20110628/adlcomp/Makefile adl-20110628.work/adlcomp/Makefile +--- adl-20110628/adlcomp/Makefile 2004-05-03 20:02:56.000000000 -0400 ++++ adl-20110628.work/adlcomp/Makefile 2018-01-22 13:56:24.643486172 -0500 +@@ -16,7 +16,7 @@ + # Flags for CC + CC = gcc + OPTG = +-CFLAGS = -I${INC} $(OPTG) '-DADL_NAME="${BIN}/adlrun"' ++CFLAGS = -I${INC} $(OPTG) '-DADL_NAME="/usr/games/adlrun11"' + + # Flags for lint + LFLAGS = -DLINT -I${INC} -C +diff -Naur adl-20110628/adlcomp/compdict.c adl-20110628.work/adlcomp/compdict.c +--- adl-20110628/adlcomp/compdict.c 2004-05-02 18:54:16.000000000 -0400 ++++ adl-20110628.work/adlcomp/compdict.c 2018-01-22 13:29:34.829483442 -0500 +@@ -15,9 +15,6 @@ + + #define HTSIZE 512 /* Size of a hash table */ + +-char +- *calloc(); +- + /* Structure of a hash table entry */ + struct hash_entry { + struct symbol +diff -Naur adl-20110628/adlrun/Makefile adl-20110628.work/adlrun/Makefile +--- adl-20110628/adlrun/Makefile 2004-01-03 00:15:24.000000000 -0500 ++++ adl-20110628.work/adlrun/Makefile 2018-01-22 13:56:07.076486143 -0500 +@@ -16,7 +16,7 @@ + BIN = /users/cunniff/bin + + # Flags for CC +-CFLAGS = -I$(INC) -O ++CFLAGS = -I$(INC) -O $(OPTFLAGS) + CC = gcc + + # Flags for the linker - you may need to change -lcurses to -ltermcap +diff -Naur adl-20110628/adlrun/adlrun.c adl-20110628.work/adlrun/adlrun.c +--- adl-20110628/adlrun/adlrun.c 2004-01-01 13:42:46.000000000 -0500 ++++ adl-20110628.work/adlrun/adlrun.c 2018-01-22 14:30:29.347489640 -0500 +@@ -157,7 +157,7 @@ + insertkey( "then", SEP, 0, 0 ); + + rand_seed(); +- infile = fopen( inname, "rb+" ); ++ infile = fopen( inname, "rb" ); + if( !infile ) { + fprintf( stderr, "Error opening file %s\n", inname ); + exit( -1 ); +diff -Naur adl-20110628/include/adltypes.h adl-20110628.work/include/adltypes.h +--- adl-20110628/include/adltypes.h 2004-01-01 13:42:46.000000000 -0500 ++++ adl-20110628.work/include/adltypes.h 2018-01-22 13:32:47.774483769 -0500 +@@ -1,3 +1,10 @@ ++#include <string.h> ++#include <stdlib.h> ++#include <unistd.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <sys/wait.h> ++ + #include "undef.h" /* Undefine any predefined things */ + + /***************************************************************\ +diff -Naur adl-20110628/misc/Makefile adl-20110628.work/misc/Makefile +--- adl-20110628/misc/Makefile 2002-01-29 00:10:08.000000000 -0500 ++++ adl-20110628.work/misc/Makefile 2018-01-22 13:55:50.787486115 -0500 +@@ -5,7 +5,7 @@ + INC = ../include + + # Flags for CC +-CFLAGS = -O -DHPUX -I${INC} ++CFLAGS = -O -DHPUX -I${INC} $(OPTFLAGS) + CC = gcc + + # Commands for shar +diff -Naur adl-20110628/samples/mpu/Makefile adl-20110628.work/samples/mpu/Makefile +--- adl-20110628/samples/mpu/Makefile 2011-01-13 11:16:29.000000000 -0500 ++++ adl-20110628.work/samples/mpu/Makefile 2018-01-22 14:28:53.217489477 -0500 +@@ -12,7 +12,7 @@ + shar : mpu1.shar mpu2.shar + + clean : +- rm -f.adx mpu core mpu1.shar mpu2.shar ++ rm -f .adx mpu core mpu1.shar mpu2.shar + + mpu1.shar : README COPYRIGHT Makefile locales.adl \ + mpu.adl routines.adl verbs.adl +diff -Naur adl-20110628/util/Makefile adl-20110628.work/util/Makefile +--- adl-20110628/util/Makefile 2002-01-29 00:10:08.000000000 -0500 ++++ adl-20110628.work/util/Makefile 2018-01-22 13:55:45.222486106 -0500 +@@ -6,7 +6,7 @@ + + DFLAGS = -O + CC = gcc +-CFLAGS = -I${INC} ${DFLAGS} ++CFLAGS = -I${INC} ${DFLAGS} $(OPTFLAGS) + + OBJS = vstring.o virtmem.o mytime.o + diff --git a/games/adl/compilefixes.diff b/games/adl/compilefixes93.diff index 13b87cf52e..5e6ecd58f6 100644 --- a/games/adl/compilefixes.diff +++ b/games/adl/compilefixes93.diff @@ -48,7 +48,7 @@ diff -Naur adl/adlcomp/makefile adl.patched/adlcomp/makefile # Flags for CC -CFLAGS = -I${INC} -O '-DADL_NAME="${BIN}/ADLrun"' -+CFLAGS = -I${INC} ${OPTFLAGS} '-DADL_NAME="/usr/games/adlrun"' ++CFLAGS = -I${INC} ${OPTFLAGS} '-DADL_NAME="/usr/games/adlrun93"' # Flags for lint LFLAGS = -DLINT -I${INC} -C diff --git a/games/adl/slack-desc b/games/adl/slack-desc index 8732d129f9..fbe7f9e06f 100644 --- a/games/adl/slack-desc +++ b/games/adl/slack-desc @@ -8,7 +8,7 @@ |-----handy-ruler------------------------------------------------------| adl: adl (compiler and runtime for adventure definition language) adl: -adl: ADL stands for Adventure Definition Language. It is a superset, with +adl: ADL stands for Adventure Definition Language. It is a superset, with adl: greatly enhanced capabilities, of an older language named DDL. DDL was adl: originally written in 1981 by Michael Urban, Chris Kostanick, Michael adl: Stein, Bruce Adler, and Warren Usui, all of the UCLA Computer Club. |