#986578 nethack-console: ncurses not enabled in build

Package:
nethack-console
Source:
nethack
Description:
dungeon crawl game - text-based interface
Submitter:
Tobias Frost
Date:
2021-04-07 19:09:04 UTC
Severity:
normal
#986578#5
Date:
2021-04-07 16:08:51 UTC
From:
To:
It seems so that the build does not properly enable ncurses:

export NETHACKOPTIONS=windowtype:curses
tobi@isildor:/usr/lib/games/nethack$ nethack


 * Window type curses not recognized.  Choices are:  tty, X11.

1 error in NETHACKOPTIONS.


I tried tinkering with d/rules but did not get it to compile with
curses…

While tinkering I saw that the debian rules uses the "old" build
system (as in $SRCDIR/sys/unix/Install.unx), I couldn't get it to work
with that one.
I could get it working with ncurses using the "new one" as in
($SRCDIR/sys/unix/NewInstall.unx), though… Possibly it would be good to invest
some time in upgrading the packaging to that one…

#986578#10
Date:
2021-04-07 19:07:43 UTC
From:
To:
Hi Tobias,

$ NETHACKOPTIONS=windowtype:curses nethack

this worked here for me with only nethack-console being installed.
Then I installed also nethack-x11 and got the same error as you.

Though when directly invoking nethack-console, it still works:
$ NETHACKOPTIONS=windowtype:curses nethack-console
(When starting it via .desktop it should also work, as this
executes nethack-console)

I think the problem is that nethack-x11 has a higher alternative
priority for "nethack", and the wrapper script
(/usr/lib/games/nethack/nethack-x11.sh or /usr/lib/games/nethack/nethack-x11-tty.sh)
calls the nethack-x11 binary which does not have ncurses support
enabled. (And I'm not sure if nethack-x11/-qt should support it.)

Other frontends have a similar problem.
E.g. when nethack-qt and nethack-x11 are installed and you try to start
the Qt version:

$ NETHACKOPTIONS=windowtype:qt nethack
 * Window type qt not recognized.  Choices are:  tty, X11.

I'm not sure if you are supposed so set this option.
Is this documented somewhere?
When you want to choose a different frontend you could
just run the wrapper scripts (nethack-{console,x11,qt}).

Kind regards,
  Reiner