I wonder where. And this is not how options work in any case.Adding OPTIONS=windowtype:curses has no effect.
OP is referring to the ~/.nethackrc options:I wonder where. And this is not how options work in any case.
OPTIONS=windowtype:curses
Ah, I thought he was referring to port options: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.htmlOP is referring to the ~/.nethackrc options
OPTIONS=windowtype:curses
, I ran nethack and got$ nethack
OPTIONS=windowtype:curses
* Line 1: Window type curses not recognized. Choices are: tty, X11.
1 error in /home/eric/.nethackrc.
Hit return to continue:
NETHACKOPTIONS
from the command line, I get the same result. If I switch to the nethack36-nox11 package, I get the same result, except only tty is in the list of window type choices.CFLAGS
like this:.if !defined(PKGNAMESUFFIX)
USES+= xorg
USE_XORG= xaw xpm xmu xext xt x11 sm ice
CFLAGS+= -DX11_GRAPHICS -DUSE_TILES
GRAPHICS= X11_GRAPHICS
.else
.if ${PKGNAMESUFFIX} == "-nox11"
GRAPHICS= # none
.endif
.endif
CFLAGS+= -DNOMAIL
windows.c
), it appears that CURSES_GRAPHICS
has to be defined for curses support. So just change that last line toCFLAGS += -DNOMAIL -DCURSES_GRAPHICS
ld: error: undefined symbol: curses_read_attrs
>>> referenced by options.c
>>> options.o:(parseoptions)
ld: error: undefined symbol: curses_read_attrs
>>> referenced by options.c
>>> options.o:(parseoptions)
ld: error: undefined symbol: curses_fmt_attrs
>>> referenced by options.c
>>> options.o:(get_compopt_value)
ld: error: undefined symbol: curses_procs
>>> referenced by windows.c
>>> windows.o:(winchoices)
Thank you very much for your help. Unfortunately, the port does not build:
curses_read_attrs
, curses_fmt_attrs
, and curses_procs
are not defined in the ncurses library; they're defined in the nethack source code in win/curses/cursmisc.c and win/curses/cursmain.c.+WINSRC = $(WINTTYSRC)
+WINSRC = $(WINTTYSRC) $(WINCURSESSRC)
+WINOBJ = $(WINTTYOBJ)
+WINOBJ = $(WINTTYOBJ) $(WINCURSESOBJ)
.if ${PKGNAMESUFFIX} == "nox11"
GRAPHICS= # none
.if ${PKGNAMESUFFIX} == "nox11"
GRAPHICS= CURSES_GRAPHICS
make install
in nethack36-nox11.Does it have color, and do you see a large "NetHack" ASCII art banner beneath the "Shall I pick character's race, ..." prompt?I get what appears to be a working nethack in curses mode...
This is using ncurses from the base system, FreeBSD 12-STABLE.
windowtype:curses
is for. env NETHACKOPTIONS='windowtype:curses' nethack36
should yield an error.I misunderstood the build errors.curses_read_attrs
,curses_fmt_attrs
, andcurses_procs
are not defined in the ncurses library; they're defined in the nethack source code in win/curses/cursmisc.c and win/curses/cursmain.c.
This patch file in the nethack36 port needs to be amended. The line that says
should be changed toDiff:+WINSRC = $(WINTTYSRC)
and the lineDiff:+WINSRC = $(WINTTYSRC) $(WINCURSESSRC)
should be changed toDiff:+WINOBJ = $(WINTTYOBJ)
Diff:+WINOBJ = $(WINTTYOBJ) $(WINCURSESOBJ)
I'm not going to claim certainty until I test these changes (probably tomorrow).
patch -d /usr/ports/games/nethack36 < path/to/nethack-curses.patch.txt
OPTIONS=windowtype:curses
to $HOME/.nethackrc. When that happens, the interface changes from this: