source: chapter08/ncurses.xml@ 37e35d2

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

Update to new lfs structure

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

  • Property mode set to 100644
File size: 16.3 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>Don't install a static library that is not handled by configure:</para>
45
46<screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen>
47
48 <para>Prepare Ncurses for compilation:</para>
49
50<screen><userinput remap="configure">./configure --prefix=/usr \
51 --mandir=/usr/share/man \
52 --with-shared \
53 --without-debug \
54 --without-normal \
55 --enable-pc-files \
56 --enable-widec</userinput></screen>
57
58 <variablelist>
59 <title>The meaning of the new configure options:</title>
60
61 <varlistentry>
62 <term><parameter>--enable-widec</parameter></term>
63 <listitem>
64 <para>This switch causes wide-character libraries (e.g., <filename
65 class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
66 to be built instead of normal ones (e.g., <filename
67 class="libraryfile">libncurses.so.&ncurses-version;</filename>).
68 These wide-character libraries are usable in both multibyte and
69 traditional 8-bit locales, while normal libraries work properly
70 only in 8-bit locales. Wide-character and normal libraries are
71 source-compatible, but not binary-compatible.</para>
72 </listitem>
73 </varlistentry>
74
75 <varlistentry>
76 <term><parameter>--enable-pc-files</parameter></term>
77 <listitem>
78 <para>This switch generates and installs .pc files for pkg-config.
79 </para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><parameter>--without-normal</parameter></term>
85 <listitem>
86 <para>This switch disables building and installing most static libraries.
87 </para>
88 </listitem>
89 </varlistentry>
90
91 </variablelist>
92
93 <para>Compile the package:</para>
94
95<screen><userinput remap="make">make</userinput></screen>
96
97 <para>This package has a test suite, but it can only be run after the
98 package has been installed. The tests reside in the
99 <filename class="directory">test/</filename> directory. See the
100 <filename>README</filename> file in that directory for further details.
101 </para>
102
103 <para>Install the package:</para>
104
105<screen><userinput remap="install">make install</userinput></screen>
106
107 <para>Move the shared libraries to the
108 <filename class="directory">/lib</filename> directory, where they are
109 expected to reside:</para>
110
111<screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6* /lib</userinput></screen>
112
113 <para>Because the libraries have been moved, one symlink points to
114 a non-existent file. Recreate it:</para>
115
116<screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen>
117
118 <para>Many applications still expect the linker to be able to find
119 non-wide-character Ncurses libraries. Trick such applications into linking with
120 wide-character libraries by means of symlinks and linker scripts:</para>
121
122<screen><userinput remap="install">for lib in ncurses form panel menu ; do
123 rm -vf /usr/lib/lib${lib}.so
124 echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
125 ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
126done</userinput></screen>
127
128 <para>Finally, make sure that old applications that look for
129 <filename class="libraryfile">-lcurses</filename> at build time are still
130 buildable:</para>
131
132<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so
133echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
134ln -sfv libncurses.so /usr/lib/libcurses.so</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 libncurses++w.a,
282 libpanelw.so, and their non-wide-character counterparts without "w"
283 in the library names.</seg>
284 <seg>
285 /usr/share/tabset,
286 /usr/share/terminfo, and
287 /usr/share/doc/ncurses-&ncurses-version;
288 </seg>
289 </seglistitem>
290 </segmentedlist>
291
292 <variablelist>
293 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
294 <?dbfo list-presentation="list"?>
295 <?dbhtml list-presentation="table"?>
296
297 <varlistentry id="captoinfo">
298 <term><command>captoinfo</command></term>
299 <listitem>
300 <para>Converts a termcap description into a terminfo description</para>
301 <indexterm zone="ch-system-ncurses captoinfo">
302 <primary sortas="b-captoinfo">captoinfo</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="clear">
308 <term><command>clear</command></term>
309 <listitem>
310 <para>Clears the screen, if possible</para>
311 <indexterm zone="ch-system-ncurses clear">
312 <primary sortas="b-clear">clear</primary>
313 </indexterm>
314 </listitem>
315 </varlistentry>
316
317 <varlistentry id="infocmp">
318 <term><command>infocmp</command></term>
319 <listitem>
320 <para>Compares or prints out terminfo descriptions</para>
321 <indexterm zone="ch-system-ncurses infocmp">
322 <primary sortas="b-infocmp">infocmp</primary>
323 </indexterm>
324 </listitem>
325 </varlistentry>
326
327 <varlistentry id="infotocap">
328 <term><command>infotocap</command></term>
329 <listitem>
330 <para>Converts a terminfo description into a termcap description</para>
331 <indexterm zone="ch-system-ncurses infotocap">
332 <primary sortas="b-infotocap">infotocap</primary>
333 </indexterm>
334 </listitem>
335 </varlistentry>
336
337 <varlistentry id="ncursesw6-config">
338 <term><command>ncursesw6-config</command></term>
339 <listitem>
340 <para>Provides configuration information for ncurses</para>
341 <indexterm zone="ch-system-ncurses ncursesw6-config">
342 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
346
347 <varlistentry id="reset">
348 <term><command>reset</command></term>
349 <listitem>
350 <para>Reinitializes a terminal to its default values</para>
351 <indexterm zone="ch-system-ncurses reset">
352 <primary sortas="b-reset">reset</primary>
353 </indexterm>
354 </listitem>
355 </varlistentry>
356
357 <varlistentry id="tabs">
358 <term><command>tabs</command></term>
359 <listitem>
360 <para>Clears and sets tab stops on a terminal</para>
361 <indexterm zone="ch-system-ncurses tabs">
362 <primary sortas="b-tabs">tabs</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 <varlistentry id="tic">
368 <term><command>tic</command></term>
369 <listitem>
370 <para>The terminfo entry-description compiler that translates a
371 terminfo file from source format into the binary format needed for the
372 ncurses library routines [A terminfo file contains information on the
373 capabilities of a certain terminal.]</para>
374 <indexterm zone="ch-system-ncurses tic">
375 <primary sortas="b-tic">tic</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="toe">
381 <term><command>toe</command></term>
382 <listitem>
383 <para>Lists all available terminal types, giving the primary name and
384 description for each</para>
385 <indexterm zone="ch-system-ncurses toe">
386 <primary sortas="b-toe">toe</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry id="tput">
392 <term><command>tput</command></term>
393 <listitem>
394 <para>Makes the values of terminal-dependent capabilities available to
395 the shell; it can also be used to reset or initialize a terminal or
396 report its long name</para>
397 <indexterm zone="ch-system-ncurses tput">
398 <primary sortas="b-tput">tput</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry id="tset">
404 <term><command>tset</command></term>
405 <listitem>
406 <para>Can be used to initialize terminals</para>
407 <indexterm zone="ch-system-ncurses tset">
408 <primary sortas="b-tset">tset</primary>
409 </indexterm>
410 </listitem>
411 </varlistentry>
412
413 <varlistentry id="libcursesw">
414 <term><filename class="libraryfile">libcursesw</filename></term>
415 <listitem>
416 <para>A link to <filename>libncursesw</filename></para>
417 <indexterm zone="ch-system-ncurses libcursesw">
418 <primary sortas="c-libcursesw">libcursesw</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="libncursesw">
424 <term><filename class="libraryfile">libncursesw</filename></term>
425 <listitem>
426 <para>Contains functions to display text in many complex ways on a
427 terminal screen; a good example of the use of these functions is the
428 menu displayed during the kernel's <command>make
429 menuconfig</command></para>
430 <indexterm zone="ch-system-ncurses libncursesw">
431 <primary sortas="c-libncursesw">libncursesw</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
436 <varlistentry id="libformw">
437 <term><filename class="libraryfile">libformw</filename></term>
438 <listitem>
439 <para>Contains functions to implement forms</para>
440 <indexterm zone="ch-system-ncurses libformw">
441 <primary sortas="c-libformw">libformw</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 <varlistentry id="libmenuw">
447 <term><filename class="libraryfile">libmenuw</filename></term>
448 <listitem>
449 <para>Contains functions to implement menus</para>
450 <indexterm zone="ch-system-ncurses libmenuw">
451 <primary sortas="c-libmenuw">libmenuw</primary>
452 </indexterm>
453 </listitem>
454 </varlistentry>
455
456 <varlistentry id="libpanelw">
457 <term><filename class="libraryfile">libpanelw</filename></term>
458 <listitem>
459 <para>Contains functions to implement panels</para>
460 <indexterm zone="ch-system-ncurses libpanelw">
461 <primary sortas="c-libpanelw">libpanelw</primary>
462 </indexterm>
463 </listitem>
464 </varlistentry>
465
466 </variablelist>
467
468 </sect2>
469
470</sect1>
Note: See TracBrowser for help on using the repository browser.