From f06c9cfe6b4d0d82fa18c3d578cb4cb3b949d8b8 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 23 Jan 2018 01:02:37 -0500 Subject: games/adl: Updated for version 20110628. Signed-off-by: B. Watson --- games/adl/README | 8 +- games/adl/README_versions.txt | 21 ++++ games/adl/adl.SlackBuild | 125 +++++++++++++++++-- games/adl/adl.info | 24 +++- games/adl/compilefixes.diff | 272 ------------------------------------------ games/adl/compilefixes11.diff | 99 +++++++++++++++ games/adl/compilefixes93.diff | 272 ++++++++++++++++++++++++++++++++++++++++++ games/adl/slack-desc | 2 +- 8 files changed, 532 insertions(+), 291 deletions(-) create mode 100644 games/adl/README_versions.txt delete mode 100644 games/adl/compilefixes.diff create mode 100644 games/adl/compilefixes11.diff create mode 100644 games/adl/compilefixes93.diff (limited to 'games/adl') 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/compilefixes.diff b/games/adl/compilefixes.diff deleted file mode 100644 index 13b87cf52e..0000000000 --- a/games/adl/compilefixes.diff +++ /dev/null @@ -1,272 +0,0 @@ -diff -Naur adl/adlcomp/adlcomp.c adl.patched/adlcomp/adlcomp.c ---- adl/adlcomp/adlcomp.c 1991-05-10 07:17:56.000000000 -0400 -+++ adl.patched/adlcomp/adlcomp.c 2015-02-16 17:59:34.000000000 -0500 -@@ -55,8 +55,6 @@ - *outname = "adlcomp.out", /* Default output file name */ - *dirnames[MAXDIR]; /* -i names */ - --extern char *calloc(); /* Memory allocator */ -- - struct pagetab codetab; /* Structure for virtual code */ - - int16 NUM_VARS = 64, /* Default # of ADL variables */ -@@ -394,7 +392,7 @@ - getfile() - { - char *fsave; -- char msg[ 80 ], nsave[ 512 ], t_in[ 512 ], *sprintf(); -+ char msg[ 80 ], nsave[ 512 ], t_in[ 512 ]; - int16 lsave, numsave, i, found; - - lexer(); /* Get a token. */ -diff -Naur adl/adlcomp/compdict.c adl.patched/adlcomp/compdict.c ---- adl/adlcomp/compdict.c 1991-05-10 07:18:03.000000000 -0400 -+++ adl.patched/adlcomp/compdict.c 2015-02-16 17:59:34.000000000 -0500 -@@ -7,9 +7,6 @@ - - #define HTSIZE 512 /* Size of a hash table */ - --char -- *calloc(); -- - /* Structure of a hash table entry */ - struct hash_entry { - struct symbol -@@ -187,7 +184,6 @@ - } - - --static - write_hash( fd, tab, writing ) - int - fd; -diff -Naur adl/adlcomp/makefile adl.patched/adlcomp/makefile ---- adl/adlcomp/makefile 1991-05-21 16:32:27.000000000 -0400 -+++ adl.patched/adlcomp/makefile 2015-02-16 17:59:34.000000000 -0500 -@@ -14,7 +14,7 @@ - BIN = /User/stephan/Adventures/adl - - # Flags for CC --CFLAGS = -I${INC} -O '-DADL_NAME="${BIN}/ADLrun"' -+CFLAGS = -I${INC} ${OPTFLAGS} '-DADL_NAME="/usr/games/adlrun"' - - # Flags for lint - LFLAGS = -DLINT -I${INC} -C -diff -Naur adl/adlrun/adlmacro.c adl.patched/adlrun/adlmacro.c ---- adl/adlrun/adlmacro.c 1991-05-10 07:18:40.000000000 -0400 -+++ adl.patched/adlrun/adlmacro.c 2015-02-16 17:59:34.000000000 -0500 -@@ -7,9 +7,6 @@ - struct macro - *mactab; - --extern char -- *calloc(); -- - define( str1, str2 ) - char - *str1, -diff -Naur adl/adlrun/adlrun.c adl.patched/adlrun/adlrun.c ---- adl/adlrun/adlrun.c 1991-05-10 07:18:28.000000000 -0400 -+++ adl.patched/adlrun/adlrun.c 2015-02-16 17:59:34.000000000 -0500 -@@ -83,8 +83,6 @@ - *getml(); - # define calloc( size, num ) getml( (long)(size * num) ) - #else -- extern char -- *calloc(); - #endif - - #define islegal(c) (c&&(c!=' ')&&(c!='\t')&&(c!='\n')&&(c!='-')) -diff -Naur adl/adlrun/adlscrn.c adl.patched/adlrun/adlscrn.c ---- adl/adlrun/adlscrn.c 1991-05-21 16:15:59.000000000 -0400 -+++ adl.patched/adlrun/adlscrn.c 2015-02-16 17:59:34.000000000 -0500 -@@ -8,6 +8,8 @@ - #define TERMCAP - - #include -+#include -+#include - - #include "adltypes.h" - #include "adlprog.h" -diff -Naur adl/adlrun/adlstr.c adl.patched/adlrun/adlstr.c ---- adl/adlrun/adlstr.c 1991-05-10 07:18:38.000000000 -0400 -+++ adl.patched/adlrun/adlstr.c 2015-02-16 17:59:34.000000000 -0500 -@@ -7,9 +7,6 @@ - #include "vstring.h" - #include "adlrun.h" - --extern char -- *malloc(); -- - eqstring() - { - char -diff -Naur adl/adlrun/makefile adl.patched/adlrun/makefile ---- adl/adlrun/makefile 1991-05-21 16:18:10.000000000 -0400 -+++ adl.patched/adlrun/makefile 2015-02-16 17:59:56.000000000 -0500 -@@ -16,7 +16,7 @@ - BIN = /User/stephan/Adventures/adl - - # Flags for CC --CFLAGS = -I${INC} -O -+CFLAGS = -I${INC} ${OPTFLAGS} - - # Flags for the linker - you may need to change -lcurses to -ltermcap - # or -ltermlib. -diff -Naur adl/adlrun/rtdict.c adl.patched/adlrun/rtdict.c ---- adl/adlrun/rtdict.c 1991-05-10 07:18:22.000000000 -0400 -+++ adl.patched/adlrun/rtdict.c 2015-02-16 17:59:34.000000000 -0500 -@@ -21,9 +21,6 @@ - static struct letter - *trie; /* The dictionary */ - --char -- *malloc(); -- - /***************************************************************\ - * * - * new_letter( let ) - allocate a new letter for the * -diff -Naur adl/include/adlrun.h adl.patched/include/adlrun.h ---- adl/include/adlrun.h 1991-05-10 07:15:37.000000000 -0400 -+++ adl.patched/include/adlrun.h 2015-02-16 17:59:34.000000000 -0500 -@@ -147,7 +147,6 @@ - nummacro(); /* Returns number of macros defined */ - - extern char -- *malloc(), /* Memory allocation */ - *findone(), /* Find a symbol. */ - *expand(); /* Try to macro-expand a string */ - -diff -Naur adl/include/adltypes.h adl.patched/include/adltypes.h ---- adl/include/adltypes.h 1991-05-21 16:40:38.000000000 -0400 -+++ adl.patched/include/adltypes.h 2015-02-16 17:59:34.000000000 -0500 -@@ -1,3 +1,6 @@ -+#include -+#include -+ - /* Undefine any predefined things */ - #ifdef HPUX - # undef HPUX -@@ -100,7 +103,7 @@ - typedef unsigned short address; - # define SRAND srand - # define RAND rand() --# define RB O_RDWR -+# define RB O_RDONLY - # define WB (O_RDWR | O_CREAT | O_TRUNC) - #endif - -@@ -111,7 +114,7 @@ - typedef unsigned short address; - # define SRAND srandom - # define RAND random() --# define RB O_RDWR -+# define RB O_RDONLY - # define WB (O_RDWR | O_CREAT | O_TRUNC) - #endif - -@@ -123,7 +126,7 @@ - # define SRAND srand - # define RAND rand() - # define time mytime --# define RB O_RDWR -+# define RB O_RDONLY - # define WB (O_RDWR | O_CREAT | O_TRUNC) - #endif - -diff -Naur adl/misc/adldebug.c adl.patched/misc/adldebug.c ---- adl/misc/adldebug.c 1991-05-10 07:21:18.000000000 -0400 -+++ adl.patched/misc/adldebug.c 2015-02-16 17:59:34.000000000 -0500 -@@ -46,9 +46,6 @@ - address *routspace; /* Routine indexes */ - int32 *str_tab; /* String table */ - --char -- *malloc(); /* Memory allocator */ -- - main( argc, argv ) - int - argc; -diff -Naur adl/misc/adltouch.c adl.patched/misc/adltouch.c ---- adl/misc/adltouch.c 1991-05-10 07:21:22.000000000 -0400 -+++ adl.patched/misc/adltouch.c 2015-02-16 17:59:34.000000000 -0500 -@@ -1,6 +1,7 @@ - /* Adltouch - touch an ADL save file */ - - #include -+#include - - #if MSDOS - # define RB "rb+" -diff -Naur adl/misc/makefile adl.patched/misc/makefile ---- adl/misc/makefile 1991-05-21 16:10:15.000000000 -0400 -+++ adl.patched/misc/makefile 2015-02-16 18:00:06.000000000 -0500 -@@ -5,7 +5,7 @@ - INC = ../include - - # Flags for CC --CFLAGS = -O -I${INC} -+CFLAGS = ${OPTFLAGS} -I${INC} - - # Commands for shar - # AR = shar -c -v -diff -Naur adl/samples/aard/makefile adl.patched/samples/aard/makefile ---- adl/samples/aard/makefile 1991-05-10 07:16:46.000000000 -0400 -+++ adl.patched/samples/aard/makefile 2015-02-16 17:59:34.000000000 -0500 -@@ -7,7 +7,7 @@ - all : aard - - aard : *.adl ../../adlcomp/adlcomp ../standard.adl -- adlcomp aard.adl -w -o aard -i.. -+ ../../adlcomp/adlcomp aard.adl -w -o aard -i.. - shar : aard1.shar aard2.shar - - clean : -diff -Naur adl/samples/demos/makefile adl.patched/samples/demos/makefile ---- adl/samples/demos/makefile 1991-05-10 07:17:08.000000000 -0400 -+++ adl.patched/samples/demos/makefile 2015-02-16 17:59:34.000000000 -0500 -@@ -19,13 +19,13 @@ - > ${D}demos.shar ) - - actdemo : actdemo.adl ../standard.adl -- adlcomp actdemo.adl -o actdemo -i .. -+ ../../adlcomp/adlcomp actdemo.adl -o actdemo -i .. - - baby : baby.adl ../standard.adl -- adlcomp baby.adl -i.. -o baby -+ ../../adlcomp/adlcomp baby.adl -i.. -o baby - - multi : multi.adl -- adlcomp multi.adl -o multi -+ ../../adlcomp/adlcomp multi.adl -o multi - - tiny : tiny.adl ../standard.adl -- adlcomp tiny.adl -i.. -o tiny -+ ../../adlcomp/adlcomp tiny.adl -i.. -o tiny -diff -Naur adl/samples/mpu/makefile adl.patched/samples/mpu/makefile ---- adl/samples/mpu/makefile 1991-05-10 07:17:32.000000000 -0400 -+++ adl.patched/samples/mpu/makefile 2015-02-16 17:59:34.000000000 -0500 -@@ -7,7 +7,7 @@ - all : mpu - - mpu : *.adl ../../adlcomp/adlcomp ../standard.adl -- adlcomp mpu.adl -i.. -o mpu -+ ../../adlcomp/adlcomp mpu.adl -i.. -o mpu - - shar : mpu1.shar mpu2.shar - -diff -Naur adl/util/makefile adl.patched/util/makefile ---- adl/util/makefile 1991-05-10 07:15:58.000000000 -0400 -+++ adl.patched/util/makefile 2015-02-16 18:00:55.000000000 -0500 -@@ -4,8 +4,8 @@ - B = .. - D = util/ - --DFLAGS = -O --CFLAGS = -I${INC} ${DFLAGS} -+DFLAGS = -+CFLAGS = -I${INC} ${DFLAGS} ${OPTFLAGS} - - OBJS = vstring.o virtmem.o mytime.o - 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 ++#include ++#include ++#include ++#include ++#include ++ + #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/compilefixes93.diff b/games/adl/compilefixes93.diff new file mode 100644 index 0000000000..5e6ecd58f6 --- /dev/null +++ b/games/adl/compilefixes93.diff @@ -0,0 +1,272 @@ +diff -Naur adl/adlcomp/adlcomp.c adl.patched/adlcomp/adlcomp.c +--- adl/adlcomp/adlcomp.c 1991-05-10 07:17:56.000000000 -0400 ++++ adl.patched/adlcomp/adlcomp.c 2015-02-16 17:59:34.000000000 -0500 +@@ -55,8 +55,6 @@ + *outname = "adlcomp.out", /* Default output file name */ + *dirnames[MAXDIR]; /* -i names */ + +-extern char *calloc(); /* Memory allocator */ +- + struct pagetab codetab; /* Structure for virtual code */ + + int16 NUM_VARS = 64, /* Default # of ADL variables */ +@@ -394,7 +392,7 @@ + getfile() + { + char *fsave; +- char msg[ 80 ], nsave[ 512 ], t_in[ 512 ], *sprintf(); ++ char msg[ 80 ], nsave[ 512 ], t_in[ 512 ]; + int16 lsave, numsave, i, found; + + lexer(); /* Get a token. */ +diff -Naur adl/adlcomp/compdict.c adl.patched/adlcomp/compdict.c +--- adl/adlcomp/compdict.c 1991-05-10 07:18:03.000000000 -0400 ++++ adl.patched/adlcomp/compdict.c 2015-02-16 17:59:34.000000000 -0500 +@@ -7,9 +7,6 @@ + + #define HTSIZE 512 /* Size of a hash table */ + +-char +- *calloc(); +- + /* Structure of a hash table entry */ + struct hash_entry { + struct symbol +@@ -187,7 +184,6 @@ + } + + +-static + write_hash( fd, tab, writing ) + int + fd; +diff -Naur adl/adlcomp/makefile adl.patched/adlcomp/makefile +--- adl/adlcomp/makefile 1991-05-21 16:32:27.000000000 -0400 ++++ adl.patched/adlcomp/makefile 2015-02-16 17:59:34.000000000 -0500 +@@ -14,7 +14,7 @@ + BIN = /User/stephan/Adventures/adl + + # Flags for CC +-CFLAGS = -I${INC} -O '-DADL_NAME="${BIN}/ADLrun"' ++CFLAGS = -I${INC} ${OPTFLAGS} '-DADL_NAME="/usr/games/adlrun93"' + + # Flags for lint + LFLAGS = -DLINT -I${INC} -C +diff -Naur adl/adlrun/adlmacro.c adl.patched/adlrun/adlmacro.c +--- adl/adlrun/adlmacro.c 1991-05-10 07:18:40.000000000 -0400 ++++ adl.patched/adlrun/adlmacro.c 2015-02-16 17:59:34.000000000 -0500 +@@ -7,9 +7,6 @@ + struct macro + *mactab; + +-extern char +- *calloc(); +- + define( str1, str2 ) + char + *str1, +diff -Naur adl/adlrun/adlrun.c adl.patched/adlrun/adlrun.c +--- adl/adlrun/adlrun.c 1991-05-10 07:18:28.000000000 -0400 ++++ adl.patched/adlrun/adlrun.c 2015-02-16 17:59:34.000000000 -0500 +@@ -83,8 +83,6 @@ + *getml(); + # define calloc( size, num ) getml( (long)(size * num) ) + #else +- extern char +- *calloc(); + #endif + + #define islegal(c) (c&&(c!=' ')&&(c!='\t')&&(c!='\n')&&(c!='-')) +diff -Naur adl/adlrun/adlscrn.c adl.patched/adlrun/adlscrn.c +--- adl/adlrun/adlscrn.c 1991-05-21 16:15:59.000000000 -0400 ++++ adl.patched/adlrun/adlscrn.c 2015-02-16 17:59:34.000000000 -0500 +@@ -8,6 +8,8 @@ + #define TERMCAP + + #include ++#include ++#include + + #include "adltypes.h" + #include "adlprog.h" +diff -Naur adl/adlrun/adlstr.c adl.patched/adlrun/adlstr.c +--- adl/adlrun/adlstr.c 1991-05-10 07:18:38.000000000 -0400 ++++ adl.patched/adlrun/adlstr.c 2015-02-16 17:59:34.000000000 -0500 +@@ -7,9 +7,6 @@ + #include "vstring.h" + #include "adlrun.h" + +-extern char +- *malloc(); +- + eqstring() + { + char +diff -Naur adl/adlrun/makefile adl.patched/adlrun/makefile +--- adl/adlrun/makefile 1991-05-21 16:18:10.000000000 -0400 ++++ adl.patched/adlrun/makefile 2015-02-16 17:59:56.000000000 -0500 +@@ -16,7 +16,7 @@ + BIN = /User/stephan/Adventures/adl + + # Flags for CC +-CFLAGS = -I${INC} -O ++CFLAGS = -I${INC} ${OPTFLAGS} + + # Flags for the linker - you may need to change -lcurses to -ltermcap + # or -ltermlib. +diff -Naur adl/adlrun/rtdict.c adl.patched/adlrun/rtdict.c +--- adl/adlrun/rtdict.c 1991-05-10 07:18:22.000000000 -0400 ++++ adl.patched/adlrun/rtdict.c 2015-02-16 17:59:34.000000000 -0500 +@@ -21,9 +21,6 @@ + static struct letter + *trie; /* The dictionary */ + +-char +- *malloc(); +- + /***************************************************************\ + * * + * new_letter( let ) - allocate a new letter for the * +diff -Naur adl/include/adlrun.h adl.patched/include/adlrun.h +--- adl/include/adlrun.h 1991-05-10 07:15:37.000000000 -0400 ++++ adl.patched/include/adlrun.h 2015-02-16 17:59:34.000000000 -0500 +@@ -147,7 +147,6 @@ + nummacro(); /* Returns number of macros defined */ + + extern char +- *malloc(), /* Memory allocation */ + *findone(), /* Find a symbol. */ + *expand(); /* Try to macro-expand a string */ + +diff -Naur adl/include/adltypes.h adl.patched/include/adltypes.h +--- adl/include/adltypes.h 1991-05-21 16:40:38.000000000 -0400 ++++ adl.patched/include/adltypes.h 2015-02-16 17:59:34.000000000 -0500 +@@ -1,3 +1,6 @@ ++#include ++#include ++ + /* Undefine any predefined things */ + #ifdef HPUX + # undef HPUX +@@ -100,7 +103,7 @@ + typedef unsigned short address; + # define SRAND srand + # define RAND rand() +-# define RB O_RDWR ++# define RB O_RDONLY + # define WB (O_RDWR | O_CREAT | O_TRUNC) + #endif + +@@ -111,7 +114,7 @@ + typedef unsigned short address; + # define SRAND srandom + # define RAND random() +-# define RB O_RDWR ++# define RB O_RDONLY + # define WB (O_RDWR | O_CREAT | O_TRUNC) + #endif + +@@ -123,7 +126,7 @@ + # define SRAND srand + # define RAND rand() + # define time mytime +-# define RB O_RDWR ++# define RB O_RDONLY + # define WB (O_RDWR | O_CREAT | O_TRUNC) + #endif + +diff -Naur adl/misc/adldebug.c adl.patched/misc/adldebug.c +--- adl/misc/adldebug.c 1991-05-10 07:21:18.000000000 -0400 ++++ adl.patched/misc/adldebug.c 2015-02-16 17:59:34.000000000 -0500 +@@ -46,9 +46,6 @@ + address *routspace; /* Routine indexes */ + int32 *str_tab; /* String table */ + +-char +- *malloc(); /* Memory allocator */ +- + main( argc, argv ) + int + argc; +diff -Naur adl/misc/adltouch.c adl.patched/misc/adltouch.c +--- adl/misc/adltouch.c 1991-05-10 07:21:22.000000000 -0400 ++++ adl.patched/misc/adltouch.c 2015-02-16 17:59:34.000000000 -0500 +@@ -1,6 +1,7 @@ + /* Adltouch - touch an ADL save file */ + + #include ++#include + + #if MSDOS + # define RB "rb+" +diff -Naur adl/misc/makefile adl.patched/misc/makefile +--- adl/misc/makefile 1991-05-21 16:10:15.000000000 -0400 ++++ adl.patched/misc/makefile 2015-02-16 18:00:06.000000000 -0500 +@@ -5,7 +5,7 @@ + INC = ../include + + # Flags for CC +-CFLAGS = -O -I${INC} ++CFLAGS = ${OPTFLAGS} -I${INC} + + # Commands for shar + # AR = shar -c -v +diff -Naur adl/samples/aard/makefile adl.patched/samples/aard/makefile +--- adl/samples/aard/makefile 1991-05-10 07:16:46.000000000 -0400 ++++ adl.patched/samples/aard/makefile 2015-02-16 17:59:34.000000000 -0500 +@@ -7,7 +7,7 @@ + all : aard + + aard : *.adl ../../adlcomp/adlcomp ../standard.adl +- adlcomp aard.adl -w -o aard -i.. ++ ../../adlcomp/adlcomp aard.adl -w -o aard -i.. + shar : aard1.shar aard2.shar + + clean : +diff -Naur adl/samples/demos/makefile adl.patched/samples/demos/makefile +--- adl/samples/demos/makefile 1991-05-10 07:17:08.000000000 -0400 ++++ adl.patched/samples/demos/makefile 2015-02-16 17:59:34.000000000 -0500 +@@ -19,13 +19,13 @@ + > ${D}demos.shar ) + + actdemo : actdemo.adl ../standard.adl +- adlcomp actdemo.adl -o actdemo -i .. ++ ../../adlcomp/adlcomp actdemo.adl -o actdemo -i .. + + baby : baby.adl ../standard.adl +- adlcomp baby.adl -i.. -o baby ++ ../../adlcomp/adlcomp baby.adl -i.. -o baby + + multi : multi.adl +- adlcomp multi.adl -o multi ++ ../../adlcomp/adlcomp multi.adl -o multi + + tiny : tiny.adl ../standard.adl +- adlcomp tiny.adl -i.. -o tiny ++ ../../adlcomp/adlcomp tiny.adl -i.. -o tiny +diff -Naur adl/samples/mpu/makefile adl.patched/samples/mpu/makefile +--- adl/samples/mpu/makefile 1991-05-10 07:17:32.000000000 -0400 ++++ adl.patched/samples/mpu/makefile 2015-02-16 17:59:34.000000000 -0500 +@@ -7,7 +7,7 @@ + all : mpu + + mpu : *.adl ../../adlcomp/adlcomp ../standard.adl +- adlcomp mpu.adl -i.. -o mpu ++ ../../adlcomp/adlcomp mpu.adl -i.. -o mpu + + shar : mpu1.shar mpu2.shar + +diff -Naur adl/util/makefile adl.patched/util/makefile +--- adl/util/makefile 1991-05-10 07:15:58.000000000 -0400 ++++ adl.patched/util/makefile 2015-02-16 18:00:55.000000000 -0500 +@@ -4,8 +4,8 @@ + B = .. + D = util/ + +-DFLAGS = -O +-CFLAGS = -I${INC} ${DFLAGS} ++DFLAGS = ++CFLAGS = -I${INC} ${DFLAGS} ${OPTFLAGS} + + OBJS = vstring.o virtmem.o mytime.o + 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. -- cgit v1.2.3