pcre.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?xml version="1.0" encoding="UTF-8"?>
  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-pcre" role="wrap">
  8. <?dbhtml filename="pcre.html"?>
  9. <sect1info condition="script">
  10. <productname>pcre</productname>
  11. <productnumber>&pcre-version;</productnumber>
  12. <address>&pcre-url;</address>
  13. </sect1info>
  14. <title>PCRE-&pcre-version;</title>
  15. <indexterm zone="ch-system-pcre">
  16. <primary sortas="a-PCRE">PCRE</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The PCRE package contains Perl Compatible Regular Expression
  21. libraries. These are useful for implementing regular expression pattern
  22. matching using the same syntax and semantics as Perl 5.</para>
  23. <segmentedlist>
  24. <segtitle>&buildtime;</segtitle>
  25. <segtitle>&diskspace;</segtitle>
  26. <seglistitem>
  27. <seg>&pcre-ch6-sbu;</seg>
  28. <seg>&pcre-ch6-du;</seg>
  29. </seglistitem>
  30. </segmentedlist>
  31. </sect2>
  32. <sect2 role="installation">
  33. <title>安装 PCRE</title>
  34. <para>准备安装 PCRE:</para>
  35. <screen><userinput remap="configure">./configure --prefix=/usr \
  36. --docdir=/usr/share/doc/pcre-&pcre-version; \
  37. --enable-utf8 \
  38. --enable-unicode-properties \
  39. --enable-pcregrep-libz \
  40. --enable-pcregrep-libbz2</userinput></screen>
  41. <variablelist>
  42. <title>The meaning of the configure options:</title>
  43. <varlistentry>
  44. <term><parameter>--enable-utf8</parameter></term>
  45. <listitem>
  46. <para>This switch includes the code for handling UTF-8 character
  47. strings in the library.</para>
  48. </listitem>
  49. </varlistentry>
  50. <varlistentry>
  51. <term><parameter>--enable-unicode-properties</parameter></term>
  52. <listitem>
  53. <para>This switch enables Unicode properties support.</para>
  54. </listitem>
  55. </varlistentry>
  56. <varlistentry>
  57. <term><parameter>--enable-pcregrep-lib*</parameter></term>
  58. <listitem>
  59. <para>These switches enable the PCRE library to read files compressed
  60. with <command>gzip</command> and <command>bzip2</command>.</para>
  61. </listitem>
  62. </varlistentry>
  63. </variablelist>
  64. <para>编译该软件包:</para>
  65. <screen><userinput remap="make">make</userinput></screen>
  66. <para>运行以下命令以测试编译结果:</para>
  67. <screen><userinput remap="test">make check</userinput></screen>
  68. <para>安装该软件包:</para>
  69. <screen><userinput remap="install">make install</userinput></screen>
  70. <para>The <command>grep</command> binary will be installed in <filename class="directory">/bin</filename> and will link against the PCRE library; as such,
  71. move the library to <filename class="directory">/lib</filename>:</para>
  72. <screen><userinput remap="install">mv -v /usr/lib/libpcre.so.* /lib/
  73. ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so</userinput></screen>
  74. </sect2>
  75. <sect2 id="contents-pcre" role="content">
  76. <title>PCRE 的内容</title>
  77. <segmentedlist>
  78. <segtitle>安装的程序</segtitle>
  79. <segtitle>安装的库</segtitle>
  80. <segtitle>安装的目录</segtitle>
  81. <seglistitem>
  82. <seg>pcregrep, pcretest, and pcre-config</seg>
  83. <seg>libpcre.{a,so}, libpcrecpp.{a,so} and libpcreposix.{a,so}</seg>
  84. <seg>/usr/share/doc/pcre-&pcre-version;</seg>
  85. </seglistitem>
  86. </segmentedlist>
  87. <variablelist>
  88. <bridgehead renderas="sect3">简要描述</bridgehead>
  89. <?dbfo list-presentation="list"?>
  90. <?dbhtml list-presentation="table"?>
  91. <varlistentry id="pcregrep">
  92. <term><command>pcregrep</command></term>
  93. <listitem>
  94. <para>A grep that understands Perl compatible regular
  95. expressions.</para>
  96. <indexterm zone="ch-system-pcre pcregrep">
  97. <primary sortas="b-pcre">pcregrep</primary>
  98. </indexterm>
  99. </listitem>
  100. </varlistentry>
  101. <varlistentry id="pcretest">
  102. <term><command>pcretest</command></term>
  103. <listitem>
  104. <para>Tests a Perl compatible regular expression</para>
  105. <indexterm zone="ch-system-pcre pcretest">
  106. <primary sortas="b-pcretest">pcretest</primary>
  107. </indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="pcre-config">
  111. <term><command>pcre-config</command></term>
  112. <listitem>
  113. <para>Used during the compilation process of programs linking to the
  114. PCRE libraries</para>
  115. <indexterm zone="ch-system-pcre pcre-config">
  116. <primary sortas="b-pcre-config">pcre-config</primary>
  117. </indexterm>
  118. </listitem>
  119. </varlistentry>
  120. <varlistentry id="libpcre">
  121. <term><filename class="libraryfile">libpcre</filename></term>
  122. <listitem>
  123. <para>Provides functions useful for working with regular
  124. expressions</para>
  125. <indexterm zone="ch-system-pcre libpcre">
  126. <primary sortas="c-libpcre">libpcre</primary>
  127. </indexterm>
  128. </listitem>
  129. </varlistentry>
  130. <varlistentry id="libpcrecpp">
  131. <term><filename class="libraryfile">libpcrecpp</filename></term>
  132. <listitem>
  133. <para>Provides C++ wrapper functions for the libpcre library</para>
  134. <indexterm zone="ch-system-pcre libpcrecpp">
  135. <primary sortas="c-libpcrecpp">libpcrecpp</primary>
  136. </indexterm>
  137. </listitem>
  138. </varlistentry>
  139. <varlistentry id="libpcreposix">
  140. <term><filename class="libraryfile">libpcreposix</filename></term>
  141. <listitem>
  142. <para>Provides wrapper functions based on the POSIX regular expression
  143. API</para>
  144. <indexterm zone="ch-system-pcre libpcreposix">
  145. <primary sortas="c-libpcreposix">libpcreposix</primary>
  146. </indexterm>
  147. </listitem>
  148. </varlistentry>
  149. </variablelist>
  150. </sect2>
  151. </sect1>