1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
4 | %general-entities;
|
---|
5 | ]>
|
---|
6 | <sect1 id="ch-system-ncurses" role="wrap">
|
---|
7 | <title>Ncurses-&ncurses-version;</title>
|
---|
8 | <?dbhtml filename="ncurses.html"?>
|
---|
9 |
|
---|
10 | <indexterm zone="ch-system-ncurses"><primary sortas="a-Ncurses">Ncurses</primary></indexterm>
|
---|
11 |
|
---|
12 | <sect2 role="package"><title/>
|
---|
13 | <para>The Ncurses package contains libraries for terminal-independent
|
---|
14 | handling of character screens.</para>
|
---|
15 |
|
---|
16 | <segmentedlist>
|
---|
17 | <segtitle>&buildtime;</segtitle>
|
---|
18 | <segtitle>&diskspace;</segtitle>
|
---|
19 | <seglistitem><seg>0.6 SBU</seg><seg>18.6 MB</seg></seglistitem>
|
---|
20 | </segmentedlist>
|
---|
21 |
|
---|
22 | <segmentedlist>
|
---|
23 | <segtitle>&dependencies;</segtitle>
|
---|
24 | <seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
|
---|
25 | Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
|
---|
26 | </segmentedlist>
|
---|
27 | </sect2>
|
---|
28 |
|
---|
29 | <sect2 role="installation">
|
---|
30 | <title>Installation of Ncurses</title>
|
---|
31 | <!-- Uncomment if using a dated ncurses release instead of a numbered one.
|
---|
32 |
|
---|
33 | <para>Since the release of Ncurses-&ncurses-version;, some bugs have been fixed
|
---|
34 | and features added. The most important news are .......
|
---|
35 | To get these fixes and features, apply the rollup patch:</para>
|
---|
36 |
|
---|
37 | <screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
|
---|
38 | -->
|
---|
39 |
|
---|
40 | <para>Since the release of Ncurses-&ncurses-version;, a memory leak and some
|
---|
41 | display bugs were found and fixed upstream. Apply those fixes:</para>
|
---|
42 |
|
---|
43 | <screen><userinput>patch -Np1 -i ../&ncurses-fixes-patch;</userinput></screen>
|
---|
44 |
|
---|
45 | <para>Prepare Ncurses for compilation:</para>
|
---|
46 |
|
---|
47 | <screen><userinput>./configure --prefix=/usr --with-shared --without-debug --enable-widec</userinput></screen>
|
---|
48 |
|
---|
49 | <para>The meaning of the configure options:</para>
|
---|
50 |
|
---|
51 | <variablelist>
|
---|
52 | <varlistentry>
|
---|
53 | <term><parameter>--enable-widec</parameter></term>
|
---|
54 | <listitem><para>This switch causes wide-character libraries
|
---|
55 | (e.g., <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
|
---|
56 | to be built instead of normal ones
|
---|
57 | (e.g., <filename class="libraryfile">libncurses.so.&ncurses-version;</filename>).
|
---|
58 | These wide-character libraries are usable in both multibyte and traditional 8-bit
|
---|
59 | locales, while normal libraries work properly only in 8-bit locales.
|
---|
60 | Wide-character and normal libraries are source-compatible, but not
|
---|
61 | binary-compatible.</para>
|
---|
62 | </listitem>
|
---|
63 | </varlistentry>
|
---|
64 | <!--
|
---|
65 | <varlistentry>
|
---|
66 | <term><parameter>- -without-cxx-binding</parameter></term>
|
---|
67 | <listitem><para>This optional switch causes the
|
---|
68 | <filename class="libraryfile">libncurses++w.a</filename> library
|
---|
69 | not to be built. Nothing in LFS and BLFS uses this library.</para>
|
---|
70 | </listitem>
|
---|
71 | </varlistentry>
|
---|
72 | -->
|
---|
73 | </variablelist>
|
---|
74 |
|
---|
75 | <para>Compile the package:</para>
|
---|
76 |
|
---|
77 | <screen><userinput>make</userinput></screen>
|
---|
78 |
|
---|
79 | <para>This package does not come with a test suite.</para>
|
---|
80 |
|
---|
81 | <para>Install the package:</para>
|
---|
82 |
|
---|
83 | <screen><userinput>make install</userinput></screen>
|
---|
84 |
|
---|
85 | <para>Give the Ncurses libraries execute permissions:</para>
|
---|
86 |
|
---|
87 | <screen><userinput>chmod -v 755 /usr/lib/*.&ncurses-version;</userinput></screen>
|
---|
88 |
|
---|
89 | <para>Fix a library that should not be executable:</para>
|
---|
90 |
|
---|
91 | <screen><userinput>chmod -v 644 /usr/lib/libncurses++w.a</userinput></screen>
|
---|
92 |
|
---|
93 | <para>Move the libraries to the <filename class="directory">/lib</filename> directory,
|
---|
94 | where they are expected to reside:</para>
|
---|
95 |
|
---|
96 | <screen><userinput>mv -v /usr/lib/libncursesw.so.5* /lib</userinput></screen>
|
---|
97 |
|
---|
98 | <para>Because the libraries have been moved, one symlink points to
|
---|
99 | a non-existent file. Recreate it:</para>
|
---|
100 |
|
---|
101 | <screen><userinput>ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so</userinput></screen>
|
---|
102 |
|
---|
103 | <para>Many applications still expect the linker to be able to find
|
---|
104 | non-wide-character Ncurses libraries. Trick such applications into linking with
|
---|
105 | wide-character libraries by means of symlinks and linker scripts:</para>
|
---|
106 |
|
---|
107 | <screen><userinput>for lib in curses ncurses form panel menu ; do \
|
---|
108 | rm -vf /usr/lib/lib${lib}.so ; \
|
---|
109 | echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
|
---|
110 | ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
|
---|
111 | done &&
|
---|
112 | ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
|
---|
113 |
|
---|
114 | <para>Finally, make sure that old applications that look for
|
---|
115 | <filename class="libraryfile">-lcurses</filename> at build time are still
|
---|
116 | buildable:</para>
|
---|
117 |
|
---|
118 | <screen><userinput>echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so &&
|
---|
119 | ln -sfv libncurses.so /usr/lib/libcurses.so &&
|
---|
120 | ln -sfv libncursesw.a /usr/lib/libcursesw.a &&
|
---|
121 | ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
|
---|
122 |
|
---|
123 | <note><para>The instructions above don't create non-wide-character Ncurses
|
---|
124 | libraries since no package installed by compiling from sources would link
|
---|
125 | against them at runtime.
|
---|
126 | If you must have such libraries because of some binary-only application,
|
---|
127 | build them with the following commands:</para>
|
---|
128 | <screen role="nodump"><userinput>make distclean &&
|
---|
129 | ./configure --prefix=/usr --with-shared --without-normal \
|
---|
130 | --without-debug --without-cxx-binding &&
|
---|
131 | make sources libs &&
|
---|
132 | cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
|
---|
133 | </note>
|
---|
134 | </sect2>
|
---|
135 |
|
---|
136 |
|
---|
137 | <sect2 id="contents-ncurses" role="content"><title>Contents of Ncurses</title>
|
---|
138 |
|
---|
139 | <segmentedlist>
|
---|
140 | <segtitle>Installed programs</segtitle>
|
---|
141 | <segtitle>Installed libraries</segtitle>
|
---|
142 | <seglistitem><seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
|
---|
143 | reset (link to tset), tack, tic, toe, tput, and tset</seg>
|
---|
144 | <seg>libcursesw.[a,so] (symlink and linker script to libncursesw.[a,so]),
|
---|
145 | libformw.[a,so], libmenuw.[a,so],
|
---|
146 | libncurses++w.a, libncursesw.[a,so], libpanelw.[a,so] and their
|
---|
147 | non-wide-character counterparts without "w" in the library names.</seg></seglistitem>
|
---|
148 | </segmentedlist>
|
---|
149 |
|
---|
150 | <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
151 | <?dbfo list-presentation="list"?>
|
---|
152 | <?dbhtml list-presentation="table"?>
|
---|
153 |
|
---|
154 | <varlistentry id="captoinfo">
|
---|
155 | <term><command>captoinfo</command></term>
|
---|
156 | <listitem>
|
---|
157 | <para>Converts a termcap description into a terminfo description</para>
|
---|
158 | <indexterm zone="ch-system-ncurses captoinfo"><primary sortas="b-captoinfo">captoinfo</primary></indexterm>
|
---|
159 | </listitem>
|
---|
160 | </varlistentry>
|
---|
161 |
|
---|
162 | <varlistentry id="clear">
|
---|
163 | <term><command>clear</command></term>
|
---|
164 | <listitem>
|
---|
165 | <para>Clears the screen, if possible</para>
|
---|
166 | <indexterm zone="ch-system-ncurses clear"><primary sortas="b-clear">clear</primary></indexterm>
|
---|
167 | </listitem>
|
---|
168 | </varlistentry>
|
---|
169 |
|
---|
170 | <varlistentry id="infocmp">
|
---|
171 | <term><command>infocmp</command></term>
|
---|
172 | <listitem>
|
---|
173 | <para>Compares or prints out terminfo descriptions</para>
|
---|
174 | <indexterm zone="ch-system-ncurses infocmp"><primary sortas="b-infocmp">infocmp</primary></indexterm>
|
---|
175 | </listitem>
|
---|
176 | </varlistentry>
|
---|
177 |
|
---|
178 | <varlistentry id="infotocap">
|
---|
179 | <term><command>infotocap</command></term>
|
---|
180 | <listitem>
|
---|
181 | <para>Converts a terminfo description into a termcap description</para>
|
---|
182 | <indexterm zone="ch-system-ncurses infotocap"><primary sortas="b-infotocap">infotocap</primary></indexterm>
|
---|
183 | </listitem>
|
---|
184 | </varlistentry>
|
---|
185 |
|
---|
186 | <varlistentry id="reset">
|
---|
187 | <term><command>reset</command></term>
|
---|
188 | <listitem>
|
---|
189 | <para>Reinitializes a terminal to its default values</para>
|
---|
190 | <indexterm zone="ch-system-ncurses reset"><primary sortas="b-reset">reset</primary></indexterm>
|
---|
191 | </listitem>
|
---|
192 | </varlistentry>
|
---|
193 |
|
---|
194 | <varlistentry id="tack">
|
---|
195 | <term><command>tack</command></term>
|
---|
196 | <listitem>
|
---|
197 | <para>The terminfo action checker; it is mainly used to test the
|
---|
198 | accuracy of an entry in the terminfo database</para>
|
---|
199 | <indexterm zone="ch-system-ncurses tack"><primary sortas="b-tack">tack</primary></indexterm>
|
---|
200 | </listitem>
|
---|
201 | </varlistentry>
|
---|
202 |
|
---|
203 | <varlistentry id="tic">
|
---|
204 | <term><command>tic</command></term>
|
---|
205 | <listitem>
|
---|
206 | <para>The terminfo entry-description compiler that translates a
|
---|
207 | terminfo file from source format into the binary format needed for the
|
---|
208 | ncurses library routines. A terminfo file contains information on the
|
---|
209 | capabilities of a certain terminal</para>
|
---|
210 | <indexterm zone="ch-system-ncurses tic"><primary sortas="b-tic">tic</primary></indexterm>
|
---|
211 | </listitem>
|
---|
212 | </varlistentry>
|
---|
213 |
|
---|
214 | <varlistentry id="toe">
|
---|
215 | <term><command>toe</command></term>
|
---|
216 | <listitem>
|
---|
217 | <para>Lists all available terminal types, giving the primary name and
|
---|
218 | description for each</para>
|
---|
219 | <indexterm zone="ch-system-ncurses toe"><primary sortas="b-toe">toe</primary></indexterm>
|
---|
220 | </listitem>
|
---|
221 | </varlistentry>
|
---|
222 |
|
---|
223 | <varlistentry id="tput">
|
---|
224 | <term><command>tput</command></term>
|
---|
225 | <listitem>
|
---|
226 | <para>Makes the values of terminal-dependent capabilities available to
|
---|
227 | the shell; it can also be used to reset or initialize a terminal or
|
---|
228 | report its long name</para>
|
---|
229 | <indexterm zone="ch-system-ncurses tput"><primary sortas="b-tput">tput</primary></indexterm>
|
---|
230 | </listitem>
|
---|
231 | </varlistentry>
|
---|
232 |
|
---|
233 | <varlistentry id="tset">
|
---|
234 | <term><command>tset</command></term>
|
---|
235 | <listitem>
|
---|
236 | <para>Can be used to initialize terminals</para>
|
---|
237 | <indexterm zone="ch-system-ncurses tset"><primary sortas="b-tset">tset</primary></indexterm>
|
---|
238 | </listitem>
|
---|
239 | </varlistentry>
|
---|
240 |
|
---|
241 | <varlistentry id="libcurses">
|
---|
242 | <term><filename class="libraryfile">libcurses</filename></term>
|
---|
243 | <listitem>
|
---|
244 | <para>A link to <filename>libncurses</filename></para>
|
---|
245 | <indexterm zone="ch-system-ncurses libcurses"><primary sortas="c-libcurses">libcurses</primary></indexterm>
|
---|
246 | </listitem>
|
---|
247 | </varlistentry>
|
---|
248 |
|
---|
249 | <varlistentry id="libncurses">
|
---|
250 | <term><filename class="libraryfile">libncurses</filename></term>
|
---|
251 | <listitem>
|
---|
252 | <para>Contains functions to display text in many complex ways on a
|
---|
253 | terminal screen; a good example of the use of these functions is the
|
---|
254 | menu displayed during the kernel's <command>make menuconfig</command></para>
|
---|
255 | <indexterm zone="ch-system-ncurses libncurses"><primary sortas="c-libncurses">libncurses</primary></indexterm>
|
---|
256 | </listitem>
|
---|
257 | </varlistentry>
|
---|
258 |
|
---|
259 | <varlistentry id="libform">
|
---|
260 | <term><filename class="libraryfile">libform</filename></term>
|
---|
261 | <listitem>
|
---|
262 | <para>Contains functions to implement forms</para>
|
---|
263 | <indexterm zone="ch-system-ncurses libform"><primary sortas="c-libform">libform</primary></indexterm>
|
---|
264 | </listitem>
|
---|
265 | </varlistentry>
|
---|
266 |
|
---|
267 | <varlistentry id="libmenu">
|
---|
268 | <term><filename class="libraryfile">libmenu</filename></term>
|
---|
269 | <listitem>
|
---|
270 | <para>Contains functions to implement menus</para>
|
---|
271 | <indexterm zone="ch-system-ncurses libmenu"><primary sortas="c-libmenu">libmenu</primary></indexterm>
|
---|
272 | </listitem>
|
---|
273 | </varlistentry>
|
---|
274 |
|
---|
275 | <varlistentry id="libpanel">
|
---|
276 | <term><filename class="libraryfile">libpanel</filename></term>
|
---|
277 | <listitem>
|
---|
278 | <para>Contains functions to implement panels</para>
|
---|
279 | <indexterm zone="ch-system-ncurses libpanel"><primary sortas="c-libpanel">libpanel</primary></indexterm>
|
---|
280 | </listitem>
|
---|
281 | </varlistentry>
|
---|
282 | </variablelist>
|
---|
283 |
|
---|
284 | </sect2>
|
---|
285 |
|
---|
286 | </sect1>
|
---|