Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 777642 - games-roguelike/nethack-3.6.6 does not build with CURSES_GRAPHICS support
Summary: games-roguelike/nethack-3.6.6 does not build with CURSES_GRAPHICS support
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-22 07:11 UTC by Eben Bruyns
Modified: 2021-10-14 02:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
rough ebuild that will build nethack for tty and curses but not X (nethack-3.6.6.ebuild,4.39 KB, text/plain)
2021-03-22 07:11 UTC, Eben Bruyns
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eben Bruyns 2021-03-22 07:11:25 UTC
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.
Comment 2 Jazeel Abdul-Jabbar 2021-10-14 02:31:14 UTC
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)
becomes
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.