Ignore:
Timestamp:
06/07/2020 08:16:00 PM (4 years ago)
Author:
Bruce Dubbs <bdubbs@…>
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
Message:

Initial commit of alternative cross LFS

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter06/gettext.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-gettext" role="wrap">
     8<sect1 id="ch-tools-gettext" role="wrap">
    99  <?dbhtml filename="gettext.html"?>
    1010
     
    1717  <title>Gettext-&gettext-version;</title>
    1818
    19   <indexterm zone="ch-system-gettext">
     19  <indexterm zone="ch-tools-gettext">
    2020    <primary sortas="a-Gettext">Gettext</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Gettext package contains utilities for internationalization and
    27     localization. These allow programs to be compiled with NLS (Native Language
    28     Support), enabling them to output messages in the user's native
    29     language.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/gettext.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
    3131    <segmentedlist>
     
    3434
    3535      <seglistitem>
    36         <seg>&gettext-ch6-sbu;</seg>
    37         <seg>&gettext-ch6-du;</seg>
     36        <seg>&gettext-ch5-sbu;</seg>
     37        <seg>&gettext-ch5-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    4444    <title>Installation of Gettext</title>
    4545
    46    <!-- This has been fixed in upstream gnulib, when a new version of
    47    gettext is released, please check #4055 to see if the change has been
    48    picked up in this package
    49    
    50    As of April 11, 2018, 'TESTS = test-lock' is in gettext-runtime/tests/Makefile.am
    51    Perhaps the test is fixed.
     46    <para>For our temporary set of tools, we only need to install
     47    three programs from Gettext.</para>
    5248
    53    There is no reference to 'test' or TEST in  gettext-tools/gnulib-tests/Makefile.am
    54    -->
    55    <!--
    56    <para>First, suppress two invocations of test-lock which on some machines
    57    can loop forever:</para>
    58 
    59 <screen><userinput remap="pre">sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in &amp;&amp;
    60 sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinput></screen>-->
    61 
    62    <!-- As of April 11, 2018 appdata.* is NOT in git master, but appears
    63    to be in metainfo.{its,loc},  When updating, check BLFS gnome-screenshot. -->
    64 
    65 <!--
    66    <para>Now fix a configuration file:</para>
    67 
    68 <screen><userinput remap="pre">sed -e '/AppData/{N;N;p;s/\.appdata\./.metainfo./}' \
    69     -i gettext-tools/its/appdata.loc</userinput></screen>
    70 -->
    7149    <para>Prepare Gettext for compilation:</para>
    7250
    73 <screen><userinput remap="configure">./configure --prefix=/usr    \
    74             --disable-static \
    75             --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
     51<screen><userinput remap="configure">./configure --disable-shared</userinput></screen>
    7652
    77     <para>Compile the package:</para>
    78 
    79 <screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen>
    80 
    81    <variablelist>
    82       <title>The meaning of the make parameter:</title>
     53    <variablelist>
     54      <title>The meaning of the configure option:</title>
    8355
    8456      <varlistentry>
    85         <term><parameter>BISON_LOCALEDIR=/usr/share/locale</parameter></term>
     57        <term><parameter>--disable-shared</parameter></term>
    8658        <listitem>
    87           <para>Since bison is not yet installed in /usr, configure hardcodes
    88           the directory containing translations for the bison program (the
    89           "locale" directory) as /tools/share/locale. Passing this variable
    90            to make allows overriding the choice made by configure.</para>
     59          <para>We do not need to install any of the shared Gettext libraries at
     60          this time, therefore there is no need to build them.</para>
    9161        </listitem>
    9262      </varlistentry>
     
    9464    </variablelist>
    9565
    96     <para>To test the results (this takes a long time, around 3 SBUs),
    97     issue:</para>
     66    <para>Compile the package:</para>
    9867
    99 <screen><userinput remap="test">make check</userinput></screen>
     68<screen><userinput remap="make">make</userinput></screen>
    10069
    101     <para>Install the package:</para>
     70    <para>Install the <command>msgfmt</command>, <command>msgmerge</command> and
     71    <command>xgettext</command> programs:</para>
    10272
    103 <screen><userinput remap="install">make install
    104 chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
     73<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen>
    10574
    10675  </sect2>
    10776
    108   <sect2 id="contents-gettext" role="content">
    109     <title>Contents of Gettext</title>
     77  <sect2 role="content">
     78    <title/>
    11079
    111     <segmentedlist>
    112       <segtitle>Installed programs</segtitle>
    113       <segtitle>Installed libraries</segtitle>
    114       <segtitle>Installed directories</segtitle>
    115 
    116       <seglistitem>
    117         <seg>autopoint, envsubst, gettext, gettext.sh,
    118         gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
    119         msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
    120         ngettext, recode-sr-latin, and xgettext</seg>
    121         <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
    122         libgettextsrc.so, libtextstyle.so, and preloadable_libintl.so</seg>
    123         <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;,
    124         /usr/share/gettext, and /usr/share/gettext-0.19.8</seg>
    125       </seglistitem>
    126     </segmentedlist>
    127 
    128     <variablelist>
    129       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    130       <?dbfo list-presentation="list"?>
    131       <?dbhtml list-presentation="table"?>
    132 
    133       <varlistentry id="autopoint">
    134         <term><command>autopoint</command></term>
    135         <listitem>
    136           <para>Copies standard Gettext infrastructure files into a source
    137           package</para>
    138           <indexterm zone="ch-system-gettext autopoint">
    139             <primary sortas="b-autopoint">autopoint</primary>
    140           </indexterm>
    141         </listitem>
    142       </varlistentry>
    143 
    144       <varlistentry id="envsubst">
    145         <term><command>envsubst</command></term>
    146         <listitem>
    147           <para>Substitutes environment variables in shell format strings</para>
    148           <indexterm zone="ch-system-gettext envsubst">
    149             <primary sortas="b-envsubst">envsubst</primary>
    150           </indexterm>
    151         </listitem>
    152       </varlistentry>
    153 
    154       <varlistentry id="gettext">
    155         <term><command>gettext</command></term>
    156         <listitem>
    157           <para>Translates a natural language message into the user's language
    158           by looking up the translation in a message catalog</para>
    159           <indexterm zone="ch-system-gettext gettext">
    160             <primary sortas="b-gettext">gettext</primary>
    161           </indexterm>
    162         </listitem>
    163       </varlistentry>
    164 
    165       <varlistentry id="gettext.sh">
    166         <term><command>gettext.sh</command></term>
    167         <listitem>
    168           <para>Primarily serves as a shell function library for gettext</para>
    169           <indexterm zone="ch-system-gettext gettext.sh">
    170             <primary sortas="b-gettext.sh">gettext.sh</primary>
    171           </indexterm>
    172         </listitem>
    173       </varlistentry>
    174 
    175       <varlistentry id="gettextize">
    176         <term><command>gettextize</command></term>
    177         <listitem>
    178           <para>Copies all standard Gettext files into the given top-level
    179           directory of a package to begin internationalizing it</para>
    180           <indexterm zone="ch-system-gettext gettextize">
    181             <primary sortas="b-gettextize">gettextize</primary>
    182           </indexterm>
    183         </listitem>
    184       </varlistentry>
    185 
    186       <varlistentry id="msgattrib">
    187         <term><command>msgattrib</command></term>
    188         <listitem>
    189           <para>Filters the messages of a translation catalog according to their
    190           attributes and manipulates the attributes</para>
    191           <indexterm zone="ch-system-gettext msgattrib">
    192             <primary sortas="b-msgattrib">msgattrib</primary>
    193           </indexterm>
    194         </listitem>
    195       </varlistentry>
    196 
    197       <varlistentry id="msgcat">
    198         <term><command>msgcat</command></term>
    199         <listitem>
    200           <para>Concatenates and merges the given
    201           <filename class="extension">.po</filename> files</para>
    202           <indexterm zone="ch-system-gettext msgcat">
    203             <primary sortas="b-msgcat">msgcat</primary>
    204           </indexterm>
    205         </listitem>
    206       </varlistentry>
    207 
    208       <varlistentry id="msgcmp">
    209         <term><command>msgcmp</command></term>
    210         <listitem>
    211           <para>Compares two <filename class="extension">.po</filename>
    212           files to check that both contain the same set of msgid strings</para>
    213           <indexterm zone="ch-system-gettext msgcmp">
    214             <primary sortas="b-msgcmp">msgcmp</primary>
    215           </indexterm>
    216         </listitem>
    217       </varlistentry>
    218 
    219       <varlistentry id="msgcomm">
    220         <term><command>msgcomm</command></term>
    221         <listitem>
    222           <para>Finds the messages that are common to the given
    223           <filename class="extension">.po</filename> files</para>
    224           <indexterm zone="ch-system-gettext msgcomm">
    225             <primary sortas="b-msgcomm">msgcomm</primary>
    226           </indexterm>
    227         </listitem>
    228       </varlistentry>
    229 
    230       <varlistentry id="msgconv">
    231         <term><command>msgconv</command></term>
    232         <listitem>
    233           <para>Converts a translation catalog to a different character
    234           encoding</para>
    235           <indexterm zone="ch-system-gettext msgconv">
    236             <primary sortas="b-msgconv">msgconv</primary>
    237           </indexterm>
    238         </listitem>
    239       </varlistentry>
    240 
    241       <varlistentry id="msgen">
    242         <term><command>msgen</command></term>
    243         <listitem>
    244           <para>Creates an English translation catalog</para>
    245           <indexterm zone="ch-system-gettext msgen">
    246             <primary sortas="b-msgen">msgen</primary>
    247           </indexterm>
    248         </listitem>
    249       </varlistentry>
    250 
    251       <varlistentry id="msgexec">
    252         <term><command>msgexec</command></term>
    253         <listitem>
    254           <para>Applies a command to all translations of a translation
    255           catalog</para>
    256           <indexterm zone="ch-system-gettext msgexec">
    257             <primary sortas="b-msgexec">msgexec</primary>
    258           </indexterm>
    259         </listitem>
    260       </varlistentry>
    261 
    262       <varlistentry id="msgfilter">
    263         <term><command>msgfilter</command></term>
    264         <listitem>
    265           <para>Applies a filter to all translations of a translation
    266           catalog</para>
    267           <indexterm zone="ch-system-gettext msgfilter">
    268             <primary sortas="b-msgfilter">msgfilter</primary>
    269           </indexterm>
    270         </listitem>
    271       </varlistentry>
    272 
    273       <varlistentry id="msgfmt">
    274         <term><command>msgfmt</command></term>
    275         <listitem>
    276           <para>Generates a binary message catalog from a translation
    277           catalog</para>
    278           <indexterm zone="ch-system-gettext msgfmt">
    279             <primary sortas="b-msgfmt">msgfmt</primary>
    280           </indexterm>
    281         </listitem>
    282       </varlistentry>
    283 
    284       <varlistentry id="msggrep">
    285         <term><command>msggrep</command></term>
    286         <listitem>
    287           <para>Extracts all messages of a translation catalog that match a
    288           given pattern or belong to some given source files</para>
    289           <indexterm zone="ch-system-gettext msggrep">
    290             <primary sortas="b-msggrep">msggrep</primary>
    291           </indexterm>
    292         </listitem>
    293       </varlistentry>
    294 
    295       <varlistentry id="msginit">
    296         <term><command>msginit</command></term>
    297         <listitem>
    298           <para>Creates a new <filename class="extension">.po</filename> file,
    299           initializing the meta information with values from the user's
    300           environment</para>
    301           <indexterm zone="ch-system-gettext msginit">
    302             <primary sortas="b-msginit">msginit</primary>
    303           </indexterm>
    304         </listitem>
    305       </varlistentry>
    306 
    307       <varlistentry id="msgmerge">
    308         <term><command>msgmerge</command></term>
    309         <listitem>
    310           <para>Combines two raw translations into a single file</para>
    311           <indexterm zone="ch-system-gettext msgmerge">
    312             <primary sortas="b-msgmerge">msgmerge</primary>
    313           </indexterm>
    314         </listitem>
    315       </varlistentry>
    316 
    317       <varlistentry id="msgunfmt">
    318         <term><command>msgunfmt</command></term>
    319         <listitem>
    320           <para>Decompiles a binary message catalog into raw translation
    321           text</para>
    322           <indexterm zone="ch-system-gettext msgunfmt">
    323             <primary sortas="b-msgunfmt">msgunfmt</primary>
    324           </indexterm>
    325         </listitem>
    326       </varlistentry>
    327 
    328       <varlistentry id="msguniq">
    329         <term><command>msguniq</command></term>
    330         <listitem>
    331           <para>Unifies duplicate translations in a translation catalog</para>
    332           <indexterm zone="ch-system-gettext msguniq">
    333             <primary sortas="b-msguniq">msguniq</primary>
    334           </indexterm>
    335         </listitem>
    336       </varlistentry>
    337 
    338       <varlistentry id="ngettext">
    339         <term><command>ngettext</command></term>
    340         <listitem>
    341           <para>Displays native language translations of a textual message whose
    342           grammatical form depends on a number</para>
    343           <indexterm zone="ch-system-gettext ngettext">
    344             <primary sortas="b-ngettext">ngettext</primary>
    345           </indexterm>
    346         </listitem>
    347       </varlistentry>
    348 
    349       <varlistentry id="recode-sr-latin">
    350         <term><command>recode-sr-latin</command></term>
    351         <listitem>
    352           <para>Recodes Serbian text from Cyrillic to Latin script</para>
    353           <indexterm zone="ch-system-gettext recode-sr-latin">
    354             <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
    355           </indexterm>
    356         </listitem>
    357       </varlistentry>
    358 
    359       <varlistentry id="xgettext">
    360         <term><command>xgettext</command></term>
    361         <listitem>
    362           <para>Extracts the translatable message lines from the given source
    363           files to make the first translation template</para>
    364           <indexterm zone="ch-system-gettext xgettext">
    365             <primary sortas="b-xgettext">xgettext</primary>
    366           </indexterm>
    367         </listitem>
    368       </varlistentry>
    369 
    370       <varlistentry id="libasprintf">
    371         <term><filename class="libraryfile">libasprintf</filename></term>
    372         <listitem>
    373           <para>defines the <emphasis>autosprintf</emphasis> class, which makes
    374           C formatted output routines usable in C++ programs, for use with the
    375           <emphasis>&lt;string&gt;</emphasis> strings and the
    376           <emphasis>&lt;iostream&gt;</emphasis> streams</para>
    377           <indexterm zone="ch-system-gettext libasprintf">
    378             <primary sortas="c-libasprintf">libasprintf</primary>
    379           </indexterm>
    380         </listitem>
    381       </varlistentry>
    382 
    383       <varlistentry id="libgettextlib">
    384         <term><filename class="libraryfile">libgettextlib</filename></term>
    385         <listitem>
    386           <para>a private library containing common routines used by the
    387           various Gettext programs; these are not intended for general use</para>
    388           <indexterm zone="ch-system-gettext libgettextlib">
    389             <primary sortas="c-libgettextlib">libgettextlib</primary>
    390           </indexterm>
    391         </listitem>
    392       </varlistentry>
    393 
    394       <varlistentry id="libgettextpo">
    395         <term><filename class="libraryfile">libgettextpo</filename></term>
    396         <listitem>
    397           <para>Used to write specialized programs that process
    398           <filename class="extension">.po</filename> files; this library is
    399           used when the standard applications shipped with Gettext (such as
    400           <command>msgcomm</command>, <command>msgcmp</command>,
    401           <command>msgattrib</command>, and <command>msgen</command>) will
    402           not suffice</para>
    403           <indexterm zone="ch-system-gettext libgettextpo">
    404             <primary sortas="c-libgettextpo">libgettextpo</primary>
    405           </indexterm>
    406         </listitem>
    407       </varlistentry>
    408 
    409       <varlistentry id="libgettextsrc">
    410         <term><filename class="libraryfile">libgettextsrc</filename></term>
    411         <listitem>
    412           <para>A private library containing common routines used by the
    413           various Gettext programs; these are not intended for general use</para>
    414           <indexterm zone="ch-system-gettext libgettextsrc">
    415             <primary sortas="c-libgettextsrc">libgettextsrc</primary>
    416           </indexterm>
    417         </listitem>
    418       </varlistentry>
    419 
    420       <varlistentry id="libtextstyle">
    421         <term><filename class="libraryfile">libtextstyle</filename></term>
    422         <listitem>
    423           <para>Text styling library</para>
    424           <indexterm zone="ch-system-gettext libtextstyle">
    425             <primary sortas="c-libtextstyle">libtextstyle</primary>
    426           </indexterm>
    427         </listitem>
    428       </varlistentry>
    429 
    430       <varlistentry id="preloadable_libintl">
    431         <term><filename class="libraryfile">preloadable_libintl</filename></term>
    432         <listitem>
    433           <para>A library, intended to be used by LD_PRELOAD that assists
    434           <filename class="libraryfile">libintl</filename> in logging
    435           untranslated messages</para>
    436           <indexterm zone="ch-system-gettext preloadable_libintl">
    437             <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>
    438           </indexterm>
    439         </listitem>
    440       </varlistentry>
    441     </variablelist>
     80    <para>Details on this package are located in
     81    <xref linkend="contents-gettext" role="."/></para>
    44282
    44383  </sect2>
Note: See TracChangeset for help on using the changeset viewer.