Nethack 3.6.0: Added patches and recipe

This commit is contained in:
Mikołaj 'lich' Halber
2015-12-27 00:41:38 +01:00
parent d97532ab2d
commit 200425d078
3 changed files with 226 additions and 0 deletions

View File

@@ -0,0 +1,104 @@
From 0b71f7544bde04daa8c5ee349c3b2a685d170f4d Mon Sep 17 00:00:00 2001
From: Mikolaj 'lich' Halber <lich@opmbx.org>
Date: Sun, 20 Dec 2015 13:49:37 +0000
Subject: Added Haiku support
diff --git a/sys/unix/Makefile.doc b/sys/unix/Makefile.doc
index e2a8131..e9c838e 100644
--- a/sys/unix/Makefile.doc
+++ b/sys/unix/Makefile.doc
@@ -17,7 +17,6 @@ GUIDEBOOK = Guidebook # regular ASCII file
# Some versions of col need -x to keep them from converting spaces to tabs;
# some versions of col don't do the conversion by default and don't
# recognize the option. Sigh.
-COLCMD = col -bx
#COLCMD = col -b
# The command to use to generate a PostScript file
@@ -29,7 +28,7 @@ PSCMD = groff
# GUIDECMD = cat Guidebook.txt
# The following works better with groff-1.18, eg on Linux
# GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii | $(COLCMD)
-GUIDECMD = $(GUIDE_PREFORMAT) | nroff | $(COLCMD)
+GUIDECMD = $(GUIDE_PREFORMAT) | nroff
# Only generate output for the current configuration:
NHGREP = $(MAKEDEFS) --grep --input - --output -
@@ -93,7 +92,7 @@ distrib: $(DISTRIB)
Guidebook.txt : Guidebook.mn tmac.n
$(GUIDECMD) > Guidebook.txt
-MAN2TXT = $(NHGREP) | nroff -man - | $(COLCMD)
+MAN2TXT = $(NHGREP) | nroff -man -|awk {print $0}
nethack.txt : nethack.6
cat nethack.6 | $(MAN2TXT) > nethack.txt
lev_comp.txt : lev_comp.6
diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl
index d5d3042..b5b0b57 100644
--- a/sys/unix/Makefile.utl
+++ b/sys/unix/Makefile.utl
@@ -104,8 +104,8 @@ OBJDIR = ../src
# yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
# if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
-YACC = yacc
-LEX = lex
+# YACC = yacc
+# LEX = lex
# YACC = bison -y
# YACC = byacc
# LEX = flex
diff --git a/sys/unix/hints/haiku b/sys/unix/hints/haiku
new file mode 100644
index 0000000..83db3ae
--- /dev/null
+++ b/sys/unix/hints/haiku
@@ -0,0 +1,44 @@
+#
+# NetHack 3.6 linux $NHDT-Date: 1432512814 2015/05/25 00:13:34 $ $NHDT-Branch: master $:$NHDT-Revision: 1.12 $
+# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
+# NetHack may be freely redistributed. See license for details.
+#
+#-PRE
+# Haiku hints file
+# This hints file provides a build for haiku.
+
+
+
+#PREFIX=/usr
+PREFIX=/tmp
+HACKDIR=$(PREFIX)/nethack
+SHELLDIR=$(PREFIX)/nethacksh
+INSTDIR=$(HACKDIR)
+VARDIR=$(HACKDIR)
+
+
+
+POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
+
+CFLAGS=-g -O -I../include -DNOTPARMDECL $(CFLAGS1) -DDLB
+CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
+CFLAGS+=-DSYSCF -DSYSCF_FILE=\"/boot/system/settings/nethack/sysconf\" -DSECURE
+CFLAGS+=-DHACKDIR=\"/boot/system/settings/nethack\"
+
+LINK=$(CC)
+
+YACC=bison -y
+LEX=flex
+
+WINSRC = $(WINTTYSRC)
+WINOBJ = $(WINTTYOBJ)
+WINLIB = $(WINTTYLIB)
+
+WINTTYLIB=-lncurses
+
+CHOWN=true
+CHGRP=true
+
+VARDIRPERM = 0755
+VARFILEPERM = 0600
+GAMEPERM = 0755
--
2.2.2