pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/dungeon Import of Andrew Plotkin's C-translation...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8f8f381142e4
branches:  trunk
changeset: 567902:8f8f381142e4
user:      pgoyette <pgoyette%pkgsrc.org@localhost>
date:      Sat Nov 28 20:25:40 2009 +0000

description:
Import of Andrew Plotkin's C-translation of Dungeon 3.2B, using his
"glk" API, and including the gdt (game debugger tool) from the Fortran
version.

diffstat:

 games/dungeon/DESCR            |  11 ++++++++
 games/dungeon/Makefile         |  53 ++++++++++++++++++++++++++++++++++++++++++
 games/dungeon/PLIST            |   3 ++
 games/dungeon/distinfo         |  10 +++++++
 games/dungeon/patches/patch-aa |  24 +++++++++++++++++++
 games/dungeon/patches/patch-ab |  22 +++++++++++++++++
 6 files changed, 123 insertions(+), 0 deletions(-)

diffs (147 lines):

diff -r b6cafd8b5b0b -r 8f8f381142e4 games/dungeon/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/dungeon/DESCR       Sat Nov 28 20:25:40 2009 +0000
@@ -0,0 +1,11 @@
+Dungeon is a development prototype of the game ZORK(tm), which is
+available commercially from Infocom, Inc, on most personal computers.
+Copyright on the Dungeon sources is retained by Infocom, and commercial
+use is strictly prohibited.  ZORK(tm) is a trademark of Infocom, Inc.
+
+This version is translated from the original dungeon-3.2b Fortran sources
+to C by Andrew Plotkin <erkyrath%eblong.com@localhost>, and modified to use his
+Glk API.  (The dungeon debugger code was translated from Fortran to C by
+Paul Goyette <pgoyette%whooppee.com@localhost> and included in this package as a
+patch file.)  The Fortran sources were themselves were translated from the
+original MDL.  Version 3.2B is the latest known version.
diff -r b6cafd8b5b0b -r 8f8f381142e4 games/dungeon/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/dungeon/Makefile    Sat Nov 28 20:25:40 2009 +0000
@@ -0,0 +1,53 @@
+# $NetBSD: Makefile,v 1.1 2009/11/28 20:25:40 pgoyette Exp $
+#
+
+DISTNAME=      dungeon-3.2b
+DISTFILES=     dungeon-gdt-glk.tar.gz \
+               glkterm-080.tar.gz
+CATEGORIES=    games
+MASTER_SITES=  http://eblong.com/zarf/glk/
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://eblong.com/zarf/glk/
+COMMENT=       Classic game of Dungeon
+
+# There really isn't any license in any of the source code or in the
+# accompanying documentation, but the sources of many versions have
+# been freely made available for many years with the assumption that
+# the "No commercial use" comment following the copyright statement
+# implies a license to use in non-commercial applications.  We'll adopt
+# that implication here.
+
+LICENSE=               dungeon-license
+RESTRICTED=            No license to redistribute
+NO_BIN_ON_CDROM=       ${RESTRICTED}
+NO_BIN_ON_FTP=         ${RESTRICTED}
+NO_SRC_ON_CDROM=       ${RESTRICTED}
+NO_SRC_ON_FTP=         ${RESTRICTED}
+
+WRKSRC=                ${WRKDIR}/dungeon-gdt
+DATADIR=       ${PREFIX}/share/dungeon
+
+MAKE_FLAGS+=   DATADIR=${DATADIR}
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.dungeon
+PKG_SUPPORTED_OPTIONS= dungeon-gdt
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdungeon-gdt)
+MAKE_ENV+=     GDT_FLAG=-DHAVE_GDT
+.endif
+
+# Before we build the game itself, we need to build the glkterm library
+
+pre-build:
+       cd ${WRKDIR}/glkterm && env ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS}
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/dungeon ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_DATA_DIR} ${DESTDIR}${DATADIR}
+       ${INSTALL_DATA} ${WRKSRC}/dundat ${DESTDIR}${DATADIR}/
+
+.include "../../devel/ncurses/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r b6cafd8b5b0b -r 8f8f381142e4 games/dungeon/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/dungeon/PLIST       Sat Nov 28 20:25:40 2009 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2009/11/28 20:25:40 pgoyette Exp $
+bin/dungeon
+share/dungeon/dundat
diff -r b6cafd8b5b0b -r 8f8f381142e4 games/dungeon/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/dungeon/distinfo    Sat Nov 28 20:25:40 2009 +0000
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2009/11/28 20:25:40 pgoyette Exp $
+
+SHA1 (dungeon-gdt-glk.tar.gz) = ec148735ae713566c9511057473fbd899d673a6a
+RMD160 (dungeon-gdt-glk.tar.gz) = aed6e4a42c03be0a9bce2248dcab3370e1b1fbde
+Size (dungeon-gdt-glk.tar.gz) = 262052 bytes
+SHA1 (glkterm-080.tar.gz) = 8445929f9e00d773e3708aeae3bd3f602df2e97e
+RMD160 (glkterm-080.tar.gz) = 57e317e816a8c233fd0f2fe24a7c8a54c223edbc
+Size (glkterm-080.tar.gz) = 91260 bytes
+SHA1 (patch-aa) = d12f8125b0bfe51dbbe942af8f1c77a90ff23f21
+SHA1 (patch-ab) = d7d83456c67f39c75b9fa161b82257fdf10eb966
diff -r b6cafd8b5b0b -r 8f8f381142e4 games/dungeon/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/dungeon/patches/patch-aa    Sat Nov 28 20:25:40 2009 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-aa,v 1.1 2009/11/28 20:25:40 pgoyette Exp $
+
+Use an explicit 32-bit data type.
+
+--- ../glkterm/glk.h.orig      2009-11-20 14:08:17.000000000 -0800
++++ ../glkterm/glk.h   2009-11-20 13:06:19.000000000 -0800
+@@ -17,8 +17,15 @@
+ /* You may have to edit the definition of glui32 to make sure it's really a
+     32-bit unsigned integer type, and glsi32 to make sure it's really a
+     32-bit signed integer type. If they're not, horrible things will happen. */
+-typedef unsigned long glui32;
+-typedef signed long glsi32;
++/*
++ * typedef unsigned long glui32;
++ * typedef signed long glsi32;
++ */
++
++#include <sys/inttypes.h>
++
++typedef uint32_t glui32;
++typedef int32_t glsi32;
+ 
+ /* These are the compile-time conditionals that reveal various Glk optional
+     modules. */
diff -r b6cafd8b5b0b -r 8f8f381142e4 games/dungeon/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/dungeon/patches/patch-ab    Sat Nov 28 20:25:40 2009 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1 2009/11/28 20:25:40 pgoyette Exp $
+
+Remove an obsolete check that pointers fit into 32-bit data types.  I
+was unable to find any code remaining that depends on this, and at
+least one program (dungeon!) works just fine without having had to do
+any hashtable coding!
+
+--- ../glkterm/main.c.orig     2009-11-20 14:08:33.000000000 -0800
++++ ../glkterm/main.c  2009-11-20 13:14:24.000000000 -0800
+@@ -52,10 +52,12 @@
+         printf("Compile-time error: glui32 is not unsigned. Please fix glk.h.\n");
+         return 1;
+     }
++/*
+     if (sizeof(window_t *) > 4) {
+         printf("Compile-time error: Pointers cannot fit in a glui32. Start writing hashtable code.\n");
+         return 1;
+     }
++*/
+     
+     /* Now some argument-parsing. This is probably going to hurt. */
+     startdata.argc = 0;



Home | Main Index | Thread Index | Old Index