source: chapter06/ncurses.xml@ 72d7e28

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 72d7e28 was 72d7e28, checked in by Jeremy Huntwork <jhuntwork@…>, 18 years ago

Moved all dependency information to a new page, Appendix C.
Appendix C also contains information concerning the build order.
While there might need to be a few tweaks yet, this information is complete
enough at this point to close out the long-standing ticket #684.
Many thanks to Chris Staub, Dan Nicholson and Manuel Canales Esparcia for
helping get this finished.

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