How to set custom search paths for the terminfo database when building ncurses from source

六月ゝ 毕业季﹏ 提交于 2020-01-10 15:40:41

问题


How do I set custom search paths for the terminfo database when building ncurses from source?

To be more specific, how do I force the primary directory to be searched in '~/.terminfo'?


回答1:


From the terminfo manpage:

Fetching Compiled Descriptions If the environment variable TERMINFO is set, it is interpreted as the pathname of a directory containing the compiled description you are working on. Only that directory is searched.

  If TERMINFO is not set, the ncurses version of the terminfo reader code
  will  instead  look  in  the  directory  $HOME/.terminfo for a compiled
  description. 

You may need to consult the manpage for information on how to compile the terminfo file.

I hope this helps.




回答2:


Define the --datadir flag in configure, like:

configure --datadir=/usr/customshare

Read the notes in INSTALL file located in the root of ncurses files:

...

The location of the terminfo is set indirectly by the "--datadir" configure option, e.g., /usr/share/terminfo, given a datadir of /usr/share. You may want to override this if you are installing ncurses libraries in nonstandard locations, but wish to share the terminfo database.

...

--with-terminfo-dirs=XXX Specify a search-list of terminfo directories which will be compiled into the ncurses library (default: DATADIR/terminfo)



来源:https://stackoverflow.com/questions/7158602/how-to-set-custom-search-paths-for-the-terminfo-database-when-building-ncurses-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!