summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/dungeon/DESCR11
-rw-r--r--games/dungeon/Makefile53
-rw-r--r--games/dungeon/PLIST3
-rw-r--r--games/dungeon/distinfo10
-rw-r--r--games/dungeon/patches/patch-aa24
-rw-r--r--games/dungeon/patches/patch-ab22
6 files changed, 123 insertions, 0 deletions
diff --git a/games/dungeon/DESCR b/games/dungeon/DESCR
new file mode 100644
index 00000000000..9016672fced
--- /dev/null
+++ b/games/dungeon/DESCR
@@ -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>, and modified to use his
+Glk API. (The dungeon debugger code was translated from Fortran to C by
+Paul Goyette <pgoyette@whooppee.com> 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 --git a/games/dungeon/Makefile b/games/dungeon/Makefile
new file mode 100644
index 00000000000..b6a6bfb15e9
--- /dev/null
+++ b/games/dungeon/Makefile
@@ -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
+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 --git a/games/dungeon/PLIST b/games/dungeon/PLIST
new file mode 100644
index 00000000000..fceee8628aa
--- /dev/null
+++ b/games/dungeon/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2009/11/28 20:25:40 pgoyette Exp $
+bin/dungeon
+share/dungeon/dundat
diff --git a/games/dungeon/distinfo b/games/dungeon/distinfo
new file mode 100644
index 00000000000..773d533e470
--- /dev/null
+++ b/games/dungeon/distinfo
@@ -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 --git a/games/dungeon/patches/patch-aa b/games/dungeon/patches/patch-aa
new file mode 100644
index 00000000000..b074a88dad7
--- /dev/null
+++ b/games/dungeon/patches/patch-aa
@@ -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 --git a/games/dungeon/patches/patch-ab b/games/dungeon/patches/patch-ab
new file mode 100644
index 00000000000..fb72eca5429
--- /dev/null
+++ b/games/dungeon/patches/patch-ab
@@ -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;