source: chapter08/ncurses.xml@ 91f9a17

12.0 12.0-rc1 12.1 12.1-rc1 multilib trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/update-glibc
Last change on this file since 91f9a17 was 91f9a17, checked in by Xi Ruoyao <xry111@…>, 10 months ago

ncurses: Simplify documentation install command

  • Property mode set to 100644
File size: 14.5 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 --with-cxx-shared \
52 --enable-pc-files \
53 --enable-widec \
54 --with-pkg-config-libdir=/usr/lib/pkgconfig</userinput></screen>
55
56 <variablelist>
57 <title>The meaning of the new configure options:</title>
58
59 <varlistentry>
60 <term><parameter>--with-shared</parameter></term>
61 <listitem>
62 <para>This makes Ncurses build and install shared C libraries.</para>
63 </listitem>
64 </varlistentry>
65
66 <varlistentry>
67 <term><parameter>--without-normal</parameter></term>
68 <listitem>
69 <para>This prevents Ncurses building and installing static C
70 libraries.</para>
71 </listitem>
72 </varlistentry>
73
74 <varlistentry>
75 <term><parameter>--without-debug</parameter></term>
76 <listitem>
77 <para>This prevents Ncurses building and installing debug
78 libraries.</para>
79 </listitem>
80 </varlistentry>
81
82 <varlistentry>
83 <term><parameter>--with-cxx-shared</parameter></term>
84 <listitem>
85 <para>This makes Ncurses build and install shared C++ bindings. It
86 also prevents it building and installing static C++ bindings.</para>
87 </listitem>
88 </varlistentry>
89
90 <varlistentry>
91 <term><parameter>--enable-pc-files</parameter></term>
92 <listitem>
93 <para>This switch generates and installs .pc files for pkg-config.
94 </para>
95 </listitem>
96 </varlistentry>
97
98 <varlistentry>
99 <term><parameter>--enable-widec</parameter></term>
100 <listitem>
101 <para>This switch causes wide-character libraries (e.g., <filename
102 class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
103 to be built instead of normal ones (e.g., <filename
104 class="libraryfile">libncurses.so.&ncurses-version;</filename>).
105 These wide-character libraries are usable in both multibyte and
106 traditional 8-bit locales, while normal libraries work properly
107 only in 8-bit locales. Wide-character and normal libraries are
108 source-compatible, but not binary-compatible.</para>
109 </listitem>
110 </varlistentry>
111
112 </variablelist>
113
114 <para>Compile the package:</para>
115
116<screen><userinput remap="make">make</userinput></screen>
117
118 <para>This package has a test suite, but it can only be run after the
119 package has been installed. The tests reside in the
120 <filename class="directory">test/</filename> directory. See the
121 <filename>README</filename> file in that directory for further details.
122 </para>
123
124 <!-- To editors: crash of shell process was very rare but really
125 observed. We can't simply remove /usr/lib/libncursesw.so.6.x like
126 how we handle libmozjs-xx.so in BLFS because bash needs it, and
127 make will spawn new shell processes during "make install". -->
128
129 <para>The installation of this package will overwrite
130 <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>
131 in-place. It may crash the shell process which is using code and data
132 from the library file. Install the package with
133 <literal>DESTDIR</literal>, and replace the library file correctly using
134 <command>install</command> command:</para>
135
136<screen><userinput remap="install">make DESTDIR=$PWD/dest install
137install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
138rm -v dest/usr/lib/libncursesw.so.&ncurses-version;
139cp -av dest/* /</userinput></screen>
140
141 <para>Many applications still expect the linker to be able to find
142 non-wide-character Ncurses libraries. Trick such applications into linking with
143 wide-character libraries by means of symlinks and linker scripts:</para>
144
145<screen><userinput remap="install">for lib in ncurses form panel menu ; do
146 rm -vf /usr/lib/lib${lib}.so
147 echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
148 ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
149done</userinput></screen>
150
151 <para>Finally, make sure that old applications that look for
152 <filename class="libraryfile">-lcurses</filename> at build time are still
153 buildable:</para>
154
155<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so
156echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
157ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
158
159 <para>If desired, install the Ncurses documentation:</para>
160
161<screen><userinput remap="install">cp -v -R doc -T /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
162
163 <note>
164
165 <para>The instructions above don't create non-wide-character Ncurses
166 libraries since no package installed by compiling from sources would link
167 against them at runtime. However, the only known binary-only
168 applications that link against non-wide-character Ncurses libraries
169 require version 5. If you must have such libraries because of some binary-only
170 application or to be compliant with LSB, build the package again with the
171 following commands:</para>
172
173<screen role="nodump"><userinput>make distclean
174./configure --prefix=/usr \
175 --with-shared \
176 --without-normal \
177 --without-debug \
178 --without-cxx-binding \
179 --with-abi-version=5
180make sources libs
181cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
182 </note>
183
184 </sect2>
185
186 <sect2 id="contents-ncurses" role="content">
187 <title>Contents of Ncurses</title>
188
189 <segmentedlist>
190 <segtitle>Installed programs</segtitle>
191 <segtitle>Installed libraries</segtitle>
192 <segtitle>Installed directories</segtitle>
193
194 <seglistitem>
195 <seg>
196 captoinfo (link to tic),
197 clear,
198 infocmp,
199 infotocap (link to tic),
200 ncursesw6-config,
201 reset (link to tset),
202 tabs,
203 tic,
204 toe,
205 tput, and
206 tset
207 </seg>
208 <seg>
209 libcursesw.so (symlink and linker script to libncursesw.so),
210 libformw.so,
211 libmenuw.so,
212 libncursesw.so,
213 libncurses++w.so,
214 libpanelw.so, and their non-wide-character counterparts without "w"
215 in the library names.</seg>
216 <seg>
217 /usr/share/tabset,
218 /usr/share/terminfo, and
219 /usr/share/doc/ncurses-&ncurses-version;
220 </seg>
221 </seglistitem>
222 </segmentedlist>
223
224 <variablelist>
225 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
226 <?dbfo list-presentation="list"?>
227 <?dbhtml list-presentation="table"?>
228
229 <varlistentry id="captoinfo">
230 <term><command>captoinfo</command></term>
231 <listitem>
232 <para>Converts a termcap description into a terminfo description</para>
233 <indexterm zone="ch-system-ncurses captoinfo">
234 <primary sortas="b-captoinfo">captoinfo</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="clear">
240 <term><command>clear</command></term>
241 <listitem>
242 <para>Clears the screen, if possible</para>
243 <indexterm zone="ch-system-ncurses clear">
244 <primary sortas="b-clear">clear</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="infocmp">
250 <term><command>infocmp</command></term>
251 <listitem>
252 <para>Compares or prints out terminfo descriptions</para>
253 <indexterm zone="ch-system-ncurses infocmp">
254 <primary sortas="b-infocmp">infocmp</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="infotocap">
260 <term><command>infotocap</command></term>
261 <listitem>
262 <para>Converts a terminfo description into a termcap description</para>
263 <indexterm zone="ch-system-ncurses infotocap">
264 <primary sortas="b-infotocap">infotocap</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="ncursesw6-config">
270 <term><command>ncursesw6-config</command></term>
271 <listitem>
272 <para>Provides configuration information for ncurses</para>
273 <indexterm zone="ch-system-ncurses ncursesw6-config">
274 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>
275 </indexterm>
276 </listitem>
277 </varlistentry>
278
279 <varlistentry id="reset">
280 <term><command>reset</command></term>
281 <listitem>
282 <para>Reinitializes a terminal to its default values</para>
283 <indexterm zone="ch-system-ncurses reset">
284 <primary sortas="b-reset">reset</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="tabs">
290 <term><command>tabs</command></term>
291 <listitem>
292 <para>Clears and sets tab stops on a terminal</para>
293 <indexterm zone="ch-system-ncurses tabs">
294 <primary sortas="b-tabs">tabs</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 <varlistentry id="tic">
300 <term><command>tic</command></term>
301 <listitem>
302 <para>The terminfo entry-description compiler that translates a
303 terminfo file from source format into the binary format needed for the
304 ncurses library routines [A terminfo file contains information on the
305 capabilities of a certain terminal.]</para>
306 <indexterm zone="ch-system-ncurses tic">
307 <primary sortas="b-tic">tic</primary>
308 </indexterm>
309 </listitem>
310 </varlistentry>
311
312 <varlistentry id="toe">
313 <term><command>toe</command></term>
314 <listitem>
315 <para>Lists all available terminal types, giving the primary name and
316 description for each</para>
317 <indexterm zone="ch-system-ncurses toe">
318 <primary sortas="b-toe">toe</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="tput">
324 <term><command>tput</command></term>
325 <listitem>
326 <para>Makes the values of terminal-dependent capabilities available to
327 the shell; it can also be used to reset or initialize a terminal or
328 report its long name</para>
329 <indexterm zone="ch-system-ncurses tput">
330 <primary sortas="b-tput">tput</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry id="tset">
336 <term><command>tset</command></term>
337 <listitem>
338 <para>Can be used to initialize terminals</para>
339 <indexterm zone="ch-system-ncurses tset">
340 <primary sortas="b-tset">tset</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry id="libcursesw">
346 <term><filename class="libraryfile">libcursesw</filename></term>
347 <listitem>
348 <para>A link to <filename>libncursesw</filename></para>
349 <indexterm zone="ch-system-ncurses libcursesw">
350 <primary sortas="c-libcursesw">libcursesw</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="libncursesw">
356 <term><filename class="libraryfile">libncursesw</filename></term>
357 <listitem>
358 <para>Contains functions to display text in many complex ways on a
359 terminal screen; a good example of the use of these functions is the
360 menu displayed during the kernel's <command>make
361 menuconfig</command></para>
362 <indexterm zone="ch-system-ncurses libncursesw">
363 <primary sortas="c-libncursesw">libncursesw</primary>
364 </indexterm>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry id="libncurses__w">
369 <term><filename class="libraryfile">libncurses++w</filename></term>
370 <listitem>
371 <para>Contains C++ binding for other libraries in this package</para>
372 <indexterm zone="ch-system-ncurses libncurses__w">
373 <primary sortas="c-libncurses++w">libncurses++w</primary>
374 </indexterm>
375 </listitem>
376 </varlistentry>
377
378 <varlistentry id="libformw">
379 <term><filename class="libraryfile">libformw</filename></term>
380 <listitem>
381 <para>Contains functions to implement forms</para>
382 <indexterm zone="ch-system-ncurses libformw">
383 <primary sortas="c-libformw">libformw</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
388 <varlistentry id="libmenuw">
389 <term><filename class="libraryfile">libmenuw</filename></term>
390 <listitem>
391 <para>Contains functions to implement menus</para>
392 <indexterm zone="ch-system-ncurses libmenuw">
393 <primary sortas="c-libmenuw">libmenuw</primary>
394 </indexterm>
395 </listitem>
396 </varlistentry>
397
398 <varlistentry id="libpanelw">
399 <term><filename class="libraryfile">libpanelw</filename></term>
400 <listitem>
401 <para>Contains functions to implement panels</para>
402 <indexterm zone="ch-system-ncurses libpanelw">
403 <primary sortas="c-libpanelw">libpanelw</primary>
404 </indexterm>
405 </listitem>
406 </varlistentry>
407
408 </variablelist>
409
410 </sect2>
411
412</sect1>
Note: See TracBrowser for help on using the repository browser.