source: chapter06/ncurses.xml@ ee1a413

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

Change profiling attribute to enable selection of m32 and/or mx32. Fixes #4452.

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

  • Property mode set to 100644
File size: 17.8 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="ml_32,ml_x32,ml_all"><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="ml_32,ml_x32,ml_all">
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 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ -->
182
183 <sect2 arch="ml_32,ml_all" role="installation">
184 <title>Installation of Ncurses - 32-bit</title>
185
186 <para>Clean previous build:</para>
187
188<screen><userinput remap="pre">make distclean</userinput></screen>
189
190 <para>Prepare Ncurses for compilation:</para>
191
192<screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \
193 ./configure --prefix=/usr \
194 --libdir=/usr/lib32 \
195 --mandir=/usr/share/man \
196 --with-shared \
197 --without-debug \
198 --without-normal \
199 --enable-pc-files \
200 --enable-widec \
201 --host=i686-pc-linux-gnu \
202 --with-pkg-config-libdir=/usr/lib32/pkgconfig</userinput></screen>
203
204 <para>Compile the package:</para>
205
206<screen><userinput remap="make">make -j1</userinput></screen>
207
208 <para>Install the package:</para>
209
210<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
211for lib in ncurses form panel menu ; do
212 rm -vf DESTDIR/usr/lib32/lib${lib}.so
213 echo "INPUT(-l${lib}w)" > DESTDIR/usr/lib32/lib${lib}.so
214 ln -svf ${lib}w.pc DESTDIR/usr/lib32/pkgconfig/$lib.pc
215done
216rm -vf DESTDIR/usr/lib32/libcursesw.so
217echo "INPUT(-lncursesw)" > DESTDIR/usr/lib32/libcursesw.so
218ln -sfv libncurses.so DESTDIR/usr/lib32/libcurses.so
219cp -Rv DESTDIR/usr/lib32/* /usr/lib32
220rm -rf DESTDIR</userinput></screen>
221
222 <para>If desired, make the version 5 libraries in 32bit as well:</para>
223
224<screen><userinput remap="install">make distclean
225CC="gcc -m32" CXX="g++ -m32" \
226 ./configure --prefix=/usr \
227 --with-shared \
228 --without-normal \
229 --without-debug \
230 --without-cxx-binding \
231 --with-abi-version=5 \
232 --host=i686-pc-linux-gnu
233make -j1 sources libs
234cp -av lib/lib*.so.5* /usr/lib32</userinput></screen>
235
236 </sect2>
237
238 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ -->
239
240 <sect2 arch="ml_x32,ml_all" role="installation">
241 <title>Installation of Ncurses - x32-bit</title>
242
243 <para>Clean previous build:</para>
244
245<screen><userinput remap="pre">make distclean</userinput></screen>
246
247 <para>Prepare Ncurses for compilation:</para>
248
249<screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \
250 ./configure --prefix=/usr \
251 --libdir=/usr/libx32 \
252 --mandir=/usr/share/man \
253 --with-shared \
254 --without-debug \
255 --without-normal \
256 --enable-pc-files \
257 --enable-widec \
258 --host=x86_64-pc-linux-gnux32 \
259 --with-pkg-config-libdir=/usr/libx32/pkgconfig</userinput></screen>
260
261 <para>Compile the package:</para>
262
263<screen><userinput remap="make">make -j1</userinput></screen>
264
265 <para>Install the package:</para>
266
267<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
268for lib in ncurses form panel menu ; do
269 rm -vf DESTDIR/usr/libx32/lib${lib}.so
270 echo "INPUT(-l${lib}w)" > DESTDIR/usr/libx32/lib${lib}.so
271 ln -svf ${lib}w.pc DESTDIR/usr/libx32/pkgconfig/$lib.pc
272done
273rm -vf DESTDIR/usr/libx32/libcursesw.so
274echo "INPUT(-lncursesw)" > DESTDIR/usr/libx32/libcursesw.so
275ln -sfv libncurses.so DESTDIR/usr/libx32/libcurses.so
276cp -Rv DESTDIR/usr/libx32/* /usr/libx32
277rm -rf DESTDIR</userinput></screen>
278
279<!-- Any package out there which still needs version 5?
280 Leave it out for x32bit for now.
281
282 <para>If desired, make the version 5 libraries in x32bit as well:</para>
283
284<screen><userinput remap="install">make distclean
285CC="gcc -mx32" CXX="g++ -mx32" \
286 ./configure - -prefix=/usr \
287 - -with-shared \
288 - -without-normal \
289 - -without-debug \
290 - -without-cxx-binding \
291 - -with-abi-version=5
292make -j1 sources libs
293cp -av lib/lib*.so.5* /usr/libx32</userinput></screen>
294-->
295 </sect2>
296
297 <sect2 id="contents-ncurses" role="content">
298 <title>Contents of Ncurses</title>
299
300 <segmentedlist>
301 <segtitle>Installed programs</segtitle>
302 <segtitle>Installed libraries</segtitle>
303 <segtitle>Installed directories</segtitle>
304
305 <seglistitem>
306 <seg>
307 captoinfo (link to tic),
308 clear,
309 infocmp,
310 infotocap (link to tic),
311 ncursesw6-config,
312 reset (link to tset),
313 tabs,
314 tic,
315 toe,
316 tput, and
317 tset
318 </seg>
319 <seg>
320 libcursesw.so (symlink and linker script to libncursesw.so),
321 libformw.so,
322 libmenuw.so,
323 libncursesw.so,
324 libncurses++w.a,
325 libpanelw.so, and their non-wide-character counterparts without "w"
326 in the library names.</seg>
327 <seg>
328 /usr/share/tabset,
329 /usr/share/terminfo, and
330 /usr/share/doc/ncurses-&ncurses-version;
331 </seg>
332 </seglistitem>
333 </segmentedlist>
334
335 <variablelist>
336 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
337 <?dbfo list-presentation="list"?>
338 <?dbhtml list-presentation="table"?>
339
340 <varlistentry id="captoinfo">
341 <term><command>captoinfo</command></term>
342 <listitem>
343 <para>Converts a termcap description into a terminfo description</para>
344 <indexterm zone="ch-system-ncurses captoinfo">
345 <primary sortas="b-captoinfo">captoinfo</primary>
346 </indexterm>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry id="clear">
351 <term><command>clear</command></term>
352 <listitem>
353 <para>Clears the screen, if possible</para>
354 <indexterm zone="ch-system-ncurses clear">
355 <primary sortas="b-clear">clear</primary>
356 </indexterm>
357 </listitem>
358 </varlistentry>
359
360 <varlistentry id="infocmp">
361 <term><command>infocmp</command></term>
362 <listitem>
363 <para>Compares or prints out terminfo descriptions</para>
364 <indexterm zone="ch-system-ncurses infocmp">
365 <primary sortas="b-infocmp">infocmp</primary>
366 </indexterm>
367 </listitem>
368 </varlistentry>
369
370 <varlistentry id="infotocap">
371 <term><command>infotocap</command></term>
372 <listitem>
373 <para>Converts a terminfo description into a termcap description</para>
374 <indexterm zone="ch-system-ncurses infotocap">
375 <primary sortas="b-infotocap">infotocap</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="ncursesw6-config">
381 <term><command>ncursesw6-config</command></term>
382 <listitem>
383 <para>Provides configuration information for ncurses</para>
384 <indexterm zone="ch-system-ncurses ncursesw6-config">
385 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
390 <varlistentry id="reset">
391 <term><command>reset</command></term>
392 <listitem>
393 <para>Reinitializes a terminal to its default values</para>
394 <indexterm zone="ch-system-ncurses reset">
395 <primary sortas="b-reset">reset</primary>
396 </indexterm>
397 </listitem>
398 </varlistentry>
399
400 <varlistentry id="tabs">
401 <term><command>tabs</command></term>
402 <listitem>
403 <para>Clears and sets tab stops on a terminal</para>
404 <indexterm zone="ch-system-ncurses tabs">
405 <primary sortas="b-tabs">tabs</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry id="tic">
411 <term><command>tic</command></term>
412 <listitem>
413 <para>The terminfo entry-description compiler that translates a
414 terminfo file from source format into the binary format needed for the
415 ncurses library routines [A terminfo file contains information on the
416 capabilities of a certain terminal.]</para>
417 <indexterm zone="ch-system-ncurses tic">
418 <primary sortas="b-tic">tic</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="toe">
424 <term><command>toe</command></term>
425 <listitem>
426 <para>Lists all available terminal types, giving the primary name and
427 description for each</para>
428 <indexterm zone="ch-system-ncurses toe">
429 <primary sortas="b-toe">toe</primary>
430 </indexterm>
431 </listitem>
432 </varlistentry>
433
434 <varlistentry id="tput">
435 <term><command>tput</command></term>
436 <listitem>
437 <para>Makes the values of terminal-dependent capabilities available to
438 the shell; it can also be used to reset or initialize a terminal or
439 report its long name</para>
440 <indexterm zone="ch-system-ncurses tput">
441 <primary sortas="b-tput">tput</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 <varlistentry id="tset">
447 <term><command>tset</command></term>
448 <listitem>
449 <para>Can be used to initialize terminals</para>
450 <indexterm zone="ch-system-ncurses tset">
451 <primary sortas="b-tset">tset</primary>
452 </indexterm>
453 </listitem>
454 </varlistentry>
455
456 <varlistentry id="libcursesw">
457 <term><filename class="libraryfile">libcursesw</filename></term>
458 <listitem>
459 <para>A link to <filename>libncursesw</filename></para>
460 <indexterm zone="ch-system-ncurses libcursesw">
461 <primary sortas="c-libcursesw">libcursesw</primary>
462 </indexterm>
463 </listitem>
464 </varlistentry>
465
466 <varlistentry id="libncursesw">
467 <term><filename class="libraryfile">libncursesw</filename></term>
468 <listitem>
469 <para>Contains functions to display text in many complex ways on a
470 terminal screen; a good example of the use of these functions is the
471 menu displayed during the kernel's <command>make
472 menuconfig</command></para>
473 <indexterm zone="ch-system-ncurses libncursesw">
474 <primary sortas="c-libncursesw">libncursesw</primary>
475 </indexterm>
476 </listitem>
477 </varlistentry>
478
479 <varlistentry id="libformw">
480 <term><filename class="libraryfile">libformw</filename></term>
481 <listitem>
482 <para>Contains functions to implement forms</para>
483 <indexterm zone="ch-system-ncurses libformw">
484 <primary sortas="c-libformw">libformw</primary>
485 </indexterm>
486 </listitem>
487 </varlistentry>
488
489 <varlistentry id="libmenuw">
490 <term><filename class="libraryfile">libmenuw</filename></term>
491 <listitem>
492 <para>Contains functions to implement menus</para>
493 <indexterm zone="ch-system-ncurses libmenuw">
494 <primary sortas="c-libmenuw">libmenuw</primary>
495 </indexterm>
496 </listitem>
497 </varlistentry>
498
499 <varlistentry id="libpanelw">
500 <term><filename class="libraryfile">libpanelw</filename></term>
501 <listitem>
502 <para>Contains functions to implement panels</para>
503 <indexterm zone="ch-system-ncurses libpanelw">
504 <primary sortas="c-libpanelw">libpanelw</primary>
505 </indexterm>
506 </listitem>
507 </varlistentry>
508
509 </variablelist>
510
511 </sect2>
512
513</sect1>
Note: See TracBrowser for help on using the repository browser.