source: chapter06/ncurses.xml@ 49ae4c6

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 49ae4c6 was 49ae4c6, checked in by Matthew Burgess <matthew@…>, 17 years ago

Mention the Ncurses test suite. Fixes #1954.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7961 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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