source: chapter06/ncurses.xml@ 0014bff

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

Remove extra ncurses symbolic link

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8244 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>rm -vf /usr/lib/libcursesw.so
132echo "INPUT(-lncursesw)" &gt;/usr/lib/libcursesw.so
133ln -sfv libncurses.so /usr/lib/libcurses.so
134ln -sfv libncursesw.a /usr/lib/libcursesw.a
135ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
136
137 <note>
138 <para>The instructions above don't create non-wide-character Ncurses
139 libraries since no package installed by compiling from sources would
140 link against them at runtime. If you must have such libraries because
141 of some binary-only application, build them with the following
142 commands:</para>
143
144<screen role="nodump"><userinput>make distclean
145./configure --prefix=/usr --with-shared --without-normal \
146 --without-debug --without-cxx-binding
147make sources libs
148cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
149 </note>
150
151 </sect2>
152
153 <sect2 id="contents-ncurses" role="content">
154 <title>Contents of Ncurses</title>
155
156 <segmentedlist>
157 <segtitle>Installed programs</segtitle>
158 <segtitle>Installed libraries</segtitle>
159
160 <seglistitem>
161 <seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
162 reset (link to tset), tack, tic, toe, tput, and tset</seg>
163 <seg>libcursesw.{a,so} (symlink and linker script to libncursesw.{a,so}),
164 libformw.{a,so}, libmenuw.{a,so}, libncurses++w.a, libncursesw.{a,so},
165 libpanelw.{a,so} and their non-wide-character counterparts without "w"
166 in the library names.</seg>
167 </seglistitem>
168 </segmentedlist>
169
170 <variablelist>
171 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
172 <?dbfo list-presentation="list"?>
173 <?dbhtml list-presentation="table"?>
174
175 <varlistentry id="captoinfo">
176 <term><command>captoinfo</command></term>
177 <listitem>
178 <para>Converts a termcap description into a terminfo description</para>
179 <indexterm zone="ch-system-ncurses captoinfo">
180 <primary sortas="b-captoinfo">captoinfo</primary>
181 </indexterm>
182 </listitem>
183 </varlistentry>
184
185 <varlistentry id="clear">
186 <term><command>clear</command></term>
187 <listitem>
188 <para>Clears the screen, if possible</para>
189 <indexterm zone="ch-system-ncurses clear">
190 <primary sortas="b-clear">clear</primary>
191 </indexterm>
192 </listitem>
193 </varlistentry>
194
195 <varlistentry id="infocmp">
196 <term><command>infocmp</command></term>
197 <listitem>
198 <para>Compares or prints out terminfo descriptions</para>
199 <indexterm zone="ch-system-ncurses infocmp">
200 <primary sortas="b-infocmp">infocmp</primary>
201 </indexterm>
202 </listitem>
203 </varlistentry>
204
205 <varlistentry id="infotocap">
206 <term><command>infotocap</command></term>
207 <listitem>
208 <para>Converts a terminfo description into a termcap description</para>
209 <indexterm zone="ch-system-ncurses infotocap">
210 <primary sortas="b-infotocap">infotocap</primary>
211 </indexterm>
212 </listitem>
213 </varlistentry>
214
215 <varlistentry id="reset">
216 <term><command>reset</command></term>
217 <listitem>
218 <para>Reinitializes a terminal to its default values</para>
219 <indexterm zone="ch-system-ncurses reset">
220 <primary sortas="b-reset">reset</primary>
221 </indexterm>
222 </listitem>
223 </varlistentry>
224
225 <varlistentry id="tack">
226 <term><command>tack</command></term>
227 <listitem>
228 <para>The terminfo action checker; it is mainly used to test the
229 accuracy of an entry in the terminfo database</para>
230 <indexterm zone="ch-system-ncurses tack">
231 <primary sortas="b-tack">tack</primary>
232 </indexterm>
233 </listitem>
234 </varlistentry>
235
236 <varlistentry id="tic">
237 <term><command>tic</command></term>
238 <listitem>
239 <para>The terminfo entry-description compiler that translates a
240 terminfo file from source format into the binary format needed for the
241 ncurses library routines. A terminfo file contains information on the
242 capabilities of a certain terminal</para>
243 <indexterm zone="ch-system-ncurses tic">
244 <primary sortas="b-tic">tic</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="toe">
250 <term><command>toe</command></term>
251 <listitem>
252 <para>Lists all available terminal types, giving the primary name and
253 description for each</para>
254 <indexterm zone="ch-system-ncurses toe">
255 <primary sortas="b-toe">toe</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="tput">
261 <term><command>tput</command></term>
262 <listitem>
263 <para>Makes the values of terminal-dependent capabilities available to
264 the shell; it can also be used to reset or initialize a terminal or
265 report its long name</para>
266 <indexterm zone="ch-system-ncurses tput">
267 <primary sortas="b-tput">tput</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
271
272 <varlistentry id="tset">
273 <term><command>tset</command></term>
274 <listitem>
275 <para>Can be used to initialize terminals</para>
276 <indexterm zone="ch-system-ncurses tset">
277 <primary sortas="b-tset">tset</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="libcurses">
283 <term><filename class="libraryfile">libcurses</filename></term>
284 <listitem>
285 <para>A link to <filename>libncurses</filename></para>
286 <indexterm zone="ch-system-ncurses libcurses">
287 <primary sortas="c-libcurses">libcurses</primary>
288 </indexterm>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry id="libncurses">
293 <term><filename class="libraryfile">libncurses</filename></term>
294 <listitem>
295 <para>Contains functions to display text in many complex ways on a
296 terminal screen; a good example of the use of these functions is the
297 menu displayed during the kernel's <command>make
298 menuconfig</command></para>
299 <indexterm zone="ch-system-ncurses libncurses">
300 <primary sortas="c-libncurses">libncurses</primary>
301 </indexterm>
302 </listitem>
303 </varlistentry>
304
305 <varlistentry id="libform">
306 <term><filename class="libraryfile">libform</filename></term>
307 <listitem>
308 <para>Contains functions to implement forms</para>
309 <indexterm zone="ch-system-ncurses libform">
310 <primary sortas="c-libform">libform</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="libmenu">
316 <term><filename class="libraryfile">libmenu</filename></term>
317 <listitem>
318 <para>Contains functions to implement menus</para>
319 <indexterm zone="ch-system-ncurses libmenu">
320 <primary sortas="c-libmenu">libmenu</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="libpanel">
326 <term><filename class="libraryfile">libpanel</filename></term>
327 <listitem>
328 <para>Contains functions to implement panels</para>
329 <indexterm zone="ch-system-ncurses libpanel">
330 <primary sortas="c-libpanel">libpanel</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
335 </variablelist>
336
337 </sect2>
338
339</sect1>
Note: See TracBrowser for help on using the repository browser.