readline.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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-system-readline" role="wrap">
  8. <?dbhtml filename="readline.html"?>
  9. <sect1info condition="script">
  10. <productname>readline</productname>
  11. <productnumber>&readline-version;</productnumber>
  12. <address>&readline-url;</address>
  13. </sect1info>
  14. <title>Readline-&readline-version;</title>
  15. <indexterm zone="ch-system-readline">
  16. <primary sortas="a-Readline">Readline</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Readline package is a set of libraries that offers command-line
  21. editing and history capabilities.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&readline-ch6-sbu;</seg>
  27. <seg>&readline-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Readline</title>
  33. <para>Reinstalling Readline will cause the old libraries to be moved to
  34. &lt;libraryname&gt;.old. While this is normally not a problem, in some cases
  35. it can trigger a linking bug in <command>ldconfig</command>. This can be
  36. avoided by issuing the following two seds:</para>
  37. <screen><userinput remap="pre">sed -i '/MV.*old/d' Makefile.in
  38. sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
  39. <para>Readline contains a bug in its handling of non-multibyte characters,
  40. which can lead to incorrect display calculations and incorrect redisplay.
  41. Fix this issue by applying the following patch from the upstream maintainer:
  42. </para>
  43. <screen><userinput remap="pre">patch -Np1 -i ../&readline-fixes-patch;</userinput></screen>
  44. <para>Prepare Readline for compilation:</para>
  45. <screen><userinput remap="configure">./configure --prefix=/usr --libdir=/lib</userinput></screen>
  46. <para>Compile the package:</para>
  47. <screen><userinput remap="make">make SHLIB_LIBS=-lncurses</userinput></screen>
  48. <variablelist>
  49. <title>The meaning of the make option:</title>
  50. <varlistentry>
  51. <term><parameter>SHLIB_LIBS=-lncurses</parameter></term>
  52. <listitem>
  53. <para>This option forces Readline to link against the
  54. <filename class="libraryfile">libncurses</filename> (really,
  55. <filename class="libraryfile">libncursesw</filename>) library.</para>
  56. </listitem>
  57. </varlistentry>
  58. </variablelist>
  59. <para>This package does not come with a test suite.</para>
  60. <para>Install the package:</para>
  61. <screen><userinput remap="install">make install</userinput></screen>
  62. <para>Now move the static libraries to a more appropriate location:</para>
  63. <screen><userinput remap="install">mv -v /lib/lib{readline,history}.a /usr/lib</userinput></screen>
  64. <para>Next, remove the <filename class="extension">.so</filename> files in
  65. <filename class="directory">/lib</filename> and relink them into <filename
  66. class="directory">/usr/lib</filename>:</para>
  67. <screen><userinput remap="install">rm -v /lib/lib{readline,history}.so
  68. ln -sfv ../../lib/libreadline.so.5 /usr/lib/libreadline.so
  69. ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so</userinput></screen>
  70. </sect2>
  71. <sect2 id="contents-readline" role="content">
  72. <title>Contents of Readline</title>
  73. <segmentedlist>
  74. <segtitle>Installed libraries</segtitle>
  75. <seglistitem>
  76. <seg>libhistory.{a,so}, and libreadline.{a,so}</seg>
  77. </seglistitem>
  78. </segmentedlist>
  79. <variablelist>
  80. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  81. <?dbfo list-presentation="list"?>
  82. <?dbhtml list-presentation="table"?>
  83. <varlistentry id="libhistory">
  84. <term><filename class="libraryfile">libhistory</filename></term>
  85. <listitem>
  86. <para>Provides a consistent user interface for recalling lines
  87. of history</para>
  88. <indexterm zone="ch-system-readline libhistory">
  89. <primary sortas="c-libhistory">libhistory</primary>
  90. </indexterm>
  91. </listitem>
  92. </varlistentry>
  93. <varlistentry id="libreadline">
  94. <term><filename class="libraryfile">libreadline</filename></term>
  95. <listitem>
  96. <para>Aids in the consistency of user interface across discrete
  97. programs that need to provide a command line interface</para>
  98. <indexterm zone="ch-system-readline libreadline">
  99. <primary sortas="c-libreadline">libreadline</primary>
  100. </indexterm>
  101. </listitem>
  102. </varlistentry>
  103. </variablelist>
  104. </sect2>
  105. </sect1>