source: chapter06/ncurses.xml@ f5976ac

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 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 f5976ac was f5976ac, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Misc fixes from Fernando

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

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