source: chapter06/ncurses.xml@ ad83f72

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 ad83f72 was ad83f72, checked in by Dan Nichilson <dnicholson@…>, 17 years ago

Remove extraneous && in chained commands

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

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