source: chapter06/ncurses.xml@ 8eb3fe4

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

First apply of multilib-patch of April 1st, 2019

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

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