source: chapter08/ncurses.xml@ 4bda698

multilib-10.1
Last change on this file since 4bda698 was 4bda698, checked in by Thomas Trepl <thomas@…>, 3 years ago

Merge changes from trunk to multilib

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@12130 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 16.2 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-fin-sbu;</seg>
35 <seg>&ncurses-fin-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Ncurses</title>
43
44 <para>Prepare Ncurses for compilation:</para>
45
46<screen><userinput remap="configure">./configure --prefix=/usr \
47 --mandir=/usr/share/man \
48 --with-shared \
49 --without-debug \
50 --without-normal \
51 --enable-pc-files \
52 --enable-widec</userinput></screen>
53
54 <variablelist>
55 <title>The meaning of the new configure options:</title>
56
57 <varlistentry>
58 <term><parameter>--enable-widec</parameter></term>
59 <listitem>
60 <para>This switch causes wide-character libraries (e.g., <filename
61 class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
62 to be built instead of normal ones (e.g., <filename
63 class="libraryfile">libncurses.so.&ncurses-version;</filename>).
64 These wide-character libraries are usable in both multibyte and
65 traditional 8-bit locales, while normal libraries work properly
66 only in 8-bit locales. Wide-character and normal libraries are
67 source-compatible, but not binary-compatible.</para>
68 </listitem>
69 </varlistentry>
70
71 <varlistentry>
72 <term><parameter>--enable-pc-files</parameter></term>
73 <listitem>
74 <para>This switch generates and installs .pc files for pkg-config.
75 </para>
76 </listitem>
77 </varlistentry>
78
79 <varlistentry>
80 <term><parameter>--without-normal</parameter></term>
81 <listitem>
82 <para>This switch disables building and installing most static libraries.
83 </para>
84 </listitem>
85 </varlistentry>
86
87 </variablelist>
88
89 <para>Compile the package:</para>
90
91<screen><userinput remap="make">make</userinput></screen>
92
93 <para>This package has a test suite, but it can only be run after the
94 package has been installed. The tests reside in the
95 <filename class="directory">test/</filename> directory. See the
96 <filename>README</filename> file in that directory for further details.
97 </para>
98
99 <para>Install the package:</para>
100
101<screen><userinput remap="install">make install</userinput></screen>
102
103 <para>Move the shared libraries to the
104 <filename class="directory">/lib</filename> directory, where they are
105 expected to reside:</para>
106
107<screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6* /lib</userinput></screen>
108
109 <para>Because the libraries have been moved, one symlink points to
110 a non-existent file. Recreate it:</para>
111
112<screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen>
113
114 <para>Many applications still expect the linker to be able to find
115 non-wide-character Ncurses libraries. Trick such applications into linking with
116 wide-character libraries by means of symlinks and linker scripts:</para>
117
118<screen><userinput remap="install">for lib in ncurses form panel menu ; do
119 rm -vf /usr/lib/lib${lib}.so
120 echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
121 ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
122done</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 remap="install">rm -vf /usr/lib/libcursesw.so
129echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
130ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
131
132 <para>Remove a static library that is not handled by configure:</para>
133
134<screen><userinput remap="install">rm -fv /usr/lib/libncurses++w.a</userinput></screen>
135
136 <para>If desired, install the Ncurses documentation:</para>
137
138<screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version;
139cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
140
141 <note>
142
143 <para>The instructions above don't create non-wide-character Ncurses
144 libraries since no package installed by compiling from sources would link
145 against them at runtime. However, the only known binary-only
146 applications that link against non-wide-character Ncurses libraries
147 require version 5. If you must have such libraries because of some binary-only
148 application or to be compliant with LSB, build the package again with the
149 following commands:</para>
150
151<screen role="nodump"><userinput>make distclean
152./configure --prefix=/usr \
153 --with-shared \
154 --without-normal \
155 --without-debug \
156 --without-cxx-binding \
157 --with-abi-version=5
158make sources libs
159cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
160 </note>
161
162 </sect2>
163
164 <!-- - - - - - - - - - -->
165 <!-- Multilib - 32bit -->
166 <!-- - - - - - - - - - -->
167 <sect2 arch="ml_32,ml_all">
168 <title>Building Ncurses - 32bit</title>
169
170 <para>Clean previous build:</para>
171
172<screen><userinput remap="pre">make distclean</userinput></screen>
173
174 <para>Prepare Ncurses for compilation:</para>
175
176<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \
177./configure --prefix=/usr \
178 --host=i686-pc-linux-gnu \
179 --libdir=&usr-lib-m32; \
180 --mandir=/usr/share/man \
181 --with-shared \
182 --without-debug \
183 --without-normal \
184 --enable-pc-files \
185 --enable-widec \
186 --with-pkg-config-libdir=&usr-lib-m32;/pkgconfig</userinput></screen>
187
188 <para>Compile the package:</para>
189
190<screen><userinput remap="make">make</userinput></screen>
191
192 <para>Install the package:</para>
193
194<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
195mkdir -p DESTDIR&usr-lib-m32;/pkgconfig
196for lib in ncurses form panel menu ; do
197 rm -vf DESTDIR&usr-lib-m32;/lib${lib}.so
198 echo "INPUT(-l${lib}w)" > DESTDIR&usr-lib-m32;/lib${lib}.so
199 ln -svf ${lib}w.pc DESTDIR&usr-lib-m32;/pkgconfig/$lib.pc
200done
201rm -vf DESTDIR&usr-lib-m32;/libcursesw.so
202echo "INPUT(-lncursesw)" > DESTDIR&usr-lib-m32;/libcursesw.so
203ln -sfv libncurses.so DESTDIR&usr-lib-m32;/libcurses.so
204cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
205rm -rf DESTDIR</userinput></screen>
206
207 </sect2><!-- m32 -->
208
209 <!-- - - - - - - - - - -->
210 <!-- Multilib - x32bit -->
211 <!-- - - - - - - - - - -->
212 <sect2 arch="ml_x32,ml_all">
213 <title>Building Ncurses - x32bit</title>
214
215 <para>Clean previous build:</para>
216
217<screen><userinput remap="pre">make distclean</userinput></screen>
218
219 <para>Prepare Ncurses for compilation:</para>
220
221<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \
222./configure --prefix=/usr \
223 --host=x86_64-pc-linux-gnux32 \
224 --libdir=&usr-lib-mx32; \
225 --mandir=/usr/share/man \
226 --with-shared \
227 --without-debug \
228 --without-normal \
229 --enable-pc-files \
230 --enable-widec \
231 --with-pkg-config-libdir=&usr-lib-mx32;/pkgconfig</userinput></screen>
232
233 <para>Compile the package:</para>
234
235<screen><userinput remap="make">make</userinput></screen>
236
237 <para>Install the package:</para>
238
239<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
240mkdir -p DESTDIR&usr-lib-mx32;/pkgconfig
241for lib in ncurses form panel menu ; do
242 rm -vf DESTDIR&usr-lib-mx32;/lib${lib}.so
243 echo "INPUT(-l${lib}w)" > DESTDIR&usr-lib-mx32;/lib${lib}.so
244 ln -svf ${lib}w.pc DESTDIR&usr-lib-mx32;/pkgconfig/$lib.pc
245done
246rm -vf DESTDIR&usr-lib-mx32;/libcursesw.so
247echo "INPUT(-lncursesw)" > DESTDIR&usr-lib-mx32;/libcursesw.so
248ln -sfv libncurses.so DESTDIR&usr-lib-mx32;/libcurses.so
249cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
250rm -rf DESTDIR</userinput></screen>
251
252 </sect2><!-- mx32 -->
253
254 <sect2 id="contents-ncurses" role="content">
255 <title>Contents of Ncurses</title>
256
257 <segmentedlist>
258 <segtitle>Installed programs</segtitle>
259 <segtitle>Installed libraries</segtitle>
260 <segtitle>Installed directories</segtitle>
261
262 <seglistitem>
263 <seg>
264 captoinfo (link to tic),
265 clear,
266 infocmp,
267 infotocap (link to tic),
268 ncursesw6-config,
269 reset (link to tset),
270 tabs,
271 tic,
272 toe,
273 tput, and
274 tset
275 </seg>
276 <seg>
277 libcursesw.so (symlink and linker script to libncursesw.so),
278 libformw.so,
279 libmenuw.so,
280 libncursesw.so,
281 libpanelw.so, and their non-wide-character counterparts without "w"
282 in the library names.</seg>
283 <seg>
284 /usr/share/tabset,
285 /usr/share/terminfo, and
286 /usr/share/doc/ncurses-&ncurses-version;
287 </seg>
288 </seglistitem>
289 </segmentedlist>
290
291 <variablelist>
292 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
293 <?dbfo list-presentation="list"?>
294 <?dbhtml list-presentation="table"?>
295
296 <varlistentry id="captoinfo">
297 <term><command>captoinfo</command></term>
298 <listitem>
299 <para>Converts a termcap description into a terminfo description</para>
300 <indexterm zone="ch-system-ncurses captoinfo">
301 <primary sortas="b-captoinfo">captoinfo</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 <varlistentry id="clear">
307 <term><command>clear</command></term>
308 <listitem>
309 <para>Clears the screen, if possible</para>
310 <indexterm zone="ch-system-ncurses clear">
311 <primary sortas="b-clear">clear</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 <varlistentry id="infocmp">
317 <term><command>infocmp</command></term>
318 <listitem>
319 <para>Compares or prints out terminfo descriptions</para>
320 <indexterm zone="ch-system-ncurses infocmp">
321 <primary sortas="b-infocmp">infocmp</primary>
322 </indexterm>
323 </listitem>
324 </varlistentry>
325
326 <varlistentry id="infotocap">
327 <term><command>infotocap</command></term>
328 <listitem>
329 <para>Converts a terminfo description into a termcap description</para>
330 <indexterm zone="ch-system-ncurses infotocap">
331 <primary sortas="b-infotocap">infotocap</primary>
332 </indexterm>
333 </listitem>
334 </varlistentry>
335
336 <varlistentry id="ncursesw6-config">
337 <term><command>ncursesw6-config</command></term>
338 <listitem>
339 <para>Provides configuration information for ncurses</para>
340 <indexterm zone="ch-system-ncurses ncursesw6-config">
341 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>
342 </indexterm>
343 </listitem>
344 </varlistentry>
345
346 <varlistentry id="reset">
347 <term><command>reset</command></term>
348 <listitem>
349 <para>Reinitializes a terminal to its default values</para>
350 <indexterm zone="ch-system-ncurses reset">
351 <primary sortas="b-reset">reset</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="tabs">
357 <term><command>tabs</command></term>
358 <listitem>
359 <para>Clears and sets tab stops on a terminal</para>
360 <indexterm zone="ch-system-ncurses tabs">
361 <primary sortas="b-tabs">tabs</primary>
362 </indexterm>
363 </listitem>
364 </varlistentry>
365
366 <varlistentry id="tic">
367 <term><command>tic</command></term>
368 <listitem>
369 <para>The terminfo entry-description compiler that translates a
370 terminfo file from source format into the binary format needed for the
371 ncurses library routines [A terminfo file contains information on the
372 capabilities of a certain terminal.]</para>
373 <indexterm zone="ch-system-ncurses tic">
374 <primary sortas="b-tic">tic</primary>
375 </indexterm>
376 </listitem>
377 </varlistentry>
378
379 <varlistentry id="toe">
380 <term><command>toe</command></term>
381 <listitem>
382 <para>Lists all available terminal types, giving the primary name and
383 description for each</para>
384 <indexterm zone="ch-system-ncurses toe">
385 <primary sortas="b-toe">toe</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
390 <varlistentry id="tput">
391 <term><command>tput</command></term>
392 <listitem>
393 <para>Makes the values of terminal-dependent capabilities available to
394 the shell; it can also be used to reset or initialize a terminal or
395 report its long name</para>
396 <indexterm zone="ch-system-ncurses tput">
397 <primary sortas="b-tput">tput</primary>
398 </indexterm>
399 </listitem>
400 </varlistentry>
401
402 <varlistentry id="tset">
403 <term><command>tset</command></term>
404 <listitem>
405 <para>Can be used to initialize terminals</para>
406 <indexterm zone="ch-system-ncurses tset">
407 <primary sortas="b-tset">tset</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
412 <varlistentry id="libcursesw">
413 <term><filename class="libraryfile">libcursesw</filename></term>
414 <listitem>
415 <para>A link to <filename>libncursesw</filename></para>
416 <indexterm zone="ch-system-ncurses libcursesw">
417 <primary sortas="c-libcursesw">libcursesw</primary>
418 </indexterm>
419 </listitem>
420 </varlistentry>
421
422 <varlistentry id="libncursesw">
423 <term><filename class="libraryfile">libncursesw</filename></term>
424 <listitem>
425 <para>Contains functions to display text in many complex ways on a
426 terminal screen; a good example of the use of these functions is the
427 menu displayed during the kernel's <command>make
428 menuconfig</command></para>
429 <indexterm zone="ch-system-ncurses libncursesw">
430 <primary sortas="c-libncursesw">libncursesw</primary>
431 </indexterm>
432 </listitem>
433 </varlistentry>
434
435 <varlistentry id="libformw">
436 <term><filename class="libraryfile">libformw</filename></term>
437 <listitem>
438 <para>Contains functions to implement forms</para>
439 <indexterm zone="ch-system-ncurses libformw">
440 <primary sortas="c-libformw">libformw</primary>
441 </indexterm>
442 </listitem>
443 </varlistentry>
444
445 <varlistentry id="libmenuw">
446 <term><filename class="libraryfile">libmenuw</filename></term>
447 <listitem>
448 <para>Contains functions to implement menus</para>
449 <indexterm zone="ch-system-ncurses libmenuw">
450 <primary sortas="c-libmenuw">libmenuw</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="libpanelw">
456 <term><filename class="libraryfile">libpanelw</filename></term>
457 <listitem>
458 <para>Contains functions to implement panels</para>
459 <indexterm zone="ch-system-ncurses libpanelw">
460 <primary sortas="c-libpanelw">libpanelw</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 </variablelist>
466
467 </sect2>
468
469</sect1>
Note: See TracBrowser for help on using the repository browser.