From 447d080513544fb8d8db74777aa2abfe566ab5b5 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 1d2f535..ddffc50 100644
--- a/sys/unix/Makefile.doc
+++ b/sys/unix/Makefile.doc
@@ -19,7 +19,7 @@ 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 -bx
 #COLCMD = col -b
 
 # The command to use to generate a PostScript file
@@ -33,7 +33,7 @@ PSCMD = groff
 # Single page. Might need adjustment to .pl value
 # GUIDECMD= $(GUIDE_PREFORMAT) | perl -pe 's/^(.mt)$$/.pl 4720v\n.in 0\n.po 8\n.ll 64m\n$$1/' | nroff -c -Tascii | $(COLCMD)
 #
-GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii | $(COLCMD)
+GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii
 
 # Only generate output for the current configuration:
 NHGREP = $(MAKEDEFS) --grep --input - --output -
@@ -97,7 +97,7 @@ distrib: $(DISTRIB)
 
 Guidebook.txt	: Guidebook.mn tmac.n tmac.nh
 	$(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 78e9d72..ef11e44 100644
--- a/sys/unix/Makefile.utl
+++ b/sys/unix/Makefile.utl
@@ -111,8 +111,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.23.0

