aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas <andreas@FreeBSD.org>1997-04-06 10:45:30 +0800
committerandreas <andreas@FreeBSD.org>1997-04-06 10:45:30 +0800
commit534ee640da2c2ef3f0074a0d66a529fc9ab4f77a (patch)
tree28b0d40850008b9ec89ce175c38a7ab6cc9d3632
parentd34334bf46cba98d24add37ec8e05a443c1cfa78 (diff)
downloadfreebsd-ports-graphics-534ee640da2c2ef3f0074a0d66a529fc9ab4f77a.tar.gz
freebsd-ports-graphics-534ee640da2c2ef3f0074a0d66a529fc9ab4f77a.tar.zst
freebsd-ports-graphics-534ee640da2c2ef3f0074a0d66a529fc9ab4f77a.zip
NetHack with Qt interface. Version 0.9 (for NetHack 3.2.2)
by Warwick Allison warwick@cs.uq.edu.au. The Qt interface has these extra features: Tiles (graphics) in the inventory and other item-menu windows. The player cursor changes colour as your relative hit-points drop. The message window greys-out older message. The item menus allow a count (click to left of icon - hidden feature). Icons for the major attributes and player states. Menus (only needed by newbie dungeon fodder). Variable size fonts and tiles. More space for the map as messages and status are side-by-side. You rarely need to put the mouse in a pop-up to interact with it. Macros - hidden feature - F1=multi-rest F2=multi-search F3=try-it It is much easier to code, so new feature-requests are more easily done. Sound support See: http://www.uq.edu.au/~cswallis/nhqt/
-rw-r--r--games/nethack-qt/Makefile59
-rw-r--r--games/nethack-qt/distinfo3
-rw-r--r--games/nethack-qt/files/include-unixconf.h.diff11
-rw-r--r--games/nethack-qt/files/patch-aa127
-rw-r--r--games/nethack-qt/files/sample.nethackrc88
-rw-r--r--games/nethack-qt/files/src-Makefile.diff39
-rw-r--r--games/nethack-qt/files/src-sounds.c.diff14
-rw-r--r--games/nethack-qt/pkg-comment1
-rw-r--r--games/nethack-qt/pkg-descr54
-rw-r--r--games/nethack-qt/pkg-plist186
-rw-r--r--games/nethack33-qt/Makefile59
-rw-r--r--games/nethack33-qt/distinfo3
-rw-r--r--games/nethack33-qt/files/include-unixconf.h.diff11
-rw-r--r--games/nethack33-qt/files/patch-aa127
-rw-r--r--games/nethack33-qt/files/sample.nethackrc88
-rw-r--r--games/nethack33-qt/files/src-Makefile.diff39
-rw-r--r--games/nethack33-qt/files/src-sounds.c.diff14
-rw-r--r--games/nethack33-qt/pkg-comment1
-rw-r--r--games/nethack33-qt/pkg-descr54
-rw-r--r--games/nethack33-qt/pkg-plist186
-rw-r--r--games/nethack34-qt/Makefile59
-rw-r--r--games/nethack34-qt/distinfo3
-rw-r--r--games/nethack34-qt/files/include-unixconf.h.diff11
-rw-r--r--games/nethack34-qt/files/patch-aa127
-rw-r--r--games/nethack34-qt/files/sample.nethackrc88
-rw-r--r--games/nethack34-qt/files/src-Makefile.diff39
-rw-r--r--games/nethack34-qt/files/src-sounds.c.diff14
-rw-r--r--games/nethack34-qt/pkg-comment1
-rw-r--r--games/nethack34-qt/pkg-descr54
-rw-r--r--games/nethack34-qt/pkg-plist186
30 files changed, 1746 insertions, 0 deletions
diff --git a/games/nethack-qt/Makefile b/games/nethack-qt/Makefile
new file mode 100644
index 00000000000..483e458f417
--- /dev/null
+++ b/games/nethack-qt/Makefile
@@ -0,0 +1,59 @@
+# New ports collection makefile for: nethack-qt
+# Version required: 3.2.2
+# Date created: So 6 Apr 1997 04:25:57 MET DST
+# Whom: Andreas Klemm <andreas@klemm.gtn.com>
+#
+# $Id$
+#
+
+DISTNAME= nethack-3.2.2
+PKGNAME= nethack-3.2.2-qt
+CATEGORIES= games x11
+MASTER_SITES= ftp://ftp.uu.net/pub/games/nethack/sources/ \
+ http://www.uq.edu.au/~cswallis/nhqt/ \
+ http://student.uq.edu.au/~s002434/ \
+ ${MASTER_SITE_GNU}
+QT_PATCH= nhqt0.9.tar.gz
+QT_SOUND= nhs.tar.gz
+DISTFILES= nethack-3.2.2.tar.gz ${QT_PATCH} ${QT_SOUND}
+
+MAINTAINER= andreas@FreeBSD.ORG
+
+LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm
+RUN_DEPENDS= auplay:${PORTSDIR}/audio/nas
+
+EXTRACT_ONLY= nethack-3.2.2.tar.gz
+USE_GMAKE= yes
+SHELL= /bin/sh
+MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
+
+pre-configure:
+ @cd ${WRKSRC}/win; tar xvzf ${DISTDIR}/${QT_PATCH}
+ @cd ${WRKSRC}; patch < win/Qt/nhqt.patch
+ @cd ${WRKSRC}/sys/unix; ${SHELL} setup.sh
+ @cd ${WRKSRC}/src; patch < ${FILESDIR}/src-Makefile.diff
+ @cd ${WRKSRC}/src; patch < ${FILESDIR}/src-sounds.c.diff
+ @cd ${WRKSRC}; patch < ${FILESDIR}/include-unixconf.h.diff
+
+post-install:
+ @cd ${WRKSRC}/doc; chmod 644 *.6
+ @cd ${WRKSRC}/doc; PREFIX=${PREFIX} ${MAKE} manpages
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/nethack
+ ${CP} ${WRKSRC}/doc/Guidebook.txt ${PREFIX}/share/doc/nethack
+.endif
+ @cd ${PREFIX}/lib/nethackdir; tar xzf ${DISTDIR}/${QT_SOUND}
+ @cd ${PREFIX}/lib/nethackdir; chown games.games *.au .nethackrc
+ @cd ${PREFIX}/lib/nethackdir; chmod 444 *.au .nethackrc
+ echo "-----------------------"
+ echo "post-installation hints
+ echo "-----------------------"
+ echo "a) Add this to your user environment:"
+ echo " setenv AUDIOSERVER `hostname`:0"
+ echo "b) Start the NAS audio server"
+ echo " auvoxware -aa & # -aa allows any host access"
+ echo "c) Copy the example nethackrc file from $FILESDIR to your"
+ echo " login directory:"
+ echo " cp $FILESDIR/sample.nethackrc $HOME/.nethackrc"
+
+.include <bsd.port.mk>
diff --git a/games/nethack-qt/distinfo b/games/nethack-qt/distinfo
new file mode 100644
index 00000000000..abd07b3b68a
--- /dev/null
+++ b/games/nethack-qt/distinfo
@@ -0,0 +1,3 @@
+MD5 (nethack-3.2.2.tar.gz) = c85de4d14453b3a2d182d1dfc2ca04df
+MD5 (nhqt0.9.tar.gz) = 9e59311148cc944978d8d04cb87adf9d
+MD5 (nhs.tar.gz) = 605f8bac130a9ad9857efd859d7a0dcf
diff --git a/games/nethack-qt/files/include-unixconf.h.diff b/games/nethack-qt/files/include-unixconf.h.diff
new file mode 100644
index 00000000000..53150d81811
--- /dev/null
+++ b/games/nethack-qt/files/include-unixconf.h.diff
@@ -0,0 +1,11 @@
+--- include/unixconf.h.orig Thu Mar 20 23:17:16 1997
++++ include/unixconf.h Thu Mar 20 23:17:29 1997
+@@ -42,7 +42,7 @@
+ /* #define AIX_31 /* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
+ * job control (note that AIX is SYSV otherwise)
+ * Also define this for AIX 3.2 */
+-#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
++/* #define TEXTCOLOR /* Use System V r3.2 terminfo color support */
+ /* and/or ANSI color support on termcap systems */
+ /* and/or X11 color */
+ #define POSIX_JOB_CONTROL /* use System V / POSIX job control
diff --git a/games/nethack-qt/files/patch-aa b/games/nethack-qt/files/patch-aa
new file mode 100644
index 00000000000..4f8040adbbc
--- /dev/null
+++ b/games/nethack-qt/files/patch-aa
@@ -0,0 +1,127 @@
+--- ./include/system.h.org Mon Mar 25 17:18:32 1996
++++ ./include/system.h Sun Apr 21 18:10:01 1996
+@@ -78,7 +78,7 @@
+ # if !defined(SUNOS4) || defined(RANDOM)
+ E void FDECL(srandom, (unsigned int));
+ # else
+-# ifndef bsdi
++# if !defined(bsdi) && !defined(__FreeBSD__)
+ E int FDECL(srandom, (unsigned int));
+ # endif
+ # endif
+--- ./include/unixconf.h.org Mon Mar 25 12:47:47 1996
++++ ./include/unixconf.h Sun Apr 21 18:10:02 1996
+@@ -31,7 +31,7 @@
+
+ /* define any of the following that are appropriate */
+ /* #define SVR4 /* use in addition to SYSV for System V Release 4 */
+-#define NETWORK /* if running on a networked system */
++/* #define NETWORK /* if running on a networked system */
+ /* e.g. Suns sharing a playground through NFS */
+ #define SUNOS4 /* SunOS 4.x */
+ /* #define LINUX /* Another Unix clone */
+@@ -42,12 +42,12 @@
+ /* #define AIX_31 /* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
+ * job control (note that AIX is SYSV otherwise)
+ * Also define this for AIX 3.2 */
+-/* #define TEXTCOLOR /* Use System V r3.2 terminfo color support */
++#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
+ /* and/or ANSI color support on termcap systems */
+ /* and/or X11 color */
+-/* #define POSIX_JOB_CONTROL /* use System V / POSIX job control
++#define POSIX_JOB_CONTROL /* use System V / POSIX job control
+ * (e.g., VSUSP) */
+-/* #define POSIX_TYPES /* use POSIX types for system calls and termios */
++#define POSIX_TYPES /* use POSIX types for system calls and termios */
+ /* define for many recent OS releases, including
+ * those with specific defines (since types are
+ * changing toward the standard from earlier chaos).
+@@ -125,7 +125,7 @@
+ * A stat system call is done on the mailbox every MAILCKFREQ moves.
+ */
+
+-#define MAIL /* Deliver mail during the game */
++/* #define MAIL /* Deliver mail during the game */
+
+ /* The Andrew Message System does mail a little differently from normal
+ * UNIX. Mail is deposited in the user's own directory in ~/Mailbox
+--- ./include/config.h.org Thu Feb 29 11:00:26 1996
++++ ./include/config.h Sun Apr 21 18:10:06 1996
+@@ -248,7 +248,7 @@
+ * would allow:
+ * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
+ */
+-/* # define USE_XPM /* Disable if you do not have the XPM library */
++# define USE_XPM /* Disable if you do not have the XPM library */
+ # ifdef USE_XPM
+ # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
+ # endif
+@@ -288,12 +288,12 @@
+
+ #ifdef UNIX
+ /* path and file name extension for compression program */
+-# define COMPRESS "/usr/ucb/compress" /* Lempel-Ziv compression */
+-# define COMPRESS_EXTENSION ".Z" /* compress's extension */
++/* # define COMPRESS "/usr/ucb/compress" /* Lempel-Ziv compression */
++/* # define COMPRESS_EXTENSION ".Z" /* compress's extension */
+
+ /* An example of one alternative you might want to use: */
+-/* # define COMPRESS "/usr/local/bin/gzip" /* FSF gzip compression */
+-/* # define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
++# define COMPRESS "/usr/bin/gzip" /* FSF gzip compression */
++# define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
+ #endif
+ #ifndef COMPRESS
+ # define INTERNAL_COMP /* control use of NetHack's compression routines */
+@@ -323,7 +323,7 @@
+ * otherwise it will be the current directory.
+ */
+ # ifndef HACKDIR
+-# define HACKDIR "/usr/games/lib/nethackdir" /* nethack directory */
++# define HACKDIR "/usr/local/lib/nethackdir" /* nethack directory */
+ # endif
+
+ /*
+--- ./sys/unix/Makefile.doc.org Wed Apr 3 21:17:35 1996
++++ ./sys/unix/Makefile.doc Sun Apr 21 18:10:03 1996
+@@ -31,7 +31,7 @@
+
+
+ GAME = nethack
+-MANDIR = /usr/man/man6
++MANDIR = ${PREFIX}/man/man6
+ MANEXT = 6
+
+ # manual installation for most BSD-style systems
+--- ./sys/unix/Makefile.top.org Mon Mar 25 17:22:00 1996
++++ ./sys/unix/Makefile.top Sun Apr 21 18:28:09 1996
+@@ -16,14 +16,14 @@
+ # make NetHack
+ GAME = nethack
+ GAMEUID = games
+-GAMEGRP = bin
++GAMEGRP = games
+
+ # Permissions - some places use setgid instead of setuid, for instance
+ # See also the option "SECURE" in include/config.h
+-GAMEPERM = 04755
+-FILEPERM = 0644
++GAMEPERM = 02755
++FILEPERM = 0664
+ EXEPERM = 0755
+-DIRPERM = 0755
++DIRPERM = 0775
+
+ # GAMEDIR also appears in config.h as "HACKDIR".
+ #
+@@ -32,8 +32,8 @@
+ # therefore there should not be anything in GAMEDIR that you want to keep
+ # (if there is, you'll have to do the installation by hand or modify the
+ # instructions)
+-GAMEDIR = /usr/games/lib/$(GAME)dir
+-SHELLDIR = /usr/games
++GAMEDIR = ${PREFIX}/lib/$(GAME)dir
++SHELLDIR = ${PREFIX}/bin
+
+ # per discussion in Install.X11
+ VARDATND =
diff --git a/games/nethack-qt/files/sample.nethackrc b/games/nethack-qt/files/sample.nethackrc
new file mode 100644
index 00000000000..33dbe47118f
--- /dev/null
+++ b/games/nethack-qt/files/sample.nethackrc
@@ -0,0 +1,88 @@
+OPTIONS=!silent
+OPTIONS=!time
+OPTIONS=catname:Ghisteslwchlohm
+OPTIONS=color
+OPTIONS=dogname:Dhairrhuwyth
+OPTIONS=hilite_pet
+OPTIONS=lit_corridor
+OPTIONS=menustyle:partial
+OPTIONS=msghistory:200
+OPTIONS=news
+OPTIONS=noautopickup
+OPTIONS=rest_on_space
+OPTIONS=safe_pet
+OPTIONS=showexp
+OPTIONS=showscore
+OPTIONS=sortpack
+OPTIONS=time
+OPTIONS=tombstone
+OPTIONS=toptenwin
+OPTIONS=verbose
+SOUNDDIR=/usr/local/lib/nethackdir
+SOUND=MESG "needs food, badly" "weak.au" 100
+SOUND=MESG "feel weak" "weak.au" 100
+SOUND=MESG "bear trap closes" "beartrap.au" 100
+SOUND=MESG "board beneath you squeaks" "squeek.au" 100
+SOUND=MESG "board beneath .....* squeaks" "squeek.au" 60
+SOUND=MESG "a distant squeak" "squeek.au" 25
+SOUND=MESG "mind releases itself from" "memories.au" 100
+SOUND=MESG "on itself, you forget" "memories.au" 100
+SOUND=MESG "Who was that Maud person" "memories.au" 100
+SOUND=MESG "Thinking of Maud you forget" "memories.au" 100
+SOUND=MESG "you forget everything" "memories.au" 100
+SOUND=MESG "smell marsh gas" "frogs.au" 100
+SOUND=MESG "must have been exercising" "tada.au" 100
+SOUND=MESG "must have been very obs" "tada.au" 100
+SOUND=MESG "must have been working on" "tada.au" 100
+SOUND=MESG "must be leading a healthy" "tada.au" 100
+SOUND=MESG "Keystone Kops appear!" "kops.au" 100
+SOUND=MESG "Keystone Kops are after you" "kops.au" 100
+SOUND=MESG "interesting topological ex" "mock.au" 100
+SOUND=MESG "Interesting\.\.\." "mock.au" 100
+SOUND=MESG "deathly sick\." "ohdear.au" 80
+SOUND=MESG "feel feverish" "ohdear.au" 80
+SOUND=MESG "brain is eaten" "minderode.au" 80
+SOUND=MESG "thought thou couldst kill" "yendor.au" 120
+SOUND=MESG "begin praying to" "latin_short.au" 70
+SOUND=MESG "sense of peace" "latin.au" 20
+SOUND=MESG "have a.* forbidding feeling" "latin.au" 20
+#SOUND=MESG "door opens\." "dooropen2.au" 100
+#SOUND=MESG "You drop " "drop.au" 10
+#SOUND=MESG "You destroy " "destroy2.au" 30
+#SOUND=MESG "You kill " "destroy2.au" 20
+#SOUND=MESG "is killed" "destroy2.au" 10
+#SOUND=MESG "You miss " "miss2.au" 20
+#SOUND=MESG "fiery blade burns" "hit2.au" 30
+#SOUND=MESG "ice-cold blade freezes" "hit2.au" 30
+#SOUND=MESG "You hit " "hit2.au" 20
+#SOUND=MESG "The spell hits" "hit2.au" 20
+SOUND=MESG "breathes" "breath.au" 100
+SOUND=MESG "a door open\." "dooropen2.au" 100
+SOUND=MESG "Klunk" "clunk.au" 100
+SOUND=MESG "guard on patrol" "coin.au" 50
+SOUND=MESG "quarterback calling" "coin.au" 50
+SOUND=MESG "someone counting" "coin.au" 50
+SOUND=MESG "Ebenezer Scrooge" "coin.au" 50
+SOUND=MESG "someone cursing shoplifters" "gong.au" 50
+SOUND=MESG "chime of a cash register" "gong.au" 50
+SOUND=MESG "Neiman and Marcus" "gong.au" 50
+SOUND=MESG "You die" "death.au" 100
+SOUND=MESG "sad feeling" "death.au" 50
+SOUND=MESG "door closes\." "doorclos.au" 100
+SOUND=MESG "cosmic" "hallu.au" 100
+SOUND=MESG "explosion" "landmine.au" 100
+SOUND=MESG "KABOOM" "landmine.au" 100
+#SOUND=MESG "KAABLAM" "landmine.au" 100
+SOUND=MESG "trigger.* a land *mine" "landmine.au" 100
+SOUND=MESG "elcome to experi" "level_up.au" 100
+SOUND=MESG "memorize" "memor.au" 100
+#SOUND=MESG "Ouch" "ouch2.au" 100
+#SOUND=MESG "XXXfall through\.\.\." "trapdoor.au" 100
+SOUND=MESG "vomit" "vomit.au" 100
+SOUND=MESG "whistling" "whistle2.au" 100
+SOUND=MESG "crashes open" "thump.au" 100
+SOUND=MESG "You break open the lock" "thump.au" 100
+#SOUND=MESG "THUD" "thump.au" 40
+#SOUND=MESG "WHAMM" "thump.au" 50
+SOUND=MESG "welcome to NetHack" "awaits.au" 100
+SOUND=MESG "strange vibration under" "forcefld.au" 100
diff --git a/games/nethack-qt/files/src-Makefile.diff b/games/nethack-qt/files/src-Makefile.diff
new file mode 100644
index 00000000000..f43c85bacc7
--- /dev/null
+++ b/games/nethack-qt/files/src-Makefile.diff
@@ -0,0 +1,39 @@
+--- src/Makefile.orig Sat Apr 5 19:43:25 1997
++++ src/Makefile Sat Apr 5 19:51:26 1997
+@@ -124,11 +124,11 @@
+ # flags for debugging:
+ # CFLAGS = -g -I../include
+
+-CFLAGS = -O2 -I../include
+-LFLAGS = -L/usr/X11/lib -L$(QTDIR)/lib
++CFLAGS = -pipe -O -I../include
++LFLAGS = -L/usr/X11R6/lib -L$(QTDIR)/lib
+
+ # For USER_SOUNDS support, include -I/usr/X11/include
+-CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include -I/usr/X11/include
++CXXFLAGS = $(CFLAGS) -I. -I/usr/X11R6/include -I/usr/X11R6/include/X11/qt
+
+ # Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired
+ # combination of windowing systems. Also set windowing systems in config.h.
+@@ -213,7 +213,7 @@
+ # IRIX 4.0.x needs -lsun if NIS (YP) is being used for passwd file lookup
+ # LIBS = -lsun
+ #
+-LIBS =
++LIBS = -lgnuregex
+
+ # make NetHack
+ GAME = nethack
+@@ -536,6 +536,12 @@
+
+ # DO NOT DELETE THIS LINE
+
++qaudio-p.moc: ../win/Qt/qaudio-p.h
++ moc ../win/Qt/qaudio-p.h > qaudio-p.moc
++qaudio-p.o: ../win/Qt/qaudio-p.cc qaudio-p.moc
++ $(CXX) $(CXXFLAGS) -c ../win/Qt/qaudio-p.cc
++qaudio.o: ../win/Qt/qaudio.cc
++ $(CXX) $(CXXFLAGS) -c ../win/Qt/qaudio.cc
+ qt_win.o: ../win/Qt/qt_win.cc ../include/hack.h ../include/qt_win.h ../include/cluster.h qt_win.moc
+ $(CXX) $(CXXFLAGS) -c ../win/Qt/qt_win.cc
+ qviewp.o: ../win/Qt/qviewp.cc ../include/qviewp.h qviewp.moc
diff --git a/games/nethack-qt/files/src-sounds.c.diff b/games/nethack-qt/files/src-sounds.c.diff
new file mode 100644
index 00000000000..de1fdf62b02
--- /dev/null
+++ b/games/nethack-qt/files/src-sounds.c.diff
@@ -0,0 +1,14 @@
+--- src/sounds.c.orig Thu Mar 20 22:48:36 1997
++++ src/sounds.c Thu Mar 20 22:50:00 1997
+@@ -5,7 +5,11 @@
+ #include "hack.h"
+ #include "edog.h"
+ #ifdef USER_SOUNDS
++#if defined(__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
++#include <gnuregex.h>
++#else
+ #include <regex.h>
++#endif
+ #endif
+
+ #ifdef OVLB
diff --git a/games/nethack-qt/pkg-comment b/games/nethack-qt/pkg-comment
new file mode 100644
index 00000000000..d4eae3170b8
--- /dev/null
+++ b/games/nethack-qt/pkg-comment
@@ -0,0 +1 @@
+A dungeon explorin', slashin', hackin' game with graphic and sound support
diff --git a/games/nethack-qt/pkg-descr b/games/nethack-qt/pkg-descr
new file mode 100644
index 00000000000..a96d2d7b08f
--- /dev/null
+++ b/games/nethack-qt/pkg-descr
@@ -0,0 +1,54 @@
+From: http://www.uq.edu.au/~cswallis/nhqt/
+
+NetHack QT - What is it?
+
+NetHack is a Free graphical one-player roleplaying game with a
+highly modular window system interface supporting TTY, VGA, Mac,
+Amiga, and other displays. Qt is a graphical user interface toolkit.
+So, "NetHack with Qt interface" is a version of NetHack which has
+a user interface module written using the Qt toolkit.
+
+How is it better than the plain X11 interface?
+The Qt interface has these extra features:
+
+o Tiles (graphics) in the inventory and other item-menu windows.
+o The player cursor changes colour as your relative hit-points drop.
+o The message window greys-out older message.
+o The item menus allow a count (click to left of icon - hidden feature).
+o Icons for the major attributes and player states.
+o Menus (only needed by newbie dungeon fodder).
+o Variable size fonts and tiles.
+o More space for the map as messages and status are side-by-side.
+o You rarely need to put the mouse in a pop-up to interact with it.
+o Macros - hidden feature - F1=multi-rest F2=multi-search F3=try-it
+o It is much easier to code, so new feature-requests are more easily done.
+o Sound support.
+
+The standard NetHack X11 interface is written in C using the Athena
+Widgets toolkit. The strongest reason for doing it that way was
+that NetHack is one of the most incredibly portable programs of
+any kind, and the Athena Widget Set is also available for free on
+a large number of X11 implementations. The problem is that Athena
+Widgets (also known as Xaw) is very ugly, difficult to program in,
+and buggy. The Qt interface toolkit on the other hand is written
+in C++ and is freely portable to any X11 implementation, but is
+less widespread, making it inappropriate for the standard NetHack
+X11 interface.
+
+Sound support
+
+The QtNetHack patch includes experimental support for sounds to be
+played based on messages. For example, you can arrange for a gong
+to sound when the message "... cursing shoplifter..." appears. The
+system maps any regular expression (can be just some text) to a
+sound. The QtNetHack windowport is the only one providing this
+method, and it does so using the NAS (Network Audio System) . As
+distributed, the patch enables this feature - see include/config.h
+once you have applied the patch, and look for USER_SOUNDS for an
+explanation of how to disable it if you want to.
+
+You will also want to collect some sound samples to try it out,
+and a .nethackrc attaching them to messages. This package contains
+the .au files that I use, and my ~/.nethackrc. Many of the sounds
+are from the nhsound package, which you can find referenced on the
+NetHack Home Page.
diff --git a/games/nethack-qt/pkg-plist b/games/nethack-qt/pkg-plist
new file mode 100644
index 00000000000..b9b6c3bae25
--- /dev/null
+++ b/games/nethack-qt/pkg-plist
@@ -0,0 +1,186 @@
+bin/nethack
+lib/nethackdir/nethack
+@exec mkdir %D/lib/nethackdir/save
+@exec chmod 775 %D/lib/nethackdir/save
+@exec chown games.games %D/lib/nethackdir/save
+@unexec rmdir %D/lib/nethackdir/save
+man/man6/dgn_comp.6.gz
+man/man6/dlb.6.gz
+man/man6/lev_comp.6.gz
+man/man6/nethack.6.gz
+man/man6/recover.6.gz
+lib/nethackdir/.nethackrc
+lib/nethackdir/A-filla.lev
+lib/nethackdir/A-fillb.lev
+lib/nethackdir/A-goal.lev
+lib/nethackdir/A-locate.lev
+lib/nethackdir/A-start.lev
+lib/nethackdir/B-filla.lev
+lib/nethackdir/B-fillb.lev
+lib/nethackdir/B-goal.lev
+lib/nethackdir/B-locate.lev
+lib/nethackdir/B-start.lev
+lib/nethackdir/C-filla.lev
+lib/nethackdir/C-fillb.lev
+lib/nethackdir/C-goal.lev
+lib/nethackdir/C-locate.lev
+lib/nethackdir/C-start.lev
+lib/nethackdir/E-filla.lev
+lib/nethackdir/E-fillb.lev
+lib/nethackdir/E-goal.lev
+lib/nethackdir/E-locate.lev
+lib/nethackdir/E-start.lev
+lib/nethackdir/H-filla.lev
+lib/nethackdir/H-fillb.lev
+lib/nethackdir/H-goal.lev
+lib/nethackdir/H-locate.lev
+lib/nethackdir/H-start.lev
+lib/nethackdir/K-filla.lev
+lib/nethackdir/K-fillb.lev
+lib/nethackdir/K-goal.lev
+lib/nethackdir/K-locate.lev
+lib/nethackdir/K-start.lev
+lib/nethackdir/P-filla.lev
+lib/nethackdir/P-fillb.lev
+lib/nethackdir/P-goal.lev
+lib/nethackdir/P-locate.lev
+lib/nethackdir/P-start.lev
+lib/nethackdir/R-filla.lev
+lib/nethackdir/R-fillb.lev
+lib/nethackdir/R-goal.lev
+lib/nethackdir/R-locate.lev
+lib/nethackdir/R-start.lev
+lib/nethackdir/S-filla.lev
+lib/nethackdir/S-fillb.lev
+lib/nethackdir/S-goal.lev
+lib/nethackdir/S-locate.lev
+lib/nethackdir/S-start.lev
+lib/nethackdir/T-filla.lev
+lib/nethackdir/T-fillb.lev
+lib/nethackdir/T-goal.lev
+lib/nethackdir/T-locate.lev
+lib/nethackdir/T-start.lev
+lib/nethackdir/V-filla.lev
+lib/nethackdir/V-fillb.lev
+lib/nethackdir/V-goal.lev
+lib/nethackdir/V-locate.lev
+lib/nethackdir/V-start.lev
+lib/nethackdir/W-filla.lev
+lib/nethackdir/W-fillb.lev
+lib/nethackdir/W-goal.lev
+lib/nethackdir/W-locate.lev
+lib/nethackdir/W-start.lev
+lib/nethackdir/air.lev
+lib/nethackdir/asmodeus.lev
+lib/nethackdir/astral.lev
+lib/nethackdir/awaits.au
+lib/nethackdir/baalz.lev
+lib/nethackdir/beartrap.au
+lib/nethackdir/bigrm-1.lev
+lib/nethackdir/bigrm-2.lev
+lib/nethackdir/bigrm-3.lev
+lib/nethackdir/bigrm-4.lev
+lib/nethackdir/bigrm-5.lev
+lib/nethackdir/blind.ppm
+lib/nethackdir/breath.au
+lib/nethackdir/castle.lev
+lib/nethackdir/cha.ppm
+lib/nethackdir/chaotic.ppm
+lib/nethackdir/clunk.au
+lib/nethackdir/cmdhelp
+lib/nethackdir/coin.au
+lib/nethackdir/con.ppm
+lib/nethackdir/confused.ppm
+lib/nethackdir/data
+lib/nethackdir/death.au
+lib/nethackdir/destroy2.au
+lib/nethackdir/dex.ppm
+lib/nethackdir/doorclos.au
+lib/nethackdir/dooropen2.au
+lib/nethackdir/drop.au
+lib/nethackdir/dungeon
+lib/nethackdir/earth.lev
+lib/nethackdir/ext_encumber.ppm
+lib/nethackdir/fakewiz1.lev
+lib/nethackdir/fakewiz2.lev
+lib/nethackdir/fire.lev
+lib/nethackdir/forcefld.au
+lib/nethackdir/frogs.au
+lib/nethackdir/gong.au
+lib/nethackdir/hallu.au
+lib/nethackdir/hallu.ppm
+lib/nethackdir/help
+lib/nethackdir/hh
+lib/nethackdir/history
+lib/nethackdir/hit2.au
+lib/nethackdir/hungry.ppm
+lib/nethackdir/hvy_encumber.ppm
+lib/nethackdir/int.ppm
+lib/nethackdir/juiblex.lev
+lib/nethackdir/knox.lev
+lib/nethackdir/kops.au
+lib/nethackdir/landmine.au
+lib/nethackdir/latin.au
+lib/nethackdir/latin_short.au
+lib/nethackdir/lawful.ppm
+lib/nethackdir/level_up.au
+lib/nethackdir/license
+lib/nethackdir/logfile
+lib/nethackdir/medusa-1.lev
+lib/nethackdir/medusa-2.lev
+lib/nethackdir/memor.au
+lib/nethackdir/memories.au
+lib/nethackdir/minderode.au
+lib/nethackdir/minefill.lev
+lib/nethackdir/minend-1.lev
+lib/nethackdir/minend-2.lev
+lib/nethackdir/minetn-1.lev
+lib/nethackdir/minetn-2.lev
+lib/nethackdir/miss2.au
+lib/nethackdir/mock.au
+lib/nethackdir/mod_encumber.ppm
+lib/nethackdir/neutral.ppm
+lib/nethackdir/ohdear.au
+lib/nethackdir/opthelp
+lib/nethackdir/options
+lib/nethackdir/oracle.lev
+lib/nethackdir/oracles
+lib/nethackdir/orcus.lev
+lib/nethackdir/ouch2.au
+lib/nethackdir/ovr_encumber.ppm
+lib/nethackdir/perm
+lib/nethackdir/pet_mark.pbm
+lib/nethackdir/pet_mark.ppm
+lib/nethackdir/qt_tiles_0.ppm
+lib/nethackdir/qt_tiles_1.ppm
+lib/nethackdir/qt_tiles_2.ppm
+lib/nethackdir/qt_tiles_3.ppm
+lib/nethackdir/quest.dat
+lib/nethackdir/record
+lib/nethackdir/rip.ppm
+lib/nethackdir/rumors
+lib/nethackdir/sanctum.lev
+lib/nethackdir/satiated.ppm
+lib/nethackdir/sick_fp.ppm
+lib/nethackdir/sick_il.ppm
+lib/nethackdir/slt_encumber.ppm
+lib/nethackdir/squeek.au
+lib/nethackdir/str.ppm
+lib/nethackdir/stunned.ppm
+lib/nethackdir/tada.au
+lib/nethackdir/thump.au
+lib/nethackdir/tower1.lev
+lib/nethackdir/tower2.lev
+lib/nethackdir/tower3.lev
+lib/nethackdir/trapdoor.au
+lib/nethackdir/valley.lev
+lib/nethackdir/vomit.au
+lib/nethackdir/water.lev
+lib/nethackdir/weak.au
+lib/nethackdir/whistle2.au
+lib/nethackdir/wis.ppm
+lib/nethackdir/wizard1.lev
+lib/nethackdir/wizard2.lev
+lib/nethackdir/wizard3.lev
+lib/nethackdir/wizhelp
+lib/nethackdir/yendor.au
diff --git a/games/nethack33-qt/Makefile b/games/nethack33-qt/Makefile
new file mode 100644
index 00000000000..483e458f417
--- /dev/null
+++ b/games/nethack33-qt/Makefile
@@ -0,0 +1,59 @@
+# New ports collection makefile for: nethack-qt
+# Version required: 3.2.2
+# Date created: So 6 Apr 1997 04:25:57 MET DST
+# Whom: Andreas Klemm <andreas@klemm.gtn.com>
+#
+# $Id$
+#
+
+DISTNAME= nethack-3.2.2
+PKGNAME= nethack-3.2.2-qt
+CATEGORIES= games x11
+MASTER_SITES= ftp://ftp.uu.net/pub/games/nethack/sources/ \
+ http://www.uq.edu.au/~cswallis/nhqt/ \
+ http://student.uq.edu.au/~s002434/ \
+ ${MASTER_SITE_GNU}
+QT_PATCH= nhqt0.9.tar.gz
+QT_SOUND= nhs.tar.gz
+DISTFILES= nethack-3.2.2.tar.gz ${QT_PATCH} ${QT_SOUND}
+
+MAINTAINER= andreas@FreeBSD.ORG
+
+LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm
+RUN_DEPENDS= auplay:${PORTSDIR}/audio/nas
+
+EXTRACT_ONLY= nethack-3.2.2.tar.gz
+USE_GMAKE= yes
+SHELL= /bin/sh
+MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
+
+pre-configure:
+ @cd ${WRKSRC}/win; tar xvzf ${DISTDIR}/${QT_PATCH}
+ @cd ${WRKSRC}; patch < win/Qt/nhqt.patch
+ @cd ${WRKSRC}/sys/unix; ${SHELL} setup.sh
+ @cd ${WRKSRC}/src; patch < ${FILESDIR}/src-Makefile.diff
+ @cd ${WRKSRC}/src; patch < ${FILESDIR}/src-sounds.c.diff
+ @cd ${WRKSRC}; patch < ${FILESDIR}/include-unixconf.h.diff
+
+post-install:
+ @cd ${WRKSRC}/doc; chmod 644 *.6
+ @cd ${WRKSRC}/doc; PREFIX=${PREFIX} ${MAKE} manpages
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/nethack
+ ${CP} ${WRKSRC}/doc/Guidebook.txt ${PREFIX}/share/doc/nethack
+.endif
+ @cd ${PREFIX}/lib/nethackdir; tar xzf ${DISTDIR}/${QT_SOUND}
+ @cd ${PREFIX}/lib/nethackdir; chown games.games *.au .nethackrc
+ @cd ${PREFIX}/lib/nethackdir; chmod 444 *.au .nethackrc
+ echo "-----------------------"
+ echo "post-installation hints
+ echo "-----------------------"
+ echo "a) Add this to your user environment:"
+ echo " setenv AUDIOSERVER `hostname`:0"
+ echo "b) Start the NAS audio server"
+ echo " auvoxware -aa & # -aa allows any host access"
+ echo "c) Copy the example nethackrc file from $FILESDIR to your"
+ echo " login directory:"
+ echo " cp $FILESDIR/sample.nethackrc $HOME/.nethackrc"
+
+.include <bsd.port.mk>
diff --git a/games/nethack33-qt/distinfo b/games/nethack33-qt/distinfo
new file mode 100644
index 00000000000..abd07b3b68a
--- /dev/null
+++ b/games/nethack33-qt/distinfo
@@ -0,0 +1,3 @@
+MD5 (nethack-3.2.2.tar.gz) = c85de4d14453b3a2d182d1dfc2ca04df
+MD5 (nhqt0.9.tar.gz) = 9e59311148cc944978d8d04cb87adf9d
+MD5 (nhs.tar.gz) = 605f8bac130a9ad9857efd859d7a0dcf
diff --git a/games/nethack33-qt/files/include-unixconf.h.diff b/games/nethack33-qt/files/include-unixconf.h.diff
new file mode 100644
index 00000000000..53150d81811
--- /dev/null
+++ b/games/nethack33-qt/files/include-unixconf.h.diff
@@ -0,0 +1,11 @@
+--- include/unixconf.h.orig Thu Mar 20 23:17:16 1997
++++ include/unixconf.h Thu Mar 20 23:17:29 1997
+@@ -42,7 +42,7 @@
+ /* #define AIX_31 /* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
+ * job control (note that AIX is SYSV otherwise)
+ * Also define this for AIX 3.2 */
+-#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
++/* #define TEXTCOLOR /* Use System V r3.2 terminfo color support */
+ /* and/or ANSI color support on termcap systems */
+ /* and/or X11 color */
+ #define POSIX_JOB_CONTROL /* use System V / POSIX job control
diff --git a/games/nethack33-qt/files/patch-aa b/games/nethack33-qt/files/patch-aa
new file mode 100644
index 00000000000..4f8040adbbc
--- /dev/null
+++ b/games/nethack33-qt/files/patch-aa
@@ -0,0 +1,127 @@
+--- ./include/system.h.org Mon Mar 25 17:18:32 1996
++++ ./include/system.h Sun Apr 21 18:10:01 1996
+@@ -78,7 +78,7 @@
+ # if !defined(SUNOS4) || defined(RANDOM)
+ E void FDECL(srandom, (unsigned int));
+ # else
+-# ifndef bsdi
++# if !defined(bsdi) && !defined(__FreeBSD__)
+ E int FDECL(srandom, (unsigned int));
+ # endif
+ # endif
+--- ./include/unixconf.h.org Mon Mar 25 12:47:47 1996
++++ ./include/unixconf.h Sun Apr 21 18:10:02 1996
+@@ -31,7 +31,7 @@
+
+ /* define any of the following that are appropriate */
+ /* #define SVR4 /* use in addition to SYSV for System V Release 4 */
+-#define NETWORK /* if running on a networked system */
++/* #define NETWORK /* if running on a networked system */
+ /* e.g. Suns sharing a playground through NFS */
+ #define SUNOS4 /* SunOS 4.x */
+ /* #define LINUX /* Another Unix clone */
+@@ -42,12 +42,12 @@
+ /* #define AIX_31 /* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
+ * job control (note that AIX is SYSV otherwise)
+ * Also define this for AIX 3.2 */
+-/* #define TEXTCOLOR /* Use System V r3.2 terminfo color support */
++#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
+ /* and/or ANSI color support on termcap systems */
+ /* and/or X11 color */
+-/* #define POSIX_JOB_CONTROL /* use System V / POSIX job control
++#define POSIX_JOB_CONTROL /* use System V / POSIX job control
+ * (e.g., VSUSP) */
+-/* #define POSIX_TYPES /* use POSIX types for system calls and termios */
++#define POSIX_TYPES /* use POSIX types for system calls and termios */
+ /* define for many recent OS releases, including
+ * those with specific defines (since types are
+ * changing toward the standard from earlier chaos).
+@@ -125,7 +125,7 @@
+ * A stat system call is done on the mailbox every MAILCKFREQ moves.
+ */
+
+-#define MAIL /* Deliver mail during the game */
++/* #define MAIL /* Deliver mail during the game */
+
+ /* The Andrew Message System does mail a little differently from normal
+ * UNIX. Mail is deposited in the user's own directory in ~/Mailbox
+--- ./include/config.h.org Thu Feb 29 11:00:26 1996
++++ ./include/config.h Sun Apr 21 18:10:06 1996
+@@ -248,7 +248,7 @@
+ * would allow:
+ * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
+ */
+-/* # define USE_XPM /* Disable if you do not have the XPM library */
++# define USE_XPM /* Disable if you do not have the XPM library */
+ # ifdef USE_XPM
+ # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
+ # endif
+@@ -288,12 +288,12 @@
+
+ #ifdef UNIX
+ /* path and file name extension for compression program */
+-# define COMPRESS "/usr/ucb/compress" /* Lempel-Ziv compression */
+-# define COMPRESS_EXTENSION ".Z" /* compress's extension */
++/* # define COMPRESS "/usr/ucb/compress" /* Lempel-Ziv compression */
++/* # define COMPRESS_EXTENSION ".Z" /* compress's extension */
+
+ /* An example of one alternative you might want to use: */
+-/* # define COMPRESS "/usr/local/bin/gzip" /* FSF gzip compression */
+-/* # define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
++# define COMPRESS "/usr/bin/gzip" /* FSF gzip compression */
++# define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
+ #endif
+ #ifndef COMPRESS
+ # define INTERNAL_COMP /* control use of NetHack's compression routines */
+@@ -323,7 +323,7 @@
+ * otherwise it will be the current directory.
+ */
+ # ifndef HACKDIR
+-# define HACKDIR "/usr/games/lib/nethackdir" /* nethack directory */
++# define HACKDIR "/usr/local/lib/nethackdir" /* nethack directory */
+ # endif
+
+ /*
+--- ./sys/unix/Makefile.doc.org Wed Apr 3 21:17:35 1996
++++ ./sys/unix/Makefile.doc Sun Apr 21 18:10:03 1996
+@@ -31,7 +31,7 @@
+
+
+ GAME = nethack
+-MANDIR = /usr/man/man6
++MANDIR = ${PREFIX}/man/man6
+ MANEXT = 6
+
+ # manual installation for most BSD-style systems
+--- ./sys/unix/Makefile.top.org Mon Mar 25 17:22:00 1996
++++ ./sys/unix/Makefile.top Sun Apr 21 18:28:09 1996
+@@ -16,14 +16,14 @@
+ # make NetHack
+ GAME = nethack
+ GAMEUID = games
+-GAMEGRP = bin
++GAMEGRP = games
+
+ # Permissions - some places use setgid instead of setuid, for instance
+ # See also the option "SECURE" in include/config.h
+-GAMEPERM = 04755
+-FILEPERM = 0644
++GAMEPERM = 02755
++FILEPERM = 0664
+ EXEPERM = 0755
+-DIRPERM = 0755
++DIRPERM = 0775
+
+ # GAMEDIR also appears in config.h as "HACKDIR".
+ #
+@@ -32,8 +32,8 @@
+ # therefore there should not be anything in GAMEDIR that you want to keep
+ # (if there is, you'll have to do the installation by hand or modify the
+ # instructions)
+-GAMEDIR = /usr/games/lib/$(GAME)dir
+-SHELLDIR = /usr/games
++GAMEDIR = ${PREFIX}/lib/$(GAME)dir
++SHELLDIR = ${PREFIX}/bin
+
+ # per discussion in Install.X11
+ VARDATND =
diff --git a/games/nethack33-qt/files/sample.nethackrc b/games/nethack33-qt/files/sample.nethackrc
new file mode 100644
index 00000000000..33dbe47118f
--- /dev/null
+++ b/games/nethack33-qt/files/sample.nethackrc
@@ -0,0 +1,88 @@
+OPTIONS=!silent
+OPTIONS=!time
+OPTIONS=catname:Ghisteslwchlohm
+OPTIONS=color
+OPTIONS=dogname:Dhairrhuwyth
+OPTIONS=hilite_pet
+OPTIONS=lit_corridor
+OPTIONS=menustyle:partial
+OPTIONS=msghistory:200
+OPTIONS=news
+OPTIONS=noautopickup
+OPTIONS=rest_on_space
+OPTIONS=safe_pet
+OPTIONS=showexp
+OPTIONS=showscore
+OPTIONS=sortpack
+OPTIONS=time
+OPTIONS=tombstone
+OPTIONS=toptenwin
+OPTIONS=verbose
+SOUNDDIR=/usr/local/lib/nethackdir
+SOUND=MESG "needs food, badly" "weak.au" 100
+SOUND=MESG "feel weak" "weak.au" 100
+SOUND=MESG "bear trap closes" "beartrap.au" 100
+SOUND=MESG "board beneath you squeaks" "squeek.au" 100
+SOUND=MESG "board beneath .....* squeaks" "squeek.au" 60
+SOUND=MESG "a distant squeak" "squeek.au" 25
+SOUND=MESG "mind releases itself from" "memories.au" 100
+SOUND=MESG "on itself, you forget" "memories.au" 100
+SOUND=MESG "Who was that Maud person" "memories.au" 100
+SOUND=MESG "Thinking of Maud you forget" "memories.au" 100
+SOUND=MESG "you forget everything" "memories.au" 100
+SOUND=MESG "smell marsh gas" "frogs.au" 100
+SOUND=MESG "must have been exercising" "tada.au" 100
+SOUND=MESG "must have been very obs" "tada.au" 100
+SOUND=MESG "must have been working on" "tada.au" 100
+SOUND=MESG "must be leading a healthy" "tada.au" 100
+SOUND=MESG "Keystone Kops appear!" "kops.au" 100
+SOUND=MESG "Keystone Kops are after you" "kops.au" 100
+SOUND=MESG "interesting topological ex" "mock.au" 100
+SOUND=MESG "Interesting\.\.\." "mock.au" 100
+SOUND=MESG "deathly sick\." "ohdear.au" 80
+SOUND=MESG "feel feverish" "ohdear.au" 80
+SOUND=MESG "brain is eaten" "minderode.au" 80
+SOUND=MESG "thought thou couldst kill" "yendor.au" 120
+SOUND=MESG "begin praying to" "latin_short.au" 70
+SOUND=MESG "sense of peace" "latin.au" 20
+SOUND=MESG "have a.* forbidding feeling" "latin.au" 20
+#SOUND=MESG "door opens\." "dooropen2.au" 100
+#SOUND=MESG "You drop " "drop.au" 10
+#SOUND=MESG "You destroy " "destroy2.au" 30
+#SOUND=MESG "You kill " "destroy2.au" 20
+#SOUND=MESG "is killed" "destroy2.au" 10
+#SOUND=MESG "You miss " "miss2.au" 20
+#SOUND=MESG "fiery blade burns" "hit2.au" 30
+#SOUND=MESG "ice-cold blade freezes" "hit2.au" 30
+#SOUND=MESG "You hit " "hit2.au" 20
+#SOUND=MESG "The spell hits" "hit2.au" 20
+SOUND=MESG "breathes" "breath.au" 100
+SOUND=MESG "a door open\." "dooropen2.au" 100
+SOUND=MESG "Klunk" "clunk.au" 100
+SOUND=MESG "guard on patrol" "coin.au" 50
+SOUND=MESG "quarterback calling" "coin.au" 50
+SOUND=MESG "someone counting" "coin.au" 50
+SOUND=MESG "Ebenezer Scrooge" "coin.au" 50
+SOUND=MESG "someone cursing shoplifters" "gong.au" 50
+SOUND=MESG "chime of a cash register" "gong.au" 50
+SOUND=MESG "Neiman and Marcus" "gong.au" 50
+SOUND=MESG "You die" "death.au" 100
+SOUND=MESG "sad feeling" "death.au" 50
+SOUND=MESG "door closes\." "doorclos.au" 100
+SOUND=MESG "cosmic" "hallu.au" 100
+SOUND=MESG "explosion" "landmine.au" 100
+SOUND=MESG "KABOOM" "landmine.au" 100
+#SOUND=MESG "KAABLAM" "landmine.au" 100
+SOUND=MESG "trigger.* a land *mine" "landmine.au" 100
+SOUND=MESG "elcome to experi" "level_up.au" 100
+SOUND=MESG "memorize" "memor.au" 100
+#SOUND=MESG "Ouch" "ouch2.au" 100
+#SOUND=MESG "XXXfall through\.\.\." "trapdoor.au" 100
+SOUND=MESG "vomit" "vomit.au" 100
+SOUND=MESG "whistling" "whistle2.au" 100
+SOUND=MESG "crashes open" "thump.au" 100
+SOUND=MESG "You break open the lock" "thump.au" 100
+#SOUND=MESG "THUD" "thump.au" 40
+#SOUND=MESG "WHAMM" "thump.au" 50
+SOUND=MESG "welcome to NetHack" "awaits.au" 100
+SOUND=MESG "strange vibration under" "forcefld.au" 100
diff --git a/games/nethack33-qt/files/src-Makefile.diff b/games/nethack33-qt/files/src-Makefile.diff
new file mode 100644
index 00000000000..f43c85bacc7
--- /dev/null
+++ b/games/nethack33-qt/files/src-Makefile.diff
@@ -0,0 +1,39 @@
+--- src/Makefile.orig Sat Apr 5 19:43:25 1997
++++ src/Makefile Sat Apr 5 19:51:26 1997
+@@ -124,11 +124,11 @@
+ # flags for debugging:
+ # CFLAGS = -g -I../include
+
+-CFLAGS = -O2 -I../include
+-LFLAGS = -L/usr/X11/lib -L$(QTDIR)/lib
++CFLAGS = -pipe -O -I../include
++LFLAGS = -L/usr/X11R6/lib -L$(QTDIR)/lib
+
+ # For USER_SOUNDS support, include -I/usr/X11/include
+-CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include -I/usr/X11/include
++CXXFLAGS = $(CFLAGS) -I. -I/usr/X11R6/include -I/usr/X11R6/include/X11/qt
+
+ # Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired
+ # combination of windowing systems. Also set windowing systems in config.h.
+@@ -213,7 +213,7 @@
+ # IRIX 4.0.x needs -lsun if NIS (YP) is being used for passwd file lookup
+ # LIBS = -lsun
+ #
+-LIBS =
++LIBS = -lgnuregex
+
+ # make NetHack
+ GAME = nethack
+@@ -536,6 +536,12 @@
+
+ # DO NOT DELETE THIS LINE
+
++qaudio-p.moc: ../win/Qt/qaudio-p.h
++ moc ../win/Qt/qaudio-p.h > qaudio-p.moc
++qaudio-p.o: ../win/Qt/qaudio-p.cc qaudio-p.moc
++ $(CXX) $(CXXFLAGS) -c ../win/Qt/qaudio-p.cc
++qaudio.o: ../win/Qt/qaudio.cc
++ $(CXX) $(CXXFLAGS) -c ../win/Qt/qaudio.cc
+ qt_win.o: ../win/Qt/qt_win.cc ../include/hack.h ../include/qt_win.h ../include/cluster.h qt_win.moc
+ $(CXX) $(CXXFLAGS) -c ../win/Qt/qt_win.cc
+ qviewp.o: ../win/Qt/qviewp.cc ../include/qviewp.h qviewp.moc
diff --git a/games/nethack33-qt/files/src-sounds.c.diff b/games/nethack33-qt/files/src-sounds.c.diff
new file mode 100644
index 00000000000..de1fdf62b02
--- /dev/null
+++ b/games/nethack33-qt/files/src-sounds.c.diff
@@ -0,0 +1,14 @@
+--- src/sounds.c.orig Thu Mar 20 22:48:36 1997
++++ src/sounds.c Thu Mar 20 22:50:00 1997
+@@ -5,7 +5,11 @@
+ #include "hack.h"
+ #include "edog.h"
+ #ifdef USER_SOUNDS
++#if defined(__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
++#include <gnuregex.h>
++#else
+ #include <regex.h>
++#endif
+ #endif
+
+ #ifdef OVLB
diff --git a/games/nethack33-qt/pkg-comment b/games/nethack33-qt/pkg-comment
new file mode 100644
index 00000000000..d4eae3170b8
--- /dev/null
+++ b/games/nethack33-qt/pkg-comment
@@ -0,0 +1 @@
+A dungeon explorin', slashin', hackin' game with graphic and sound support
diff --git a/games/nethack33-qt/pkg-descr b/games/nethack33-qt/pkg-descr
new file mode 100644
index 00000000000..a96d2d7b08f
--- /dev/null
+++ b/games/nethack33-qt/pkg-descr
@@ -0,0 +1,54 @@
+From: http://www.uq.edu.au/~cswallis/nhqt/
+
+NetHack QT - What is it?
+
+NetHack is a Free graphical one-player roleplaying game with a
+highly modular window system interface supporting TTY, VGA, Mac,
+Amiga, and other displays. Qt is a graphical user interface toolkit.
+So, "NetHack with Qt interface" is a version of NetHack which has
+a user interface module written using the Qt toolkit.
+
+How is it better than the plain X11 interface?
+The Qt interface has these extra features:
+
+o Tiles (graphics) in the inventory and other item-menu windows.
+o The player cursor changes colour as your relative hit-points drop.
+o The message window greys-out older message.
+o The item menus allow a count (click to left of icon - hidden feature).
+o Icons for the major attributes and player states.
+o Menus (only needed by newbie dungeon fodder).
+o Variable size fonts and tiles.
+o More space for the map as messages and status are side-by-side.
+o You rarely need to put the mouse in a pop-up to interact with it.
+o Macros - hidden feature - F1=multi-rest F2=multi-search F3=try-it
+o It is much easier to code, so new feature-requests are more easily done.
+o Sound support.
+
+The standard NetHack X11 interface is written in C using the Athena
+Widgets toolkit. The strongest reason for doing it that way was
+that NetHack is one of the most incredibly portable programs of
+any kind, and the Athena Widget Set is also available for free on
+a large number of X11 implementations. The problem is that Athena
+Widgets (also known as Xaw) is very ugly, difficult to program in,
+and buggy. The Qt interface toolkit on the other hand is written
+in C++ and is freely portable to any X11 implementation, but is
+less widespread, making it inappropriate for the standard NetHack
+X11 interface.
+
+Sound support
+
+The QtNetHack patch includes experimental support for sounds to be
+played based on messages. For example, you can arrange for a gong
+to sound when the message "... cursing shoplifter..." appears. The
+system maps any regular expression (can be just some text) to a
+sound. The QtNetHack windowport is the only one providing this
+method, and it does so using the NAS (Network Audio System) . As
+distributed, the patch enables this feature - see include/config.h
+once you have applied the patch, and look for USER_SOUNDS for an
+explanation of how to disable it if you want to.
+
+You will also want to collect some sound samples to try it out,
+and a .nethackrc attaching them to messages. This package contains
+the .au files that I use, and my ~/.nethackrc. Many of the sounds
+are from the nhsound package, which you can find referenced on the
+NetHack Home Page.
diff --git a/games/nethack33-qt/pkg-plist b/games/nethack33-qt/pkg-plist
new file mode 100644
index 00000000000..b9b6c3bae25
--- /dev/null
+++ b/games/nethack33-qt/pkg-plist
@@ -0,0 +1,186 @@
+bin/nethack
+lib/nethackdir/nethack
+@exec mkdir %D/lib/nethackdir/save
+@exec chmod 775 %D/lib/nethackdir/save
+@exec chown games.games %D/lib/nethackdir/save
+@unexec rmdir %D/lib/nethackdir/save
+man/man6/dgn_comp.6.gz
+man/man6/dlb.6.gz
+man/man6/lev_comp.6.gz
+man/man6/nethack.6.gz
+man/man6/recover.6.gz
+lib/nethackdir/.nethackrc
+lib/nethackdir/A-filla.lev
+lib/nethackdir/A-fillb.lev
+lib/nethackdir/A-goal.lev
+lib/nethackdir/A-locate.lev
+lib/nethackdir/A-start.lev
+lib/nethackdir/B-filla.lev
+lib/nethackdir/B-fillb.lev
+lib/nethackdir/B-goal.lev
+lib/nethackdir/B-locate.lev
+lib/nethackdir/B-start.lev
+lib/nethackdir/C-filla.lev
+lib/nethackdir/C-fillb.lev
+lib/nethackdir/C-goal.lev
+lib/nethackdir/C-locate.lev
+lib/nethackdir/C-start.lev
+lib/nethackdir/E-filla.lev
+lib/nethackdir/E-fillb.lev
+lib/nethackdir/E-goal.lev
+lib/nethackdir/E-locate.lev
+lib/nethackdir/E-start.lev
+lib/nethackdir/H-filla.lev
+lib/nethackdir/H-fillb.lev
+lib/nethackdir/H-goal.lev
+lib/nethackdir/H-locate.lev
+lib/nethackdir/H-start.lev
+lib/nethackdir/K-filla.lev
+lib/nethackdir/K-fillb.lev
+lib/nethackdir/K-goal.lev
+lib/nethackdir/K-locate.lev
+lib/nethackdir/K-start.lev
+lib/nethackdir/P-filla.lev
+lib/nethackdir/P-fillb.lev
+lib/nethackdir/P-goal.lev
+lib/nethackdir/P-locate.lev
+lib/nethackdir/P-start.lev
+lib/nethackdir/R-filla.lev
+lib/nethackdir/R-fillb.lev
+lib/nethackdir/R-goal.lev
+lib/nethackdir/R-locate.lev
+lib/nethackdir/R-start.lev
+lib/nethackdir/S-filla.lev
+lib/nethackdir/S-fillb.lev
+lib/nethackdir/S-goal.lev
+lib/nethackdir/S-locate.lev
+lib/nethackdir/S-start.lev
+lib/nethackdir/T-filla.lev
+lib/nethackdir/T-fillb.lev
+lib/nethackdir/T-goal.lev
+lib/nethackdir/T-locate.lev
+lib/nethackdir/T-start.lev
+lib/nethackdir/V-filla.lev
+lib/nethackdir/V-fillb.lev
+lib/nethackdir/V-goal.lev
+lib/nethackdir/V-locate.lev
+lib/nethackdir/V-start.lev
+lib/nethackdir/W-filla.lev
+lib/nethackdir/W-fillb.lev
+lib/nethackdir/W-goal.lev
+lib/nethackdir/W-locate.lev
+lib/nethackdir/W-start.lev
+lib/nethackdir/air.lev
+lib/nethackdir/asmodeus.lev
+lib/nethackdir/astral.lev
+lib/nethackdir/awaits.au
+lib/nethackdir/baalz.lev
+lib/nethackdir/beartrap.au
+lib/nethackdir/bigrm-1.lev
+lib/nethackdir/bigrm-2.lev
+lib/nethackdir/bigrm-3.lev
+lib/nethackdir/bigrm-4.lev
+lib/nethackdir/bigrm-5.lev
+lib/nethackdir/blind.ppm
+lib/nethackdir/breath.au
+lib/nethackdir/castle.lev
+lib/nethackdir/cha.ppm
+lib/nethackdir/chaotic.ppm
+lib/nethackdir/clunk.au
+lib/nethackdir/cmdhelp
+lib/nethackdir/coin.au
+lib/nethackdir/con.ppm
+lib/nethackdir/confused.ppm
+lib/nethackdir/data
+lib/nethackdir/death.au
+lib/nethackdir/destroy2.au
+lib/nethackdir/dex.ppm
+lib/nethackdir/doorclos.au
+lib/nethackdir/dooropen2.au
+lib/nethackdir/drop.au
+lib/nethackdir/dungeon
+lib/nethackdir/earth.lev
+lib/nethackdir/ext_encumber.ppm
+lib/nethackdir/fakewiz1.lev
+lib/nethackdir/fakewiz2.lev
+lib/nethackdir/fire.lev
+lib/nethackdir/forcefld.au
+lib/nethackdir/frogs.au
+lib/nethackdir/gong.au
+lib/nethackdir/hallu.au
+lib/nethackdir/hallu.ppm
+lib/nethackdir/help
+lib/nethackdir/hh
+lib/nethackdir/history
+lib/nethackdir/hit2.au
+lib/nethackdir/hungry.ppm
+lib/nethackdir/hvy_encumber.ppm
+lib/nethackdir/int.ppm
+lib/nethackdir/juiblex.lev
+lib/nethackdir/knox.lev
+lib/nethackdir/kops.au
+lib/nethackdir/landmine.au
+lib/nethackdir/latin.au
+lib/nethackdir/latin_short.au
+lib/nethackdir/lawful.ppm
+lib/nethackdir/level_up.au
+lib/nethackdir/license
+lib/nethackdir/logfile
+lib/nethackdir/medusa-1.lev
+lib/nethackdir/medusa-2.lev
+lib/nethackdir/memor.au
+lib/nethackdir/memories.au
+lib/nethackdir/minderode.au
+lib/nethackdir/minefill.lev
+lib/nethackdir/minend-1.lev
+lib/nethackdir/minend-2.lev
+lib/nethackdir/minetn-1.lev
+lib/nethackdir/minetn-2.lev
+lib/nethackdir/miss2.au
+lib/nethackdir/mock.au
+lib/nethackdir/mod_encumber.ppm
+lib/nethackdir/neutral.ppm
+lib/nethackdir/ohdear.au
+lib/nethackdir/opthelp
+lib/nethackdir/options
+lib/nethackdir/oracle.lev
+lib/nethackdir/oracles
+lib/nethackdir/orcus.lev
+lib/nethackdir/ouch2.au
+lib/nethackdir/ovr_encumber.ppm
+lib/nethackdir/perm
+lib/nethackdir/pet_mark.pbm
+lib/nethackdir/pet_mark.ppm
+lib/nethackdir/qt_tiles_0.ppm
+lib/nethackdir/qt_tiles_1.ppm
+lib/nethackdir/qt_tiles_2.ppm
+lib/nethackdir/qt_tiles_3.ppm
+lib/nethackdir/quest.dat
+lib/nethackdir/record
+lib/nethackdir/rip.ppm
+lib/nethackdir/rumors
+lib/nethackdir/sanctum.lev
+lib/nethackdir/satiated.ppm
+lib/nethackdir/sick_fp.ppm
+lib/nethackdir/sick_il.ppm
+lib/nethackdir/slt_encumber.ppm
+lib/nethackdir/squeek.au
+lib/nethackdir/str.ppm
+lib/nethackdir/stunned.ppm
+lib/nethackdir/tada.au
+lib/nethackdir/thump.au
+lib/nethackdir/tower1.lev
+lib/nethackdir/tower2.lev
+lib/nethackdir/tower3.lev
+lib/nethackdir/trapdoor.au
+lib/nethackdir/valley.lev
+lib/nethackdir/vomit.au
+lib/nethackdir/water.lev
+lib/nethackdir/weak.au
+lib/nethackdir/whistle2.au
+lib/nethackdir/wis.ppm
+lib/nethackdir/wizard1.lev
+lib/nethackdir/wizard2.lev
+lib/nethackdir/wizard3.lev
+lib/nethackdir/wizhelp
+lib/nethackdir/yendor.au
diff --git a/games/nethack34-qt/Makefile b/games/nethack34-qt/Makefile
new file mode 100644
index 00000000000..483e458f417
--- /dev/null
+++ b/games/nethack34-qt/Makefile
@@ -0,0 +1,59 @@
+# New ports collection makefile for: nethack-qt
+# Version required: 3.2.2
+# Date created: So 6 Apr 1997 04:25:57 MET DST
+# Whom: Andreas Klemm <andreas@klemm.gtn.com>
+#
+# $Id$
+#
+
+DISTNAME= nethack-3.2.2
+PKGNAME= nethack-3.2.2-qt
+CATEGORIES= games x11
+MASTER_SITES= ftp://ftp.uu.net/pub/games/nethack/sources/ \
+ http://www.uq.edu.au/~cswallis/nhqt/ \
+ http://student.uq.edu.au/~s002434/ \
+ ${MASTER_SITE_GNU}
+QT_PATCH= nhqt0.9.tar.gz
+QT_SOUND= nhs.tar.gz
+DISTFILES= nethack-3.2.2.tar.gz ${QT_PATCH} ${QT_SOUND}
+
+MAINTAINER= andreas@FreeBSD.ORG
+
+LIB_DEPENDS= Xpm\\.4\\.:${PORTSDIR}/graphics/xpm
+RUN_DEPENDS= auplay:${PORTSDIR}/audio/nas
+
+EXTRACT_ONLY= nethack-3.2.2.tar.gz
+USE_GMAKE= yes
+SHELL= /bin/sh
+MAN6= dgn_comp.6 dlb.6 lev_comp.6 nethack.6 recover.6
+
+pre-configure:
+ @cd ${WRKSRC}/win; tar xvzf ${DISTDIR}/${QT_PATCH}
+ @cd ${WRKSRC}; patch < win/Qt/nhqt.patch
+ @cd ${WRKSRC}/sys/unix; ${SHELL} setup.sh
+ @cd ${WRKSRC}/src; patch < ${FILESDIR}/src-Makefile.diff
+ @cd ${WRKSRC}/src; patch < ${FILESDIR}/src-sounds.c.diff
+ @cd ${WRKSRC}; patch < ${FILESDIR}/include-unixconf.h.diff
+
+post-install:
+ @cd ${WRKSRC}/doc; chmod 644 *.6
+ @cd ${WRKSRC}/doc; PREFIX=${PREFIX} ${MAKE} manpages
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/nethack
+ ${CP} ${WRKSRC}/doc/Guidebook.txt ${PREFIX}/share/doc/nethack
+.endif
+ @cd ${PREFIX}/lib/nethackdir; tar xzf ${DISTDIR}/${QT_SOUND}
+ @cd ${PREFIX}/lib/nethackdir; chown games.games *.au .nethackrc
+ @cd ${PREFIX}/lib/nethackdir; chmod 444 *.au .nethackrc
+ echo "-----------------------"
+ echo "post-installation hints
+ echo "-----------------------"
+ echo "a) Add this to your user environment:"
+ echo " setenv AUDIOSERVER `hostname`:0"
+ echo "b) Start the NAS audio server"
+ echo " auvoxware -aa & # -aa allows any host access"
+ echo "c) Copy the example nethackrc file from $FILESDIR to your"
+ echo " login directory:"
+ echo " cp $FILESDIR/sample.nethackrc $HOME/.nethackrc"
+
+.include <bsd.port.mk>
diff --git a/games/nethack34-qt/distinfo b/games/nethack34-qt/distinfo
new file mode 100644
index 00000000000..abd07b3b68a
--- /dev/null
+++ b/games/nethack34-qt/distinfo
@@ -0,0 +1,3 @@
+MD5 (nethack-3.2.2.tar.gz) = c85de4d14453b3a2d182d1dfc2ca04df
+MD5 (nhqt0.9.tar.gz) = 9e59311148cc944978d8d04cb87adf9d
+MD5 (nhs.tar.gz) = 605f8bac130a9ad9857efd859d7a0dcf
diff --git a/games/nethack34-qt/files/include-unixconf.h.diff b/games/nethack34-qt/files/include-unixconf.h.diff
new file mode 100644
index 00000000000..53150d81811
--- /dev/null
+++ b/games/nethack34-qt/files/include-unixconf.h.diff
@@ -0,0 +1,11 @@
+--- include/unixconf.h.orig Thu Mar 20 23:17:16 1997
++++ include/unixconf.h Thu Mar 20 23:17:29 1997
+@@ -42,7 +42,7 @@
+ /* #define AIX_31 /* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
+ * job control (note that AIX is SYSV otherwise)
+ * Also define this for AIX 3.2 */
+-#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
++/* #define TEXTCOLOR /* Use System V r3.2 terminfo color support */
+ /* and/or ANSI color support on termcap systems */
+ /* and/or X11 color */
+ #define POSIX_JOB_CONTROL /* use System V / POSIX job control
diff --git a/games/nethack34-qt/files/patch-aa b/games/nethack34-qt/files/patch-aa
new file mode 100644
index 00000000000..4f8040adbbc
--- /dev/null
+++ b/games/nethack34-qt/files/patch-aa
@@ -0,0 +1,127 @@
+--- ./include/system.h.org Mon Mar 25 17:18:32 1996
++++ ./include/system.h Sun Apr 21 18:10:01 1996
+@@ -78,7 +78,7 @@
+ # if !defined(SUNOS4) || defined(RANDOM)
+ E void FDECL(srandom, (unsigned int));
+ # else
+-# ifndef bsdi
++# if !defined(bsdi) && !defined(__FreeBSD__)
+ E int FDECL(srandom, (unsigned int));
+ # endif
+ # endif
+--- ./include/unixconf.h.org Mon Mar 25 12:47:47 1996
++++ ./include/unixconf.h Sun Apr 21 18:10:02 1996
+@@ -31,7 +31,7 @@
+
+ /* define any of the following that are appropriate */
+ /* #define SVR4 /* use in addition to SYSV for System V Release 4 */
+-#define NETWORK /* if running on a networked system */
++/* #define NETWORK /* if running on a networked system */
+ /* e.g. Suns sharing a playground through NFS */
+ #define SUNOS4 /* SunOS 4.x */
+ /* #define LINUX /* Another Unix clone */
+@@ -42,12 +42,12 @@
+ /* #define AIX_31 /* In AIX 3.1 (IBM RS/6000) use BSD ioctl's to gain
+ * job control (note that AIX is SYSV otherwise)
+ * Also define this for AIX 3.2 */
+-/* #define TEXTCOLOR /* Use System V r3.2 terminfo color support */
++#define TEXTCOLOR /* Use System V r3.2 terminfo color support */
+ /* and/or ANSI color support on termcap systems */
+ /* and/or X11 color */
+-/* #define POSIX_JOB_CONTROL /* use System V / POSIX job control
++#define POSIX_JOB_CONTROL /* use System V / POSIX job control
+ * (e.g., VSUSP) */
+-/* #define POSIX_TYPES /* use POSIX types for system calls and termios */
++#define POSIX_TYPES /* use POSIX types for system calls and termios */
+ /* define for many recent OS releases, including
+ * those with specific defines (since types are
+ * changing toward the standard from earlier chaos).
+@@ -125,7 +125,7 @@
+ * A stat system call is done on the mailbox every MAILCKFREQ moves.
+ */
+
+-#define MAIL /* Deliver mail during the game */
++/* #define MAIL /* Deliver mail during the game */
+
+ /* The Andrew Message System does mail a little differently from normal
+ * UNIX. Mail is deposited in the user's own directory in ~/Mailbox
+--- ./include/config.h.org Thu Feb 29 11:00:26 1996
++++ ./include/config.h Sun Apr 21 18:10:06 1996
+@@ -248,7 +248,7 @@
+ * would allow:
+ * xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
+ */
+-/* # define USE_XPM /* Disable if you do not have the XPM library */
++# define USE_XPM /* Disable if you do not have the XPM library */
+ # ifdef USE_XPM
+ # define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
+ # endif
+@@ -288,12 +288,12 @@
+
+ #ifdef UNIX
+ /* path and file name extension for compression program */
+-# define COMPRESS "/usr/ucb/compress" /* Lempel-Ziv compression */
+-# define COMPRESS_EXTENSION ".Z" /* compress's extension */
++/* # define COMPRESS "/usr/ucb/compress" /* Lempel-Ziv compression */
++/* # define COMPRESS_EXTENSION ".Z" /* compress's extension */
+
+ /* An example of one alternative you might want to use: */
+-/* # define COMPRESS "/usr/local/bin/gzip" /* FSF gzip compression */
+-/* # define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
++# define COMPRESS "/usr/bin/gzip" /* FSF gzip compression */
++# define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
+ #endif
+ #ifndef COMPRESS
+ # define INTERNAL_COMP /* control use of NetHack's compression routines */
+@@ -323,7 +323,7 @@
+ * otherwise it will be the current directory.
+ */
+ # ifndef HACKDIR
+-# define HACKDIR "/usr/games/lib/nethackdir" /* nethack directory */
++# define HACKDIR "/usr/local/lib/nethackdir" /* nethack directory */
+ # endif
+
+ /*
+--- ./sys/unix/Makefile.doc.org Wed Apr 3 21:17:35 1996
++++ ./sys/unix/Makefile.doc Sun Apr 21 18:10:03 1996
+@@ -31,7 +31,7 @@
+
+
+ GAME = nethack
+-MANDIR = /usr/man/man6
++MANDIR = ${PREFIX}/man/man6
+ MANEXT = 6
+
+ # manual installation for most BSD-style systems
+--- ./sys/unix/Makefile.top.org Mon Mar 25 17:22:00 1996
++++ ./sys/unix/Makefile.top Sun Apr 21 18:28:09 1996
+@@ -16,14 +16,14 @@
+ # make NetHack
+ GAME = nethack
+ GAMEUID = games
+-GAMEGRP = bin
++GAMEGRP = games
+
+ # Permissions - some places use setgid instead of setuid, for instance
+ # See also the option "SECURE" in include/config.h
+-GAMEPERM = 04755
+-FILEPERM = 0644
++GAMEPERM = 02755
++FILEPERM = 0664
+ EXEPERM = 0755
+-DIRPERM = 0755
++DIRPERM = 0775
+
+ # GAMEDIR also appears in config.h as "HACKDIR".
+ #
+@@ -32,8 +32,8 @@
+ # therefore there should not be anything in GAMEDIR that you want to keep
+ # (if there is, you'll have to do the installation by hand or modify the
+ # instructions)
+-GAMEDIR = /usr/games/lib/$(GAME)dir
+-SHELLDIR = /usr/games
++GAMEDIR = ${PREFIX}/lib/$(GAME)dir
++SHELLDIR = ${PREFIX}/bin
+
+ # per discussion in Install.X11
+ VARDATND =
diff --git a/games/nethack34-qt/files/sample.nethackrc b/games/nethack34-qt/files/sample.nethackrc
new file mode 100644
index 00000000000..33dbe47118f
--- /dev/null
+++ b/games/nethack34-qt/files/sample.nethackrc
@@ -0,0 +1,88 @@
+OPTIONS=!silent
+OPTIONS=!time
+OPTIONS=catname:Ghisteslwchlohm
+OPTIONS=color
+OPTIONS=dogname:Dhairrhuwyth
+OPTIONS=hilite_pet
+OPTIONS=lit_corridor
+OPTIONS=menustyle:partial
+OPTIONS=msghistory:200
+OPTIONS=news
+OPTIONS=noautopickup
+OPTIONS=rest_on_space
+OPTIONS=safe_pet
+OPTIONS=showexp
+OPTIONS=showscore
+OPTIONS=sortpack
+OPTIONS=time
+OPTIONS=tombstone
+OPTIONS=toptenwin
+OPTIONS=verbose
+SOUNDDIR=/usr/local/lib/nethackdir
+SOUND=MESG "needs food, badly" "weak.au" 100
+SOUND=MESG "feel weak" "weak.au" 100
+SOUND=MESG "bear trap closes" "beartrap.au" 100
+SOUND=MESG "board beneath you squeaks" "squeek.au" 100
+SOUND=MESG "board beneath .....* squeaks" "squeek.au" 60
+SOUND=MESG "a distant squeak" "squeek.au" 25
+SOUND=MESG "mind releases itself from" "memories.au" 100
+SOUND=MESG "on itself, you forget" "memories.au" 100
+SOUND=MESG "Who was that Maud person" "memories.au" 100
+SOUND=MESG "Thinking of Maud you forget" "memories.au" 100
+SOUND=MESG "you forget everything" "memories.au" 100
+SOUND=MESG "smell marsh gas" "frogs.au" 100
+SOUND=MESG "must have been exercising" "tada.au" 100
+SOUND=MESG "must have been very obs" "tada.au" 100
+SOUND=MESG "must have been working on" "tada.au" 100
+SOUND=MESG "must be leading a healthy" "tada.au" 100
+SOUND=MESG "Keystone Kops appear!" "kops.au" 100
+SOUND=MESG "Keystone Kops are after you" "kops.au" 100
+SOUND=MESG "interesting topological ex" "mock.au" 100
+SOUND=MESG "Interesting\.\.\." "mock.au" 100
+SOUND=MESG "deathly sick\." "ohdear.au" 80
+SOUND=MESG "feel feverish" "ohdear.au" 80
+SOUND=MESG "brain is eaten" "minderode.au" 80
+SOUND=MESG "thought thou couldst kill" "yendor.au" 120
+SOUND=MESG "begin praying to" "latin_short.au" 70
+SOUND=MESG "sense of peace" "latin.au" 20
+SOUND=MESG "have a.* forbidding feeling" "latin.au" 20
+#SOUND=MESG "door opens\." "dooropen2.au" 100
+#SOUND=MESG "You drop " "drop.au" 10
+#SOUND=MESG "You destroy " "destroy2.au" 30
+#SOUND=MESG "You kill " "destroy2.au" 20
+#SOUND=MESG "is killed" "destroy2.au" 10
+#SOUND=MESG "You miss " "miss2.au" 20
+#SOUND=MESG "fiery blade burns" "hit2.au" 30
+#SOUND=MESG "ice-cold blade freezes" "hit2.au" 30
+#SOUND=MESG "You hit " "hit2.au" 20
+#SOUND=MESG "The spell hits" "hit2.au" 20
+SOUND=MESG "breathes" "breath.au" 100
+SOUND=MESG "a door open\." "dooropen2.au" 100
+SOUND=MESG "Klunk" "clunk.au" 100
+SOUND=MESG "guard on patrol" "coin.au" 50
+SOUND=MESG "quarterback calling" "coin.au" 50
+SOUND=MESG "someone counting" "coin.au" 50
+SOUND=MESG "Ebenezer Scrooge" "coin.au" 50
+SOUND=MESG "someone cursing shoplifters" "gong.au" 50
+SOUND=MESG "chime of a cash register" "gong.au" 50
+SOUND=MESG "Neiman and Marcus" "gong.au" 50
+SOUND=MESG "You die" "death.au" 100
+SOUND=MESG "sad feeling" "death.au" 50
+SOUND=MESG "door closes\." "doorclos.au" 100
+SOUND=MESG "cosmic" "hallu.au" 100
+SOUND=MESG "explosion" "landmine.au" 100
+SOUND=MESG "KABOOM" "landmine.au" 100
+#SOUND=MESG "KAABLAM" "landmine.au" 100
+SOUND=MESG "trigger.* a land *mine" "landmine.au" 100
+SOUND=MESG "elcome to experi" "level_up.au" 100
+SOUND=MESG "memorize" "memor.au" 100
+#SOUND=MESG "Ouch" "ouch2.au" 100
+#SOUND=MESG "XXXfall through\.\.\." "trapdoor.au" 100
+SOUND=MESG "vomit" "vomit.au" 100
+SOUND=MESG "whistling" "whistle2.au" 100
+SOUND=MESG "crashes open" "thump.au" 100
+SOUND=MESG "You break open the lock" "thump.au" 100
+#SOUND=MESG "THUD" "thump.au" 40
+#SOUND=MESG "WHAMM" "thump.au" 50
+SOUND=MESG "welcome to NetHack" "awaits.au" 100
+SOUND=MESG "strange vibration under" "forcefld.au" 100
diff --git a/games/nethack34-qt/files/src-Makefile.diff b/games/nethack34-qt/files/src-Makefile.diff
new file mode 100644
index 00000000000..f43c85bacc7
--- /dev/null
+++ b/games/nethack34-qt/files/src-Makefile.diff
@@ -0,0 +1,39 @@
+--- src/Makefile.orig Sat Apr 5 19:43:25 1997
++++ src/Makefile Sat Apr 5 19:51:26 1997
+@@ -124,11 +124,11 @@
+ # flags for debugging:
+ # CFLAGS = -g -I../include
+
+-CFLAGS = -O2 -I../include
+-LFLAGS = -L/usr/X11/lib -L$(QTDIR)/lib
++CFLAGS = -pipe -O -I../include
++LFLAGS = -L/usr/X11R6/lib -L$(QTDIR)/lib
+
+ # For USER_SOUNDS support, include -I/usr/X11/include
+-CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include -I/usr/X11/include
++CXXFLAGS = $(CFLAGS) -I. -I/usr/X11R6/include -I/usr/X11R6/include/X11/qt
+
+ # Set the WINSRC, WINOBJ, and WINLIB lines to correspond to your desired
+ # combination of windowing systems. Also set windowing systems in config.h.
+@@ -213,7 +213,7 @@
+ # IRIX 4.0.x needs -lsun if NIS (YP) is being used for passwd file lookup
+ # LIBS = -lsun
+ #
+-LIBS =
++LIBS = -lgnuregex
+
+ # make NetHack
+ GAME = nethack
+@@ -536,6 +536,12 @@
+
+ # DO NOT DELETE THIS LINE
+
++qaudio-p.moc: ../win/Qt/qaudio-p.h
++ moc ../win/Qt/qaudio-p.h > qaudio-p.moc
++qaudio-p.o: ../win/Qt/qaudio-p.cc qaudio-p.moc
++ $(CXX) $(CXXFLAGS) -c ../win/Qt/qaudio-p.cc
++qaudio.o: ../win/Qt/qaudio.cc
++ $(CXX) $(CXXFLAGS) -c ../win/Qt/qaudio.cc
+ qt_win.o: ../win/Qt/qt_win.cc ../include/hack.h ../include/qt_win.h ../include/cluster.h qt_win.moc
+ $(CXX) $(CXXFLAGS) -c ../win/Qt/qt_win.cc
+ qviewp.o: ../win/Qt/qviewp.cc ../include/qviewp.h qviewp.moc
diff --git a/games/nethack34-qt/files/src-sounds.c.diff b/games/nethack34-qt/files/src-sounds.c.diff
new file mode 100644
index 00000000000..de1fdf62b02
--- /dev/null
+++ b/games/nethack34-qt/files/src-sounds.c.diff
@@ -0,0 +1,14 @@
+--- src/sounds.c.orig Thu Mar 20 22:48:36 1997
++++ src/sounds.c Thu Mar 20 22:50:00 1997
+@@ -5,7 +5,11 @@
+ #include "hack.h"
+ #include "edog.h"
+ #ifdef USER_SOUNDS
++#if defined(__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
++#include <gnuregex.h>
++#else
+ #include <regex.h>
++#endif
+ #endif
+
+ #ifdef OVLB
diff --git a/games/nethack34-qt/pkg-comment b/games/nethack34-qt/pkg-comment
new file mode 100644
index 00000000000..d4eae3170b8
--- /dev/null
+++ b/games/nethack34-qt/pkg-comment
@@ -0,0 +1 @@
+A dungeon explorin', slashin', hackin' game with graphic and sound support
diff --git a/games/nethack34-qt/pkg-descr b/games/nethack34-qt/pkg-descr
new file mode 100644
index 00000000000..a96d2d7b08f
--- /dev/null
+++ b/games/nethack34-qt/pkg-descr
@@ -0,0 +1,54 @@
+From: http://www.uq.edu.au/~cswallis/nhqt/
+
+NetHack QT - What is it?
+
+NetHack is a Free graphical one-player roleplaying game with a
+highly modular window system interface supporting TTY, VGA, Mac,
+Amiga, and other displays. Qt is a graphical user interface toolkit.
+So, "NetHack with Qt interface" is a version of NetHack which has
+a user interface module written using the Qt toolkit.
+
+How is it better than the plain X11 interface?
+The Qt interface has these extra features:
+
+o Tiles (graphics) in the inventory and other item-menu windows.
+o The player cursor changes colour as your relative hit-points drop.
+o The message window greys-out older message.
+o The item menus allow a count (click to left of icon - hidden feature).
+o Icons for the major attributes and player states.
+o Menus (only needed by newbie dungeon fodder).
+o Variable size fonts and tiles.
+o More space for the map as messages and status are side-by-side.
+o You rarely need to put the mouse in a pop-up to interact with it.
+o Macros - hidden feature - F1=multi-rest F2=multi-search F3=try-it
+o It is much easier to code, so new feature-requests are more easily done.
+o Sound support.
+
+The standard NetHack X11 interface is written in C using the Athena
+Widgets toolkit. The strongest reason for doing it that way was
+that NetHack is one of the most incredibly portable programs of
+any kind, and the Athena Widget Set is also available for free on
+a large number of X11 implementations. The problem is that Athena
+Widgets (also known as Xaw) is very ugly, difficult to program in,
+and buggy. The Qt interface toolkit on the other hand is written
+in C++ and is freely portable to any X11 implementation, but is
+less widespread, making it inappropriate for the standard NetHack
+X11 interface.
+
+Sound support
+
+The QtNetHack patch includes experimental support for sounds to be
+played based on messages. For example, you can arrange for a gong
+to sound when the message "... cursing shoplifter..." appears. The
+system maps any regular expression (can be just some text) to a
+sound. The QtNetHack windowport is the only one providing this
+method, and it does so using the NAS (Network Audio System) . As
+distributed, the patch enables this feature - see include/config.h
+once you have applied the patch, and look for USER_SOUNDS for an
+explanation of how to disable it if you want to.
+
+You will also want to collect some sound samples to try it out,
+and a .nethackrc attaching them to messages. This package contains
+the .au files that I use, and my ~/.nethackrc. Many of the sounds
+are from the nhsound package, which you can find referenced on the
+NetHack Home Page.
diff --git a/games/nethack34-qt/pkg-plist b/games/nethack34-qt/pkg-plist
new file mode 100644
index 00000000000..b9b6c3bae25
--- /dev/null
+++ b/games/nethack34-qt/pkg-plist
@@ -0,0 +1,186 @@
+bin/nethack
+lib/nethackdir/nethack
+@exec mkdir %D/lib/nethackdir/save
+@exec chmod 775 %D/lib/nethackdir/save
+@exec chown games.games %D/lib/nethackdir/save
+@unexec rmdir %D/lib/nethackdir/save
+man/man6/dgn_comp.6.gz
+man/man6/dlb.6.gz
+man/man6/lev_comp.6.gz
+man/man6/nethack.6.gz
+man/man6/recover.6.gz
+lib/nethackdir/.nethackrc
+lib/nethackdir/A-filla.lev
+lib/nethackdir/A-fillb.lev
+lib/nethackdir/A-goal.lev
+lib/nethackdir/A-locate.lev
+lib/nethackdir/A-start.lev
+lib/nethackdir/B-filla.lev
+lib/nethackdir/B-fillb.lev
+lib/nethackdir/B-goal.lev
+lib/nethackdir/B-locate.lev
+lib/nethackdir/B-start.lev
+lib/nethackdir/C-filla.lev
+lib/nethackdir/C-fillb.lev
+lib/nethackdir/C-goal.lev
+lib/nethackdir/C-locate.lev
+lib/nethackdir/C-start.lev
+lib/nethackdir/E-filla.lev
+lib/nethackdir/E-fillb.lev
+lib/nethackdir/E-goal.lev
+lib/nethackdir/E-locate.lev
+lib/nethackdir/E-start.lev
+lib/nethackdir/H-filla.lev
+lib/nethackdir/H-fillb.lev
+lib/nethackdir/H-goal.lev
+lib/nethackdir/H-locate.lev
+lib/nethackdir/H-start.lev
+lib/nethackdir/K-filla.lev
+lib/nethackdir/K-fillb.lev
+lib/nethackdir/K-goal.lev
+lib/nethackdir/K-locate.lev
+lib/nethackdir/K-start.lev
+lib/nethackdir/P-filla.lev
+lib/nethackdir/P-fillb.lev
+lib/nethackdir/P-goal.lev
+lib/nethackdir/P-locate.lev
+lib/nethackdir/P-start.lev
+lib/nethackdir/R-filla.lev
+lib/nethackdir/R-fillb.lev
+lib/nethackdir/R-goal.lev
+lib/nethackdir/R-locate.lev
+lib/nethackdir/R-start.lev
+lib/nethackdir/S-filla.lev
+lib/nethackdir/S-fillb.lev
+lib/nethackdir/S-goal.lev
+lib/nethackdir/S-locate.lev
+lib/nethackdir/S-start.lev
+lib/nethackdir/T-filla.lev
+lib/nethackdir/T-fillb.lev
+lib/nethackdir/T-goal.lev
+lib/nethackdir/T-locate.lev
+lib/nethackdir/T-start.lev
+lib/nethackdir/V-filla.lev
+lib/nethackdir/V-fillb.lev
+lib/nethackdir/V-goal.lev
+lib/nethackdir/V-locate.lev
+lib/nethackdir/V-start.lev
+lib/nethackdir/W-filla.lev
+lib/nethackdir/W-fillb.lev
+lib/nethackdir/W-goal.lev
+lib/nethackdir/W-locate.lev
+lib/nethackdir/W-start.lev
+lib/nethackdir/air.lev
+lib/nethackdir/asmodeus.lev
+lib/nethackdir/astral.lev
+lib/nethackdir/awaits.au
+lib/nethackdir/baalz.lev
+lib/nethackdir/beartrap.au
+lib/nethackdir/bigrm-1.lev
+lib/nethackdir/bigrm-2.lev
+lib/nethackdir/bigrm-3.lev
+lib/nethackdir/bigrm-4.lev
+lib/nethackdir/bigrm-5.lev
+lib/nethackdir/blind.ppm
+lib/nethackdir/breath.au
+lib/nethackdir/castle.lev
+lib/nethackdir/cha.ppm
+lib/nethackdir/chaotic.ppm
+lib/nethackdir/clunk.au
+lib/nethackdir/cmdhelp
+lib/nethackdir/coin.au
+lib/nethackdir/con.ppm
+lib/nethackdir/confused.ppm
+lib/nethackdir/data
+lib/nethackdir/death.au
+lib/nethackdir/destroy2.au
+lib/nethackdir/dex.ppm
+lib/nethackdir/doorclos.au
+lib/nethackdir/dooropen2.au
+lib/nethackdir/drop.au
+lib/nethackdir/dungeon
+lib/nethackdir/earth.lev
+lib/nethackdir/ext_encumber.ppm
+lib/nethackdir/fakewiz1.lev
+lib/nethackdir/fakewiz2.lev
+lib/nethackdir/fire.lev
+lib/nethackdir/forcefld.au
+lib/nethackdir/frogs.au
+lib/nethackdir/gong.au
+lib/nethackdir/hallu.au
+lib/nethackdir/hallu.ppm
+lib/nethackdir/help
+lib/nethackdir/hh
+lib/nethackdir/history
+lib/nethackdir/hit2.au
+lib/nethackdir/hungry.ppm
+lib/nethackdir/hvy_encumber.ppm
+lib/nethackdir/int.ppm
+lib/nethackdir/juiblex.lev
+lib/nethackdir/knox.lev
+lib/nethackdir/kops.au
+lib/nethackdir/landmine.au
+lib/nethackdir/latin.au
+lib/nethackdir/latin_short.au
+lib/nethackdir/lawful.ppm
+lib/nethackdir/level_up.au
+lib/nethackdir/license
+lib/nethackdir/logfile
+lib/nethackdir/medusa-1.lev
+lib/nethackdir/medusa-2.lev
+lib/nethackdir/memor.au
+lib/nethackdir/memories.au
+lib/nethackdir/minderode.au
+lib/nethackdir/minefill.lev
+lib/nethackdir/minend-1.lev
+lib/nethackdir/minend-2.lev
+lib/nethackdir/minetn-1.lev
+lib/nethackdir/minetn-2.lev
+lib/nethackdir/miss2.au
+lib/nethackdir/mock.au
+lib/nethackdir/mod_encumber.ppm
+lib/nethackdir/neutral.ppm
+lib/nethackdir/ohdear.au
+lib/nethackdir/opthelp
+lib/nethackdir/options
+lib/nethackdir/oracle.lev
+lib/nethackdir/oracles
+lib/nethackdir/orcus.lev
+lib/nethackdir/ouch2.au
+lib/nethackdir/ovr_encumber.ppm
+lib/nethackdir/perm
+lib/nethackdir/pet_mark.pbm
+lib/nethackdir/pet_mark.ppm
+lib/nethackdir/qt_tiles_0.ppm
+lib/nethackdir/qt_tiles_1.ppm
+lib/nethackdir/qt_tiles_2.ppm
+lib/nethackdir/qt_tiles_3.ppm
+lib/nethackdir/quest.dat
+lib/nethackdir/record
+lib/nethackdir/rip.ppm
+lib/nethackdir/rumors
+lib/nethackdir/sanctum.lev
+lib/nethackdir/satiated.ppm
+lib/nethackdir/sick_fp.ppm
+lib/nethackdir/sick_il.ppm
+lib/nethackdir/slt_encumber.ppm
+lib/nethackdir/squeek.au
+lib/nethackdir/str.ppm
+lib/nethackdir/stunned.ppm
+lib/nethackdir/tada.au
+lib/nethackdir/thump.au
+lib/nethackdir/tower1.lev
+lib/nethackdir/tower2.lev
+lib/nethackdir/tower3.lev
+lib/nethackdir/trapdoor.au
+lib/nethackdir/valley.lev
+lib/nethackdir/vomit.au
+lib/nethackdir/water.lev
+lib/nethackdir/weak.au
+lib/nethackdir/whistle2.au
+lib/nethackdir/wis.ppm
+lib/nethackdir/wizard1.lev
+lib/nethackdir/wizard2.lev
+lib/nethackdir/wizard3.lev
+lib/nethackdir/wizhelp
+lib/nethackdir/yendor.au