Ticket #663 (closed enhancement: fixed)
Opened 3 years ago
Last modified 8 months ago
include ncursesw in ncurses build
| Reported by: | ziusudra | Owned by: | scottmc |
|---|---|---|---|
| Priority: | normal | Milestone: | Unscheduled |
| Component: | sys-libs/ncurses | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Terminal can be used with ncursesw. I've tried most of the tests that the build provides and the only issues I've seen also happen with just ncurses. (For which I will make defect tickets.)
This is what causes the ncursesw libraries to build
--enable-widec \
This enables support for 256 colors in ncursew
--enable-ext-colors \
This allows binaries that support it to respond to terminal size changes
--enable-sigwinch \
This probably has no effect on Haiku as hardlinks aren't supported, but we might as well be explicit
--enable-symlinks
Some notes:
Gentoo portage doesn't have a seperate ncursesw port unlike some other distros.
I have ported the roguelike Cataclysm ( this fork has bug fixes) without any ncursesw issues. (Cataclysm on the other hand...)
Binaries linked with ncursesw seem to require TERM=xterm-256color while those linked with ncurses don't like xterm-256colors. However, ncurses likes xterm-color and ncursesw doesn't.
Attachments
Change History
comment:1 Changed 3 years ago by ziusudra
comment:2 Changed 3 years ago by ziusudra
Actually, I'm going to list the issues I'm seeing in here for now.
One is Haiku #6510 with the blue, tclock, and some options in the ncurses binaries.
Another is that setting cursor visiblity (curs_set() in ncurses) has not been implemented in Terminal.
I'm currently looking at why colors 8-15 don't get set. I think this may be due to the xterm* terminfo claiming a capability that Terminal doesn't have.
I there is an issue with changing the Terminal window size, but need to examine it further. It may be that using the setting menu to change the size ends up with Terminal claiming the wrong size.
comment:3 Changed 3 years ago by ziusudra
Uploaded a new bep.
Corrected the license.
Added a few more options to the config.
--enable-getcap - uses faster code to fetch termcap entries at the expense of not being able make cross-references to the terminfo tree which we don't do.
--disable-home-terminfo - ~/.terminfo cache is not used or needed on Haiku.
--enable-ext-mouse - Currently not very useful but it breaks binary compatibility with ncursesw libs that don't have it, so better to enable it now rather than later.
--enable-sp-funcs - Makes writing ncurses programs a bit easier in some cases. Seems to have no cost.
--enable-colorfgbg - Maybe not useful but costs nothing.
--enable-const - The only reason this isn't default is due to it making back-porting to ancient curses implementations more difficult. We aren't worried about that.
Also see Haiku #9293. That fixes the issues I mentioned (except setting cursor visibility.)
Changed 3 years ago by ziusudra
- attachment ncurses-5.9.bep added
Changed 3 years ago by ziusudra
- attachment ncursesw-5.9.bep added
comment:5 Changed 9 months ago by diver
There is a recipe at https://bitbucket.org/haikuports/haikuports/src/master/sys-libs/ncurses/
Is this done now?
comment:6 Changed 8 months ago by ziusudra
- Resolution set to fixed
- Status changed from new to closed

Right, I remembered this incorectly.
Binaries linked with ncursesw need xterm-256color in order for multibyte characters to be displayed correctly. They will run with xterm-color or xterm.
Binaries linked with ncurses are fine with xterm-256color, xterm-color, or xterm.
/boot/common/etc/termcap doesn't contain a xterm-256color entry so binaries that use termcap rather than terminfo will complain. Adding a xterm-256color entry to termcap fixes this. (Using infocmp -CTr)
Turns out this doesn't actually need ncursesw, just xterm-256color. Despite their build instructions claiming ncursesw as a dependency.