Created attachment 692859 [details]
rough ebuild that will build nethack for tty and curses but not X
Nethack does not build with CURSES_GRAPHICS.
I chased my tail on this one for a while, mostly because I'm not familiar with ebuilds.
Eventually I've managed to narrow it down to the hints file. I used the sys/unix/hints/linux file. I think the old hints file is not sufficient for a CURSES_GRAPHICS build.
I didn't mange to get it to work with X so I just commented the parts relating to X out. I suspect it would be changes to the hints file again.
I've attached my rough ebuild that now builds a version of Nethack with tty and curses support.
I hope this information is helpful in some way.
See also: https://forums.freebsd.org/threads/enable-curses-interface-for-nethack36.75423/.
The above link has helped tremendously.
To enable ncurses support, one needs to first modify the ebuild and add "append-cflags -DCURSES_GRAPHICS" under the src_compile() section.
The appropriate hints file must also be changed. The file to modify depends on whether the X use flag is enabled or not.
If the 'X' use flag is enabled, files/nethack-3.6.3-hint-x11 must be changed so that the section containing
WINSRC = $(WINTTYSRC) $(WINX11SRC)
WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
WINLIB = $(WINTTYLIB) $(WINX11LIB)
WINSRC = $(WINTTYSRC) $(WINX11SRC) $(WINCURSESSRC)
WINOBJ = $(WINTTYOBJ) $(WINX11OBJ) $(WINCURSESOBJ)
WINLIB = $(WINTTYLIB) $(WINX11LIB) $(WINCURSESLIB)
If the X use flag is not enabled, files/nethack-3.6.3-hint-tty will be used by the ebuild instead, and the above modification should be made to that file.
I believe these changes should be default to the nethack ebuild and hints file(s) seeing as ncurses is already a dependency.