Files
nethack/sys/unix/hints/linux-chroot
PatR ce5eebcb9b fix lua tmpname() vs mkstemp() on linux
Avoid the warning that tmpname should be replaced by mkstemp by
replacing tmpname with mkstemp.  lua has code to do that but it isn't
trivial to activate while leaving the lua distribution unmodified.
[I've no idea whether nethack's usage even results in liblua ever
creating any temporary files.]

Using nethack's hints to pass -DLUA_USE_POSIX from top Makefile to
lib/lua-$(LUA_VERSION)/Makefile has been tested, building liblua.a
on linux with that has not.
2020-05-18 12:01:23 -07:00

55 lines
1.7 KiB
Plaintext

#
# NetHack 3.5 linux $NHDT-Date: 1589828479 2020/05/18 19:01:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
# NetHack 3.5 linux $Date: 2010/01/15 19:54:37 $ $Revision: 1.8 $
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
# NetHack may be freely redistributed. See license for details.
#
#-PRE
# Linux hints file
# This hints file provides a chrooted build for Linux, specifically
# for Ubuntu dapper.
# Does not copy required libraries or termcap files into the chroot.
COMPILEREVISION?=1
# this is the chroot dir
PREFIX=$(wildcard ~)/nh/install
# this is the dir where NetHack is inside the chroot
HACKDIR=/nh.$(shell date +%Y%m%d)-$(COMPILEREVISION)
INSTDIR=$(PREFIX)$(HACKDIR)
SHELLDIR=$(PREFIX)/games
VARDIR=$(INSTDIR)/var
POSTINSTALL=cp -n sys/unix/sysconf $(INSTDIR)/sysconf; $(CHOWN) $(GAMEUID) $(INSTDIR)/sysconf; $(CHGRP) $(GAMEGRP) $(INSTDIR)/sysconf; chmod $(VARFILEPERM) $(INSTDIR)/sysconf;
CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
CFLAGS=-g -O -I../include -DNOTPARMDECL $(CFLAGS1) -DDLB
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
CFLAGS+=-DTIMED_DELAY
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
CFLAGS+=-DVAR_PLAYGROUND=\"$(HACKDIR)/var\"
# when building liblua.a, avoid warning that use of tmpnam() should be
# replaced by mkstemp(); the lua code doesn't use nethack's config.h so
# this needs to be passed via make rather than defined in unixconf.h
SYSCFLAGS=-DLUA_USE_POSIX
LINK=$(CC)
# Only needed for GLIBC stack trace:
LFLAGS=-rdynamic
WINSRC = $(WINTTYSRC)
WINOBJ = $(WINTTYOBJ)
WINLIB = $(WINTTYLIB)
WINTTYLIB=-lncurses -ltinfo
CHOWN=true
CHGRP=true
VARDIRPERM = 0755
VARFILEPERM = 0600
GAMEPERM = 0755