ncurses.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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</userinput></screen>
  56. <variablelist>
  57. <title>The meaning of the new configure options:</title>
  58. <varlistentry>
  59. <term><parameter>--with-manpage-format=normal</parameter></term>
  60. <listitem>
  61. <para>This prevents Ncurses installing compressed manual
  62. pages, which may happen if the host distribution itself
  63. has compressed manual pages.</para>
  64. </listitem>
  65. </varlistentry>
  66. <varlistentry>
  67. <term><parameter>--without-ada</parameter></term>
  68. <listitem>
  69. <para>This ensures that Ncurses does not build support for the Ada
  70. compiler which may be present on the host but will not be available
  71. once we enter the <command>chroot</command> environment.</para>
  72. </listitem>
  73. </varlistentry>
  74. <varlistentry>
  75. <term><parameter>--enable-widec</parameter></term>
  76. <listitem>
  77. <para>This switch causes wide-character libraries (e.g., <filename
  78. class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
  79. to be built instead of normal ones (e.g., <filename
  80. class="libraryfile">libncurses.so.&ncurses-version;</filename>).
  81. These wide-character libraries are usable in both multibyte and
  82. traditional 8-bit locales, while normal libraries work properly
  83. only in 8-bit locales. Wide-character and normal libraries are
  84. source-compatible, but not binary-compatible.</para>
  85. </listitem>
  86. </varlistentry>
  87. <varlistentry>
  88. <term><parameter>--without-normal</parameter></term>
  89. <listitem>
  90. <para>This switch disables building and installing most static libraries.
  91. </para>
  92. </listitem>
  93. </varlistentry>
  94. </variablelist>
  95. <para>Compile the package:</para>
  96. <screen><userinput remap="make">make</userinput></screen>
  97. <para>Install the package:</para>
  98. <!-- TODO: check and document -->
  99. <screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
  100. ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen>
  101. <para>Move the shared libraries to the
  102. <filename class="directory">/lib</filename> directory, where they are
  103. expected to reside:</para>
  104. <screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen>
  105. <para>Because the libraries have been moved, one symlink points to
  106. a non-existent file. Recreate it:</para>
  107. <screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen>
  108. </sect2>
  109. <sect2 role="content">
  110. <title/>
  111. <para>Details on this package are located in
  112. <xref linkend="contents-ncurses" role="."/></para>
  113. </sect2>
  114. </sect1>