move nethack into 3.4 in preparation for 3.6

bump accordingly and add pkgpath markers
This commit is contained in:
espie 2018-04-25 09:48:15 +00:00
parent 6b9c29699c
commit 2621cfc495
22 changed files with 709 additions and 0 deletions

View File

@ -0,0 +1,66 @@
# $OpenBSD: Makefile,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
COMMENT = dungeon explorin', hackin', game. Piece of cake
V = 3.4.3
DISTNAME = nethack-$V
PKGNAME = ${DISTNAME}
REVISION = 12
CATEGORIES = games
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=nethack/}
DISTFILES = nethack-${V:S/.//g}-src.tgz
HOMEPAGE = http://nethack.org/
MAINTAINER = Marc Espie <espie@openbsd.org>
# GPL
PERMIT_PACKAGE_CDROM = Yes
WANTLIB = c termlib
FAKE_FLAGS = PREFIX=${PREFIX}
GAMEDIR = lib/nethackdir-$V
NHDIR = ${TRUEPREFIX}/${GAMEDIR}
MAKE_ENV += NHDIR=${NHDIR} NETHACKCONFIG=${NETHACKCONFIG}
FLAVORS = no_x11 qt
FLAVOR ?=
.if ${FLAVOR} == "no_x11"
NETHACKCONFIG = ${FILESDIR}/simple-config
EXT=,no_x11
.elif ${FLAVOR} == "qt"
NETHACKCONFIG = ${FILESDIR}/qt-config
EXT=,qt
MODULES = x11/qt3
WANTLIB += SM m pthread ${COMPILER_LIBCXX}
.else
NETHACKCONFIG = ${FILESDIR}/x-config
EXT=
WANTLIB += X11 Xaw Xext Xmu Xpm Xt xcb
.endif
RUN_DEPENDS = games/hackdata
NO_TEST = Yes
SUBST_VARS = GAMEDIR V EXT
do-configure:
@cd ${WRKSRC}/sys/unix; /bin/sh setup.sh symlinks
post-build:
@cd ${WRKSRC}/util && ${MAKE_ENV} make recover
post-install:
${INSTALL_PROGRAM} ${WRKBUILD}/util/recover ${PREFIX}/bin/recover-$V
${INSTALL_MAN} ${WRKSRC}/doc/nethack.6 ${PREFIX}/man/man6/nethack-$V.6
${INSTALL_MAN} ${WRKSRC}/doc/recover.6 ${PREFIX}/man/man6/recover-$V.6
${INSTALL_PROGRAM} ${PREFIX}/bin/nethack ${PREFIX}/bin/nethack-$V
.if ${FLAVOR} == ""
${INSTALL_DATA_DIR} ${PREFIX}/lib/X11/app-defaults
@cd ${WRKSRC}/win/X11 && cp NetHack.ad NetHack-$V && \
${INSTALL_DATA} NetHack-$V ${PREFIX}/lib/X11/app-defaults
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (nethack-343-src.tgz) = uznD0qnuLfSgyP3ecI+8Y3QIU6dgjS9MVgtIgSSGb+Q=
SIZE (nethack-343-src.tgz) = 3497458

View File

@ -0,0 +1,12 @@
# Not yet:
# qt flavor needs at least 2.0 to work
VARDATND = x11tiles pet_mark.xbm rip.xpm
VARDAT = $(VARDATD) $(VARDATND)
CFLAGS+=-DQT_GRAPHICS -I$(MODQT_INCDIR) -pthread
LFLAGS =-pthread -L$(MODQT_LIBDIR) -L$(X11BASE)/lib -L$(LOCALBASE)/lib
WINSRC = $(WINTTYSRC) $(WINQTSRC)
WINOBJ = $(WINTTYOBJ) $(WINQTOBJ)
WINLIB = $(WINTTYLIB) -lqt-mt -lSM
QTDIR = $(LOCALBASE)
LINKCMD = c++

View File

@ -0,0 +1,9 @@
VARDATND =
CFLAGS+=
LFLAGS =
WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)
WINLIB = $(WINTTYLIB)
LINKCMD= $(CC)

View File

@ -0,0 +1,9 @@
VARDATND = x11tiles pet_mark.xbm rip.xpm
CFLAGS+=-DX11_GRAPHICS -I${X11BASE}/include
LFLAGS =-L${X11BASE}/lib
WINSRC = $(WINTTYSRC) $(WINX11SRC)
WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
WINLIB = $(WINTTYLIB) $(WINX11LIB)
LINKCMD = $(CC)

View File

@ -0,0 +1,54 @@
$OpenBSD: patch-include_config_h,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- include/config.h.orig Mon Dec 8 00:39:13 2003
+++ include/config.h Tue Aug 10 13:32:55 2004
@@ -84,7 +84,7 @@
#ifdef QT_GRAPHICS
# define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't say wc_ascii_map */
-# define USER_SOUNDS /* Use sounds */
+/* # define USER_SOUNDS /* Use sounds */
# ifndef __APPLE__
# define USER_SOUNDS_REGEX
# endif
@@ -126,7 +126,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
@@ -141,6 +141,7 @@
* playground.
*/
+#define WIZARD "games"
#ifndef WIZARD /* allow for compile-time or Makefile changes */
# ifndef KR1ED
# define WIZARD "wizard" /* the person allowed to use the -D option */
@@ -169,11 +170,13 @@
#ifdef UNIX
/* path and file name extension for compression program */
-#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */
-#define COMPRESS_EXTENSION ".Z" /* compress's extension */
+/* #define COMPRESS "/usr/bin/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"
+#define COMPRESS_EXTENSION ".gz"
#endif
#ifndef COMPRESS
@@ -300,7 +303,7 @@ typedef unsigned char uchar;
* functions that have been macroized.
*/
-/* #define VISION_TABLES */ /* use vision tables generated at compile time */
+#define VISION_TABLES /* use vision tables generated at compile time */
#ifndef VISION_TABLES
# ifndef NO_MACRO_CPATH
# define MACRO_CPATH /* use clear_path macros instead of functions */

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-include_system_h,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- include/system.h.orig Mon Dec 8 00:39:13 2003
+++ include/system.h Wed May 19 06:01:29 2010
@@ -521,11 +521,15 @@ E struct tm *FDECL(localtime, (const time_t *));
# endif
# endif
+#if defined(BSD)
+/* no declaration needed; it's in time.h */
+#else
# if defined(ULTRIX) || (defined(BSD) && defined(POSIX_TYPES)) || defined(SYSV) || defined(MICRO) || defined(VMS) || defined(MAC) || (defined(HPUX) && defined(_POSIX_SOURCE))
E time_t FDECL(time, (time_t *));
# else
E long FDECL(time, (time_t *));
# endif /* ULTRIX */
+#endif
#ifdef VMS
/* used in makedefs.c, but missing from gcc-vms's <time.h> */

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-include_tcap_h,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- include/tcap.h.orig Sat Mar 21 18:39:10 2015
+++ include/tcap.h Sat Mar 21 18:39:33 2015
@@ -44,7 +44,7 @@ extern struct tc_lcl_data { /* defined and set up in
#define nh_UE tc_lcl_data.tc_UE
#define ul_hack tc_lcl_data.tc_ul_hack
-extern short ospeed; /* set up in termcap.c */
+extern int ospeed; /* set up in termcap.c */
#ifdef TEXTCOLOR
# ifdef TOS

View File

@ -0,0 +1,68 @@
$OpenBSD: patch-include_unixconf_h,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- include/unixconf.h.orig Mon Dec 8 00:39:13 2003
+++ include/unixconf.h Tue Aug 10 13:34:38 2004
@@ -19,6 +19,10 @@
*/
/* define exactly one of the following four choices */
+/* procure the real define BSD */
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
/* #define BSD 1 */ /* define for 4.n/Free/Open/Net BSD */
/* also for relatives like SunOS 4.x, DG/UX, and */
/* older versions of Linux */
@@ -32,7 +36,7 @@
/* define any of the following that are appropriate */
-#define SVR4 /* use in addition to SYSV for System V Release 4 */
+/* #define SVR4 /* use in addition to SYSV for System V Release 4 */
/* including Solaris 2+ */
#define NETWORK /* if running on a networked system */
/* e.g. Suns sharing a playground through NFS */
@@ -47,6 +51,7 @@
* job control (note that AIX is SYSV otherwise)
* Also define this for AIX 3.2 */
+#define TERMLIB
#define TERMINFO /* uses terminfo rather than termcap */
/* Should be defined for most SYSV, SVR4 (including
* Solaris 2+), HPUX, and Linux systems. In
@@ -132,7 +137,7 @@
* "extra output" method is used, but not all systems provide access to
* a fine-grained timer.
*/
-/* #define TIMED_DELAY */ /* usleep() */
+#define TIMED_DELAY /* usleep() */
#endif
/*
@@ -143,7 +148,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
@@ -284,7 +289,7 @@
#endif
#if defined(BSD) || defined(ULTRIX)
-# if !defined(DGUX) && !defined(SUNOS4)
+# if !defined(DGUX) && !defined(SUNOS4) && !defined(__STDC__)
#define memcpy(d, s, n) bcopy(s, d, n)
#define memcmp(s1, s2, n) bcmp(s2, s1, n)
# endif
@@ -308,9 +313,7 @@
#endif
#ifdef TIMED_DELAY
-# if defined(SUNOS4) || defined(LINUX) || (defined(BSD) && !defined(ULTRIX))
# define msleep(k) usleep((k)*1000)
-# endif
# ifdef ULTRIX
# define msleep(k) napms(k)
# endif

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-src_files_c,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- src/files.c.orig Sat Feb 11 09:31:55 2006
+++ src/files.c Sat Feb 11 09:32:01 2006
@@ -1153,7 +1153,9 @@ boolean uncomp;
redirect(filename, RDBMODE, stdin, uncomp);
redirect(cfn, WRBMODE, stdout, uncomp);
}
+ (void) setegid(getgid());
(void) setgid(getgid());
+ (void) seteuid(getuid());
(void) setuid(getuid());
(void) execv(args[0], (char *const *) args);
perror((char *)0);

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-sys_share_unixtty_c,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- sys/share/unixtty.c.orig Mon Dec 8 00:39:13 2003
+++ sys/share/unixtty.c Sat Mar 21 18:40:41 2015
@@ -121,13 +121,13 @@ struct tchars inittyb2, curttyb2;
#endif /* V7 */
-#if defined(TTY_GRAPHICS) && ((!defined(SYSV) && !defined(HPUX)) || defined(UNIXPC) || defined(SVR4))
+#if defined(TTY_GRAPHICS) && ((!defined(SYSV) && !defined(HPUX)) || defined(UNIXPC) || defined(SVR4)) || defined(__OpenBSD__)
# ifndef LINT
extern /* it is defined in libtermlib (libtermcap) */
# endif
- short ospeed; /* terminal baudrate; set by gettty */
+ int ospeed; /* terminal baudrate; set by gettty */
#else
-short ospeed = 0; /* gets around "not defined" error message */
+int ospeed = 0; /* gets around "not defined" error message */
#endif
#if defined(POSIX_TYPES) && defined(BSD)

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-sys_unix_Makefile_doc,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- sys/unix/Makefile.doc.orig Mon Dec 8 00:39:13 2003
+++ sys/unix/Makefile.doc Tue Aug 10 13:32:07 2004
@@ -41,15 +41,15 @@ Guidebook.dvi: Guidebook.tex
GAME = nethack
-MANDIR = /usr/man/man6
+MANDIR = ${PREFIX}/man/man6
MANEXT = 6
# manual installation for most BSD-style systems
-GAMEMANCREATE = cp nethack.6
-LEVMANCREATE = cp lev_comp.6
-DGNMANCREATE = cp dgn_comp.6
-RCVRMANCREATE = cp recover.6
-DLBMANCREATE = cp dlb.6
+GAMEMANCREATE = ${INSTALL_MAN} nethack.6
+LEVMANCREATE = ${INSTALL_MAN} lev_comp.6
+DGNMANCREATE = ${INSTALL_MAN} dgn_comp.6
+RCVRMANCREATE = ${INSTALL_MAN} recover.6
+DLBMANCREATE = ${INSTALL_MAN} dlb.6
# manual installation for most SYSV-style systems
# GAMEMANCREATE = nroff -man nethack.6 >
# LEVMANCREATE = nroff -man lev_comp.6 >

View File

@ -0,0 +1,84 @@
$OpenBSD: patch-sys_unix_Makefile_src,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- sys/unix/Makefile.src.orig Mon Dec 8 00:39:13 2003
+++ sys/unix/Makefile.src Sat Mar 4 13:30:02 2017
@@ -1,6 +1,7 @@
# NetHack Makefile.
# SCCS Id: @(#)Makefile.src 3.4 2002/03/02
+include ${NETHACKCONFIG}
# newer makes predefine $(MAKE) to 'make' and do smarter processing of
# recursive make calls if $(MAKE) is used
# these makes allow $(MAKE) to be overridden by the environment if someone
@@ -151,14 +152,13 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/lib/gnome-libs
# flags for debugging:
# CFLAGS = -g -I../include
-CFLAGS = -O -I../include
-LFLAGS =
+CFLAGS += -DHACKDIR=\"${NHDIR}\" -DHAVE_SYS_PARAM_H -I../include
# The Qt and Be window systems are written in C++, while the rest of
# NetHack is standard C. If using Qt, uncomment the LINK line here to get
# the C++ libraries linked in.
CXXFLAGS = $(CFLAGS) -I. -I$(QTDIR)/include
-CXX=g++
+CXX=c++
#LINK=g++
# For cross-compiling, eg. with gcc on Linux (see also CC further up):
#CXX=arm-linux-g++
@@ -214,8 +214,6 @@ WINBEOBJ =
#
#
-WINSRC = $(WINTTYSRC)
-WINOBJ = $(WINTTYOBJ)
# on some systems the termcap library is in -ltermcap or -lcurses
# on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
@@ -235,7 +233,7 @@ WINTTYLIB = -ltermlib
#
# libraries for X11
# If USE_XPM is defined in config.h, you will also need -lXpm here.
-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
+WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11 -lXpm
# WINX11LIB = -lXaw -lXmu -lXt -lX11
# WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
# WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
@@ -255,8 +253,6 @@ WINGEMLIB = -le_gem -lgem
# libraries for BeOS
WINBELIB = -lbe
-WINLIB = $(WINTTYLIB)
-
# any other strange libraries your system needs (for Sysunix only -- the more
# specialized targets should already be right)
#
@@ -392,7 +388,7 @@ $(GAME): $(SYSTEM)
Sysunix: $(HOBJ) Makefile
@echo "Loading ..."
- $(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS)
+ @$(LINKCMD) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS)
@touch Sysunix
Sys3B2: $(HOBJ) Makefile
@@ -459,15 +455,16 @@ objects.o:
$(CC) $(CFLAGS) -c objects.c
@rm -f $(MAKEDEFS)
+MOC=moc
# Qt windowport meta-object-compiler output
qt_kde0.moc: ../include/qt_kde0.h
- $(QTDIR)/bin/moc -o qt_kde0.moc ../include/qt_kde0.h
+ ${MOC} -o qt_kde0.moc ../include/qt_kde0.h
qt_win.moc: ../include/qt_win.h
- $(QTDIR)/bin/moc -o qt_win.moc ../include/qt_win.h
+ ${MOC} -o qt_win.moc ../include/qt_win.h
qttableview.moc: ../include/qttableview.h
- $(QTDIR)/bin/moc -o qttableview.moc ../include/qttableview.h
+ ${MOC} -o qttableview.moc ../include/qttableview.h
$(MAKEDEFS): ../util/makedefs.c $(CONFIG_H) ../include/permonst.h \
../include/objclass.h ../include/monsym.h \

View File

@ -0,0 +1,56 @@
$OpenBSD: patch-sys_unix_Makefile_top,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- sys/unix/Makefile.top.orig Mon Dec 8 00:39:13 2003
+++ sys/unix/Makefile.top Tue Aug 10 13:37:18 2004
@@ -13,19 +13,19 @@
# execute things like 'data' and 'rumors')
# MAKE = make
+include ${NETHACKCONFIG}
+
# make NetHack
-PREFIX = /usr
GAME = nethack
-# GAME = nethack.prg
-GAMEUID = games
-GAMEGRP = bin
+GAMEUID = 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".
# VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR
@@ -35,12 +35,13 @@ DIRPERM = 0755
# 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 = $(PREFIX)/games/lib/$(GAME)dir
+REALGAMEDIR = $(NHDIR)
+GAMEDIR = $(DESTDIR)${REALGAMEDIR}
VARDIR = $(GAMEDIR)
-SHELLDIR = $(PREFIX)/games
+SHELLDIR = ${DESTDIR}$(PREFIX)/bin
# per discussion in Install.X11 and Install.Qt
-VARDATND =
+# VARDATND =
# VARDATND = x11tiles NetHack.ad pet_mark.xbm
# VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
# for Atari/Gem
@@ -186,7 +187,7 @@ dofiles:
cp src/$(GAME) $(GAMEDIR)
cp util/recover $(GAMEDIR)
-rm -f $(SHELLDIR)/$(GAME)
- sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \
+ sed -e 's;/usr/games/lib/nethackdir;$(REALGAMEDIR);' \
-e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \
< sys/unix/nethack.sh \
> $(SHELLDIR)/$(GAME)

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-sys_unix_Makefile_utl,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- sys/unix/Makefile.utl.orig Wed Mar 20 18:43:54 2002
+++ sys/unix/Makefile.utl Fri Mar 22 08:11:35 2002
@@ -1,6 +1,7 @@
# Makefile for NetHack's utility programs.
# SCCS Id: @(#)Makefile.utl 3.4 1997/04/19
+include ${NETHACKCONFIG}
# newer makes predefine $(MAKE) to 'make' and do smarter processing of
# recursive make calls if $(MAKE) is used
# these makes allow $(MAKE) to be overridden by the environment if someone
@@ -89,8 +90,7 @@
# flags for debugging:
# CFLAGS = -g -I../include
-CFLAGS = -O -I../include
-LFLAGS =
+CFLAGS += -I../include
LIBS =

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-util_makedefs_c,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- util/makedefs.c.orig Fri Mar 20 14:12:00 2015
+++ util/makedefs.c Fri Mar 20 14:13:23 2015
@@ -543,7 +543,7 @@ const char *build_date;
void
do_date()
{
- long clocktim = 0;
+ time_t clocktim = 0;
char *c, cbuf[60], buf[BUFSZ];
const char *ul_sfx;
@@ -569,7 +569,7 @@ do_date()
for (c = cbuf; *c; c++) if (*c == '\n') break;
*c = '\0'; /* strip off the '\n' */
Fprintf(ofp,"#define BUILD_DATE \"%s\"\n", cbuf);
- Fprintf(ofp,"#define BUILD_TIME (%ldL)\n", clocktim);
+ Fprintf(ofp,"#define BUILD_TIME (%lldLL)\n", (long long)clocktim);
Fprintf(ofp,"\n");
#ifdef NHSTDC
ul_sfx = "UL";

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-win_Qt_qt_win_cpp,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
Don't use malloc.h header on OpenBSD.
--- win/Qt/qt_win.cpp.orig Thu Nov 20 22:02:50 2014
+++ win/Qt/qt_win.cpp Thu Nov 20 22:13:01 2014
@@ -104,8 +104,6 @@ extern "C" {
#include <dirent.h>
#ifdef Q_WS_MACX
# include <sys/malloc.h>
-#else
-# include <malloc.h>
#endif
#ifdef _WS_X11_

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-win_tty_termcap_c,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
--- win/tty/termcap.c.orig Wed May 19 09:21:20 2010
+++ win/tty/termcap.c Wed May 19 09:21:53 2010
@@ -835,8 +835,10 @@ cl_eos() /* free after Robert Viduya */
#include <curses.h>
+#ifndef __OpenBSD__
#ifndef LINUX
extern char *tparm();
+#endif
#endif
# ifdef COLOR_BLACK /* trust include file */

View File

@ -0,0 +1,22 @@
This is nethack. Will you dare explore the dungeon, kill creepy monsters,
and finish the game ? At least, you're starting with a bonus: a puppy
(or a kitten) to help you.
If you find that game too easy, you may want to try slash instead.
To use nethack with X11 graphics, you will also have to add
${PREFIX}/share/fonts/hack to your fontpath, see xset(1) and
Xserver(1).
The tty version with colors uses ANSI colors, unless it finds a suitable
termcap entry, for instance xterm-color.
Flavors:
no_x11
runs without X11.
qt
qt2 interface
P.S. This is a very addictive game, with its whole wacky culture. And even
a newsgroup dedicated to it (rec.games.roguelike.nethack). Don't say we
didn't warn you !

View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PFRAG.no-no_x11,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
!%%qt%%
${GAMEDIR}/pet_mark.xbm
${GAMEDIR}/rip.xpm
${GAMEDIR}/x11tiles

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.no-qt-no-no_x11,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
lib/X11/app-defaults/NetHack-${V}

160
games/nethack/3.4/pkg/PLIST Normal file
View File

@ -0,0 +1,160 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/04/25 09:48:15 espie Exp $
@option no-default-conflict
@pkgpath games/nethack${EXT}
@conflict nethack-${V}
@unexec rm -rf ${GAMEDIR}/save/*
@comment bin/nethack
@group games
bin/nethack-${V}
bin/recover-${V}
@mode 0775
${GAMEDIR}/
@mode
${GAMEDIR}/Arc-fila.lev
${GAMEDIR}/Arc-filb.lev
${GAMEDIR}/Arc-goal.lev
${GAMEDIR}/Arc-loca.lev
${GAMEDIR}/Arc-strt.lev
${GAMEDIR}/Bar-fila.lev
${GAMEDIR}/Bar-filb.lev
${GAMEDIR}/Bar-goal.lev
${GAMEDIR}/Bar-loca.lev
${GAMEDIR}/Bar-strt.lev
${GAMEDIR}/Cav-fila.lev
${GAMEDIR}/Cav-filb.lev
${GAMEDIR}/Cav-goal.lev
${GAMEDIR}/Cav-loca.lev
${GAMEDIR}/Cav-strt.lev
${GAMEDIR}/Hea-fila.lev
${GAMEDIR}/Hea-filb.lev
${GAMEDIR}/Hea-goal.lev
${GAMEDIR}/Hea-loca.lev
${GAMEDIR}/Hea-strt.lev
${GAMEDIR}/Kni-fila.lev
${GAMEDIR}/Kni-filb.lev
${GAMEDIR}/Kni-goal.lev
${GAMEDIR}/Kni-loca.lev
${GAMEDIR}/Kni-strt.lev
${GAMEDIR}/Mon-fila.lev
${GAMEDIR}/Mon-filb.lev
${GAMEDIR}/Mon-goal.lev
${GAMEDIR}/Mon-loca.lev
${GAMEDIR}/Mon-strt.lev
${GAMEDIR}/Pri-fila.lev
${GAMEDIR}/Pri-filb.lev
${GAMEDIR}/Pri-goal.lev
${GAMEDIR}/Pri-loca.lev
${GAMEDIR}/Pri-strt.lev
${GAMEDIR}/Ran-fila.lev
${GAMEDIR}/Ran-filb.lev
${GAMEDIR}/Ran-goal.lev
${GAMEDIR}/Ran-loca.lev
${GAMEDIR}/Ran-strt.lev
${GAMEDIR}/Rog-fila.lev
${GAMEDIR}/Rog-filb.lev
${GAMEDIR}/Rog-goal.lev
${GAMEDIR}/Rog-loca.lev
${GAMEDIR}/Rog-strt.lev
${GAMEDIR}/Sam-fila.lev
${GAMEDIR}/Sam-filb.lev
${GAMEDIR}/Sam-goal.lev
${GAMEDIR}/Sam-loca.lev
${GAMEDIR}/Sam-strt.lev
${GAMEDIR}/Tou-fila.lev
${GAMEDIR}/Tou-filb.lev
${GAMEDIR}/Tou-goal.lev
${GAMEDIR}/Tou-loca.lev
${GAMEDIR}/Tou-strt.lev
${GAMEDIR}/Val-fila.lev
${GAMEDIR}/Val-filb.lev
${GAMEDIR}/Val-goal.lev
${GAMEDIR}/Val-loca.lev
${GAMEDIR}/Val-strt.lev
${GAMEDIR}/Wiz-fila.lev
${GAMEDIR}/Wiz-filb.lev
${GAMEDIR}/Wiz-goal.lev
${GAMEDIR}/Wiz-loca.lev
${GAMEDIR}/Wiz-strt.lev
${GAMEDIR}/air.lev
${GAMEDIR}/asmodeus.lev
${GAMEDIR}/astral.lev
${GAMEDIR}/baalz.lev
${GAMEDIR}/bigrm-1.lev
${GAMEDIR}/bigrm-2.lev
${GAMEDIR}/bigrm-3.lev
${GAMEDIR}/bigrm-4.lev
${GAMEDIR}/bigrm-5.lev
${GAMEDIR}/castle.lev
${GAMEDIR}/cmdhelp
${GAMEDIR}/data
${GAMEDIR}/dungeon
${GAMEDIR}/earth.lev
${GAMEDIR}/fakewiz1.lev
${GAMEDIR}/fakewiz2.lev
${GAMEDIR}/fire.lev
${GAMEDIR}/help
${GAMEDIR}/hh
${GAMEDIR}/history
${GAMEDIR}/juiblex.lev
${GAMEDIR}/knox.lev
${GAMEDIR}/license
@mode 0664
@comment no checksum
${GAMEDIR}/logfile
@mode
${GAMEDIR}/medusa-1.lev
${GAMEDIR}/medusa-2.lev
${GAMEDIR}/minefill.lev
${GAMEDIR}/minend-1.lev
${GAMEDIR}/minend-2.lev
${GAMEDIR}/minend-3.lev
${GAMEDIR}/minetn-1.lev
${GAMEDIR}/minetn-2.lev
${GAMEDIR}/minetn-3.lev
${GAMEDIR}/minetn-4.lev
${GAMEDIR}/minetn-5.lev
${GAMEDIR}/minetn-6.lev
${GAMEDIR}/minetn-7.lev
@mode 2555
${GAMEDIR}/nethack
@mode
${GAMEDIR}/opthelp
${GAMEDIR}/options
${GAMEDIR}/oracle.lev
${GAMEDIR}/oracles
${GAMEDIR}/orcus.lev
@mode 0664
@comment no checksum
${GAMEDIR}/perm
@mode
${GAMEDIR}/quest.dat
@mode 0664
@comment no checksum
${GAMEDIR}/record
@comment ${GAMEDIR}/recover
@mode
${GAMEDIR}/rumors
${GAMEDIR}/sanctum.lev
@mode 0570
${GAMEDIR}/save/
@mode
${GAMEDIR}/soko1-1.lev
${GAMEDIR}/soko1-2.lev
${GAMEDIR}/soko2-1.lev
${GAMEDIR}/soko2-2.lev
${GAMEDIR}/soko3-1.lev
${GAMEDIR}/soko3-2.lev
${GAMEDIR}/soko4-1.lev
${GAMEDIR}/soko4-2.lev
${GAMEDIR}/tower1.lev
${GAMEDIR}/tower2.lev
${GAMEDIR}/tower3.lev
${GAMEDIR}/valley.lev
${GAMEDIR}/water.lev
${GAMEDIR}/wizard1.lev
${GAMEDIR}/wizard2.lev
${GAMEDIR}/wizard3.lev
${GAMEDIR}/wizhelp
@man man/man6/nethack-${V}.6
@man man/man6/recover-${V}.6
!%%no_x11%%