<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-temp-system-gettext" role="wrap">
  <?dbhtml filename="gettext.html"?>

  <title>Gettext-&gettext-version;</title>

  <indexterm zone="ch-temp-system-gettext">
    <primary sortas="a-Gettext">Gettext</primary>
    <secondary>temporary system</secondary>
  </indexterm>

  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  href="../../final-system/common/gettext.xml"
  xpointer="xpointer(//*[@role='package'])"/>

  <sect2 role="installation">
    <title>Installation of Gettext</title>

    <para os="i">Many packages' installation procedures use the
    <command>msgfmt</command> program for i18n support, so we will compile
    and install it into <filename class="directory">/tools</filename>.</para>

    <para os="a">Only the programs in the
    <filename class="directory">gettext-tools</filename> directory need to be
    installed for the temp-system:</para>

<screen os="b"><userinput>cd gettext-tools</userinput></screen>

    <para os="t1">When cross-compiling, the Gettext
    <command>configure</command> script assumes we don't have a working wcwidth
    even when we do. The following will fix possible
    compilation errors because of this assumption:</para>

<screen os="t2"><userinput>echo "gl_cv_func_wcwidth_works=yes" &gt; config.cache</userinput></screen>

    <para os="c">Prepare Gettext for compilation:</para>

<screen os="d"><userinput>./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --disable-shared --cache-file=config.cache</userinput></screen>

    <para os="e">Compile the required program and support library:</para>

<screen os="f"><userinput>make -C gnulib-lib
make -C src msgfmt</userinput></screen>

    <para os="g">Install the <command>msgfmt</command> binary:</para>

<screen os="h"><userinput>cp -v src/msgfmt /tools/bin</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref
    linkend="contents-gettext" role="."/></para>

  </sect2>

</sect1>
