ncurses.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. <sect1 id="ch-tools-ncurses" role="wrap">
  8. <?dbhtml filename="ncurses.html"?>
  9. <sect1info condition="script">
  10. <productname>ncurses</productname>
  11. <productnumber>&ncurses-version;</productnumber>
  12. <address>&ncurses-url;</address>
  13. </sect1info>
  14. <title>Ncurses-&ncurses-version;</title>
  15. <indexterm zone="ch-tools-ncurses">
  16. <primary sortas="a-Ncurses">Ncurses</primary>
  17. <secondary>tools</secondary>
  18. </indexterm>
  19. <sect2 role="package">
  20. <title/>
  21. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  22. href="../chapter08/ncurses.xml"
  23. xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
  24. <segmentedlist>
  25. <segtitle>&buildtime;</segtitle>
  26. <segtitle>&diskspace;</segtitle>
  27. <seglistitem>
  28. <seg>&ncurses-tmp-sbu;</seg>
  29. <seg>&ncurses-tmp-du;</seg>
  30. </seglistitem>
  31. </segmentedlist>
  32. </sect2>
  33. <sect2 role="installation">
  34. <title>Installation of Ncurses</title>
  35. <para>First, ensure that <command>gawk</command> is found first during configuration:</para>
  36. <screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen>
  37. <para>Then, run the following commands to build the <quote>tic</quote>
  38. program on the build host:</para>
  39. <screen><userinput remap="pre">mkdir build
  40. pushd build
  41. ../configure
  42. make -C include
  43. make -C progs tic
  44. popd</userinput></screen>
  45. <para>Prepare Ncurses for compilation:</para>
  46. <screen><userinput remap="configure">./configure --prefix=/usr \
  47. --host=$LFS_TGT \
  48. --build=$(./config.guess) \
  49. --mandir=/usr/share/man \
  50. --with-manpage-format=normal \
  51. --with-shared \
  52. --without-debug \
  53. --without-ada \
  54. --without-normal \
  55. --enable-widec \
  56. --enable-pc-files</userinput></screen>
  57. <variablelist>
  58. <title>The meaning of the new configure options:</title>
  59. <varlistentry>
  60. <term><parameter>--with-manpage-format=normal</parameter></term>
  61. <listitem>
  62. <para>This prevents Ncurses installing compressed manual
  63. pages, which may happen if the host distribution itself
  64. has compressed manual pages.</para>
  65. </listitem>
  66. </varlistentry>
  67. <varlistentry>
  68. <term><parameter>--without-ada</parameter></term>
  69. <listitem>
  70. <para>This ensures that Ncurses does not build support for the Ada
  71. compiler which may be present on the host but will not be available
  72. once we enter the <command>chroot</command> environment.</para>
  73. </listitem>
  74. </varlistentry>
  75. <varlistentry>
  76. <term><parameter>--enable-widec</parameter></term>
  77. <listitem>
  78. <para>This switch causes wide-character libraries (e.g., <filename
  79. class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
  80. to be built instead of normal ones (e.g., <filename
  81. class="libraryfile">libncurses.so.&ncurses-version;</filename>).
  82. These wide-character libraries are usable in both multibyte and
  83. traditional 8-bit locales, while normal libraries work properly
  84. only in 8-bit locales. Wide-character and normal libraries are
  85. source-compatible, but not binary-compatible.</para>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry>
  89. <term><parameter>--enable-pc-files</parameter></term>
  90. <listitem>
  91. <para>This switch generates and installs .pc files for pkg-config.
  92. </para>
  93. </listitem>
  94. </varlistentry>
  95. <varlistentry>
  96. <term><parameter>--without-normal</parameter></term>
  97. <listitem>
  98. <para>This switch disables building and installing most static libraries.
  99. </para>
  100. </listitem>
  101. </varlistentry>
  102. <!--
  103. <varlistentry>
  104. <term><parameter>- -disable-db-install</parameter></term>
  105. <listitem>
  106. <para>This switch disables building the terminfo database: it is not
  107. needed at this stage, and if <command>tic</command> is too old,
  108. it cannot compile recent databases.</para>
  109. </listitem>
  110. </varlistentry>
  111. -->
  112. </variablelist>
  113. <para>Compile the package:</para>
  114. <screen><userinput remap="make">make</userinput></screen>
  115. <para>Install the package:</para>
  116. <!-- TODO: check and document -->
  117. <screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
  118. ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen>
  119. <para>Move the shared libraries to the
  120. <filename class="directory">/lib</filename> directory, where they are
  121. expected to reside:</para>
  122. <screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen>
  123. <para>Because the libraries have been moved, one symlink points to
  124. a non-existent file. Recreate it:</para>
  125. <screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen>
  126. </sect2>
  127. <sect2 role="content">
  128. <title/>
  129. <para>Details on this package are located in
  130. <xref linkend="contents-ncurses" role="."/></para>
  131. </sect2>
  132. </sect1>