<?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-system-temp-perl" role="wrap">
  <?dbhtml filename="temp-perl.html"?>

  <title>Temporary Perl-&perl-version;</title>

  <indexterm zone="ch-system-temp-perl">
    <primary sortas="a-Perl">Perl</primary>
    <secondary>temporary tools</secondary>
  </indexterm>

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

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

    <para os="a">First adapt some hard-wired paths to the C library by applying
    the following patch:</para>

<screen os="b"><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>

    <para os="s1">Change a hardcoded path from
    <filename class="directory">/usr/include</filename> to
    <filename class="directory">/tools/include</filename>:</para>

<screen os="s2"><userinput>sed -i 's@/usr/include@/tools/include@g' ext/Errno/Errno_pm.PL</userinput></screen>

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

<screen os="d"><userinput>./configure.gnu --prefix=/tools -Dcc="gcc"</userinput></screen>

    <variablelist os="e">
      <title>The meaning of the configure option:</title>

      <varlistentry>
        <term><parameter>-Dcc="gcc"</parameter></term>
        <listitem>
          <para>Tells Perl to use <command>gcc</command> instead of the
          default <command>cc</command>.</para>
        </listitem>
      </varlistentry>

    </variablelist>

  <para os="f">Compile the package:</para>

<screen os="g"><userinput>make</userinput></screen>

  <para os="h">Although Perl comes with a test suite, it is not recommended
  to run it at this point, as this Perl installation is only temporary. The
  test suite can be run later in this chapter if desired.</para>

    <para os="i">Install the package:</para>

<screen os="j"><userinput>make install</userinput></screen>

    <para os="k">Finally, create a necessary symlink:</para>

<screen os="l"><userinput>ln -sfv /tools/bin/perl /usr/bin</userinput></screen>

  </sect2>

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

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

  </sect2>

</sect1>
