Changeset fcc02767 for chapter06/ncurses.xml
- Timestamp:
- 06/07/2020 08:16:00 PM (4 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 595ff03
- Parents:
- d53fefa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/ncurses.xml
rd53fefa rfcc02767 6 6 ]> 7 7 8 <sect1 id="ch- system-ncurses" role="wrap">8 <sect1 id="ch-tools-ncurses" role="wrap"> 9 9 <?dbhtml filename="ncurses.html"?> 10 10 … … 17 17 <title>Ncurses-&ncurses-version;</title> 18 18 19 <indexterm zone="ch- system-ncurses">19 <indexterm zone="ch-tools-ncurses"> 20 20 <primary sortas="a-Ncurses">Ncurses</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Ncurses package contains libraries for terminal-independent 27 handling of character screens.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/ncurses.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&ncurses-ch 6-sbu;</seg>35 <seg>&ncurses-ch 6-du;</seg>36 <seg>&ncurses-ch5-sbu;</seg> 37 <seg>&ncurses-ch5-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 42 44 <title>Installation of Ncurses</title> 43 45 44 <para> Don't install a static library that is not handled by configure:</para>46 <para>First, ensure that <command>gawk</command> is found first during configuration:</para> 45 47 46 <screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen> 48 <screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen> 49 50 <para>Then, run the following commands to build the <quote>tic</quote> 51 program on the build host:</para> 52 53 <screen><userinput remap="pre">mkdir build 54 cd build 55 ../configure 56 make -C include 57 make -C progs tic 58 cd ..</userinput></screen> 47 59 48 60 <para>Prepare Ncurses for compilation:</para> 49 61 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> 62 <screen><userinput remap="configure">./configure --prefix=/usr \ 63 --host=$LFS_TGT \ 64 --build=$(./config.guess) \ 65 --mandir=/usr/share/man \ 66 --with-shared \ 67 --without-debug \ 68 --without-ada \ 69 --without-normal \ 70 --enable-widec \ 71 --enable-pc-files</userinput></screen> 57 72 58 73 <variablelist> 59 74 <title>The meaning of the new configure options:</title> 75 76 <varlistentry> 77 <term><parameter>--without-ada</parameter></term> 78 <listitem> 79 <para>This ensures that Ncurses does not build support for the Ada 80 compiler which may be present on the host but will not be available 81 once we enter the <command>chroot</command> environment.</para> 82 </listitem> 83 </varlistentry> 60 84 61 85 <varlistentry> … … 88 112 </listitem> 89 113 </varlistentry> 90 114 <!-- 115 <varlistentry> 116 <term><parameter>- -disable-db-install</parameter></term> 117 <listitem> 118 <para>This switch disables building the terminfo database: it is not 119 needed at this stage, and if <command>tic</command> is too old, 120 it cannot compile recent databases.</para> 121 </listitem> 122 </varlistentry> 123 --> 91 124 </variablelist> 92 125 … … 95 128 <screen><userinput remap="make">make</userinput></screen> 96 129 97 <para>This package has a test suite, but it can only be run after the98 package has been installed. The tests reside in the99 <filename class="directory">test/</filename> directory. See the100 <filename>README</filename> file in that directory for further details.101 </para>102 103 130 <para>Install the package:</para> 104 105 <screen><userinput remap="install">make install</userinput></screen> 131 <!-- TODO: check and document --> 132 <screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install 133 ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen> 106 134 107 135 <para>Move the shared libraries to the … … 109 137 expected to reside:</para> 110 138 111 <screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6*/lib</userinput></screen>139 <screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen> 112 140 113 141 <para>Because the libraries have been moved, one symlink points to 114 142 a non-existent file. Recreate it:</para> 115 143 116 <screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so)/usr/lib/libncursesw.so</userinput></screen>144 <screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen> 117 145 118 <para>Many applications still expect the linker to be able to find119 non-wide-character Ncurses libraries. Trick such applications into linking with120 wide-character libraries by means of symlinks and linker scripts:</para>121 122 <screen><userinput remap="install">for lib in ncurses form panel menu ; do123 rm -vf /usr/lib/lib${lib}.so124 echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so125 ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc126 done</userinput></screen>127 128 <para>Finally, make sure that old applications that look for129 <filename class="libraryfile">-lcurses</filename> at build time are still130 buildable:</para>131 132 <screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so133 echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so134 ln -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;139 cp -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 Ncurses144 libraries since no package installed by compiling from sources would link145 against them at runtime. However, the only known binary-only146 applications that link against non-wide-character Ncurses libraries147 require version 5. If you must have such libraries because of some binary-only148 application or to be compliant with LSB, build the package again with the149 following commands:</para>150 151 <screen role="nodump"><userinput>make distclean152 ./configure --prefix=/usr \153 --with-shared \154 --without-normal \155 --without-debug \156 --without-cxx-binding \157 --with-abi-version=5158 make sources libs159 cp -av lib/lib*.so.5* /usr/lib</userinput></screen>160 </note>161 146 162 147 </sect2> 163 148 164 <sect2 id="contents-ncurses"role="content">165 <title >Contents of Ncurses</title>149 <sect2 role="content"> 150 <title/> 166 151 167 <segmentedlist> 168 <segtitle>Installed programs</segtitle> 169 <segtitle>Installed libraries</segtitle> 170 <segtitle>Installed directories</segtitle> 171 172 <seglistitem> 173 <seg> 174 captoinfo (link to tic), 175 clear, 176 infocmp, 177 infotocap (link to tic), 178 ncursesw6-config, 179 reset (link to tset), 180 tabs, 181 tic, 182 toe, 183 tput, and 184 tset 185 </seg> 186 <seg> 187 libcursesw.so (symlink and linker script to libncursesw.so), 188 libformw.so, 189 libmenuw.so, 190 libncursesw.so, 191 libncurses++w.a, 192 libpanelw.so, and their non-wide-character counterparts without "w" 193 in the library names.</seg> 194 <seg> 195 /usr/share/tabset, 196 /usr/share/terminfo, and 197 /usr/share/doc/ncurses-&ncurses-version; 198 </seg> 199 </seglistitem> 200 </segmentedlist> 201 202 <variablelist> 203 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 204 <?dbfo list-presentation="list"?> 205 <?dbhtml list-presentation="table"?> 206 207 <varlistentry id="captoinfo"> 208 <term><command>captoinfo</command></term> 209 <listitem> 210 <para>Converts a termcap description into a terminfo description</para> 211 <indexterm zone="ch-system-ncurses captoinfo"> 212 <primary sortas="b-captoinfo">captoinfo</primary> 213 </indexterm> 214 </listitem> 215 </varlistentry> 216 217 <varlistentry id="clear"> 218 <term><command>clear</command></term> 219 <listitem> 220 <para>Clears the screen, if possible</para> 221 <indexterm zone="ch-system-ncurses clear"> 222 <primary sortas="b-clear">clear</primary> 223 </indexterm> 224 </listitem> 225 </varlistentry> 226 227 <varlistentry id="infocmp"> 228 <term><command>infocmp</command></term> 229 <listitem> 230 <para>Compares or prints out terminfo descriptions</para> 231 <indexterm zone="ch-system-ncurses infocmp"> 232 <primary sortas="b-infocmp">infocmp</primary> 233 </indexterm> 234 </listitem> 235 </varlistentry> 236 237 <varlistentry id="infotocap"> 238 <term><command>infotocap</command></term> 239 <listitem> 240 <para>Converts a terminfo description into a termcap description</para> 241 <indexterm zone="ch-system-ncurses infotocap"> 242 <primary sortas="b-infotocap">infotocap</primary> 243 </indexterm> 244 </listitem> 245 </varlistentry> 246 247 <varlistentry id="ncursesw6-config"> 248 <term><command>ncursesw6-config</command></term> 249 <listitem> 250 <para>Provides configuration information for ncurses</para> 251 <indexterm zone="ch-system-ncurses ncursesw6-config"> 252 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary> 253 </indexterm> 254 </listitem> 255 </varlistentry> 256 257 <varlistentry id="reset"> 258 <term><command>reset</command></term> 259 <listitem> 260 <para>Reinitializes a terminal to its default values</para> 261 <indexterm zone="ch-system-ncurses reset"> 262 <primary sortas="b-reset">reset</primary> 263 </indexterm> 264 </listitem> 265 </varlistentry> 266 267 <varlistentry id="tabs"> 268 <term><command>tabs</command></term> 269 <listitem> 270 <para>Clears and sets tab stops on a terminal</para> 271 <indexterm zone="ch-system-ncurses tabs"> 272 <primary sortas="b-tabs">tabs</primary> 273 </indexterm> 274 </listitem> 275 </varlistentry> 276 277 <varlistentry id="tic"> 278 <term><command>tic</command></term> 279 <listitem> 280 <para>The terminfo entry-description compiler that translates a 281 terminfo file from source format into the binary format needed for the 282 ncurses library routines [A terminfo file contains information on the 283 capabilities of a certain terminal.]</para> 284 <indexterm zone="ch-system-ncurses tic"> 285 <primary sortas="b-tic">tic</primary> 286 </indexterm> 287 </listitem> 288 </varlistentry> 289 290 <varlistentry id="toe"> 291 <term><command>toe</command></term> 292 <listitem> 293 <para>Lists all available terminal types, giving the primary name and 294 description for each</para> 295 <indexterm zone="ch-system-ncurses toe"> 296 <primary sortas="b-toe">toe</primary> 297 </indexterm> 298 </listitem> 299 </varlistentry> 300 301 <varlistentry id="tput"> 302 <term><command>tput</command></term> 303 <listitem> 304 <para>Makes the values of terminal-dependent capabilities available to 305 the shell; it can also be used to reset or initialize a terminal or 306 report its long name</para> 307 <indexterm zone="ch-system-ncurses tput"> 308 <primary sortas="b-tput">tput</primary> 309 </indexterm> 310 </listitem> 311 </varlistentry> 312 313 <varlistentry id="tset"> 314 <term><command>tset</command></term> 315 <listitem> 316 <para>Can be used to initialize terminals</para> 317 <indexterm zone="ch-system-ncurses tset"> 318 <primary sortas="b-tset">tset</primary> 319 </indexterm> 320 </listitem> 321 </varlistentry> 322 323 <varlistentry id="libcursesw"> 324 <term><filename class="libraryfile">libcursesw</filename></term> 325 <listitem> 326 <para>A link to <filename>libncursesw</filename></para> 327 <indexterm zone="ch-system-ncurses libcursesw"> 328 <primary sortas="c-libcursesw">libcursesw</primary> 329 </indexterm> 330 </listitem> 331 </varlistentry> 332 333 <varlistentry id="libncursesw"> 334 <term><filename class="libraryfile">libncursesw</filename></term> 335 <listitem> 336 <para>Contains functions to display text in many complex ways on a 337 terminal screen; a good example of the use of these functions is the 338 menu displayed during the kernel's <command>make 339 menuconfig</command></para> 340 <indexterm zone="ch-system-ncurses libncursesw"> 341 <primary sortas="c-libncursesw">libncursesw</primary> 342 </indexterm> 343 </listitem> 344 </varlistentry> 345 346 <varlistentry id="libformw"> 347 <term><filename class="libraryfile">libformw</filename></term> 348 <listitem> 349 <para>Contains functions to implement forms</para> 350 <indexterm zone="ch-system-ncurses libformw"> 351 <primary sortas="c-libformw">libformw</primary> 352 </indexterm> 353 </listitem> 354 </varlistentry> 355 356 <varlistentry id="libmenuw"> 357 <term><filename class="libraryfile">libmenuw</filename></term> 358 <listitem> 359 <para>Contains functions to implement menus</para> 360 <indexterm zone="ch-system-ncurses libmenuw"> 361 <primary sortas="c-libmenuw">libmenuw</primary> 362 </indexterm> 363 </listitem> 364 </varlistentry> 365 366 <varlistentry id="libpanelw"> 367 <term><filename class="libraryfile">libpanelw</filename></term> 368 <listitem> 369 <para>Contains functions to implement panels</para> 370 <indexterm zone="ch-system-ncurses libpanelw"> 371 <primary sortas="c-libpanelw">libpanelw</primary> 372 </indexterm> 373 </listitem> 374 </varlistentry> 375 376 </variablelist> 152 <para>Details on this package are located in 153 <xref linkend="contents-ncurses" role="."/></para> 377 154 378 155 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.