<?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;

  <!ENTITY boost-download-http "&sourceforge-repo;/boost/boost_&boost-dl-version;.tar.bz2">
  <!ENTITY boost-download-ftp  " ">
  <!ENTITY boost-md5sum        "1be49befbdd9a5ce9def2983ba3e7b76">
  <!ENTITY boost-size          "59 MB">
  <!ENTITY boost-buildsize     "805 MB">
  <!ENTITY boost-time          "4.4 SBU">
]>

<sect1 id="boost" xreflabel="Boost-&boost-version;">
  <?dbhtml filename="boost.html"?>

  <sect1info>
    <othername>$LastChangedBy: pierre $</othername>
    <date>$Date: 2015-03-05 08:50:38 -0500 (Thu, 05 Mar 2015) $</date>
  </sect1info>

  <title>Boost-&boost-version;</title>

  <indexterm zone="boost">
    <primary sortas="a-Boost">Boost</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to Boost</title>

    <para>
      <application>Boost</application> provides a set of free peer-reviewed
      portable C++ source libraries. It includes libraries for linear algebra,
      pseudorandom number generation, multithreading, image processing, regular
      expressions and unit testing.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&boost-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&boost-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &boost-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &boost-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &boost-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &boost-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">Boost Dependencies</bridgehead>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="icu"/> and
      <xref linkend="python2"/>
    </para>

    <para condition="html" role="usernotes">User Notes:
      <ulink url="&blfs-wiki;/boost"/>
    </para>
  </sect2>

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

    <para>
      Install <application>Boost</application> by running the following
      commands:
    </para>

<screen><userinput>sed -e '1 i#ifndef Q_MOC_RUN' \
    -e '$ a#endif'            \
    -i boost/type_traits/detail/has_binary_operator.hpp &amp;&amp;

./bootstrap.sh --prefix=/usr &amp;&amp;
./b2 stage threading=multi link=shared</userinput></screen>

    <para>
      To test the result, issue <command>pushd status; ../b2; popd</command>.
      A few tests may fail. They take a long time (more than 120 SBU) and use up
      to 40 GB of disk space. You can use the <parameter>-jN</parameter> switch
      to speed them up.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<!-- dev note: ./b2 - -prefix=<DESTDIR>/usr install threading=multi link=shared -->

<screen role="root"><userinput>./b2 install threading=multi link=shared</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <command>sed ... has_binary_operator.hpp</command>: This command
      fixes a header to overcome a problem with Qt's moc command.  It
      is necessary for building some KDE packages.
    </para>

    <para>
      <parameter>threading=multi</parameter>: This parameter ensures that
      <application>Boost</application> is built with multithreading support.
    </para>

    <para>
      <parameter>link=shared</parameter>: This parameter ensures that only
      shared libraries are created, except for libboost_exception and
      libboost_test_exec_monitor which are created as static. Most people
      will not need the static libraries. Indeed most programs using
      <application>Boost</application> only use the headers. 0mit
      this parameter if you do need static libraries.
    </para>

    <para>
       <option>-jN</option>: This switch may be added to the
       <command>b2</command> command lines, to run up to N processes in
       parallel.
    </para>

  </sect2>

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

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directory</segtitle>

      <seglistitem>
        <seg>
          None
        </seg>
        <seg>
          libboost_atomic.so, libboost_chrono.so, libboost_container.so,
          libboost_context.so, libboost_coroutine.so, libboost_date_time.so,
          libboost_exception.a, libboost_filesystem.so, libboost_graph.so,
          libboost_iostreams.so, libboost_locale.so, libboost_log_setup.so,
          libboost_log.so, libboost_math_c99.so, libboost_math_c99f.so,
          libboost_math_c99l.so, libboost_math_tr1.so, libboost_math_tr1f.so,
          libboost_math_tr1l.so, libboost_prg_exec_monitor.so,
          libboost_program_options.so, libboost_python.so, libboost_random.so,
          libboost_regex.so, libboost_serialization.so, libboost_signals.so,
          libboost_system.so, libboost_test_exec_monitor.a, libboost_thread.so,
          libboost_timer.so, libboost_unit_test_framework.so, libboost_wave.so,
          and libboost_wserialization.so
        </seg>
        <seg>
          /usr/include/boost
        </seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

</sect1>
