[haiku-development] Re: What to do with termcap? Scene II.

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 17 May 2013 16:54:18 +0200

On 05/17/2013 02:18 PM, Siarzhuk Zharski wrote:
a) Are there any reasons to install libtermcap.a with the Development
optional package? I think anyone going to develop or build ncurses-based
applications on Haiku should be forced to use normal ncurses
installation. And having our restricted libtermcap.a may confuse
configure scripts for 3rd-party aoftware.


b) Currently we have ncurses without wide characters support that can
produce problems in hypothetical case of localizing corresponding tools.

AFAI understand it this has not so much to do with localization as with support for multi-byte character encodings (like UTF-8). So it is definitely something we want to enable.

May be we should activate wide characters support for the stock ncurses

I already did that in the PM branch (I also updated to 5.9). Note that enabling wchar support actually results in a set of libraries with a 'w' suffix and a different interface. Since there are programs that require the non-wchar libraries one has to build both.

The third step was to add terminfo database distribution support for
every type of Haiku builds. It was a bit tricky because ncurses
distribution model requires issuing so known terminfo compiler (tic) to
compile the database directly on the target system using terminfo.src as
Keeping in mind all cases of cross-compiling I have seen following

a) Use the ncurses' terminfo compiler tool (tic) provided by build host
system. Note that tic is heavily dependent on libncurses functionality
so full-blown ncurses installation will become pre-requisite for all
host build systems. For Haiku that means creating ncurses optional
package, outsorcing the stock version of ncurses and modifying build
system correspondently. Sooner or later it will be implemented in this
way, but at the moment I had not enough time resources for this variant :-(

IMO this is the only reasonable option. In the PM branch ncurses already is a mandatory (external) package. We haven't removed the ncurses sources from the Haiku source tree yet and it is still used for the tools you listed above, but at least the Haiku package doesn't include the ncurses header or libraries anymore. If you want, feel free to continue your termcap/ncurses work in the PM branch. It might save you some work, since the branch is already a bit further in this respect. The drawbacks would be that there's no promise when exactly the branch will be merged back into the master and it's still gcc 2 only.

CU, Ingo

Other related posts: