source: chapter06/ncurses.xml@ 2c69ed4

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 2c69ed4 was 2c69ed4, checked in by Matthew Burgess <matthew@…>, 17 years ago

Remove some chmod commands as newer upstream releases mean they are no longer necessary. Fixes #1953.

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

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