<?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 gnash-download-http
    "http://ftp.gnu.org/pub/gnu/gnash/&gnash-version;/gnash-&gnash-version;.tar.bz2">
  <!ENTITY gnash-download-ftp
    "ftp://ftp.gnu.org/pub/gnu/gnash/&gnash-version;/gnash-&gnash-version;.tar.bz2">
  <!ENTITY gnash-md5sum        "63e9f79c41d93d48c5a2fa94856548c4">
  <!ENTITY gnash-size          "4.1 MB">
  <!ENTITY gnash-buildsize     "758 MB">
  <!ENTITY gnash-time          "11.1 SBU">
]>

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

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-03-03 14:19:14 -0500 (Tue, 03 Mar 2015) $</date>
  </sect1info>

  <title>gnash-&gnash-version;</title>

  <indexterm zone="gnash">
    <primary sortas="a-gnash">gnash</primary>
  </indexterm>

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

    <para>
      <application>Gnash</application> is the GNU Flash movie player and browser
      plugin. This is useful for watching YouTube videos or simple flash
      animations.
    </para>

    &lfs76_checked;

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

    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Required patch:
          <ulink url="&patch-root;/gnash-&gnash-version;-CVE-2012-1175-1.patch"/>
        </para>
      </listitem>
    </itemizedlist>

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

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="agg"/>,
      <xref linkend="boost"/>,
      <xref linkend="curl"/>,
      <!-- <xref linkend="ffmpeg"/> or -->
      <xref linkend="gst-ffmpeg"/>,
      <xref linkend="npapi-sdk"/>, and
      <xref linkend="giflib"/>
    </para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="dejagnu"/>,
      <xref linkend="GConf"/>,
      <xref linkend="git"/>,
      <xref linkend="kdelibs"/>,
      <xref linkend="libogg"/>,
      <xref linkend="libvorbis"/>,
      <xref linkend="qt4"/>,
      <xref linkend="speex"/>,
      <xref linkend="wget"/>,
      <ulink url="http://www.swftools.org/">SWFTools</ulink>,
      <ulink url="http://swfmill.org/">Swfmill </ulink>,
      <ulink url="http://www.mtasc.org/">Mtasc</ulink>,
      <ulink url="http://netcat.sourceforge.net/">Netcat</ulink>,
      <ulink url="http://csound.sourceforge.net/">Csound</ulink>,
      <ulink url="https://launchpad.net/libgsm">LibGSM</ulink> and
      <ulink url="http://sourceforge.net/projects/libdc1394/">Libdc1394</ulink>.
    </para>

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

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

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

<screen><userinput>patch -Np1 -i ../gnash-&gnash-version;-CVE-2012-1175-1.patch &amp;&amp;
sed -i '/^LIBS/s/\(.*\)/\1 -lboost_system/' \
    gui/Makefile.in utilities/Makefile.in   &amp;&amp;
sed -e '/DGifOpen/s:Data:&amp;, NULL:'          \
    -e '/DGifCloseFile/s:_gif:&amp;, NULL:'     \
    -i libbase/GnashImageGif.cpp            &amp;&amp;
sed -i '/#include &lt;csignal&gt;/a\#include &lt;unistd.h&gt;' plugin/klash4/klash_part.cpp &amp;&amp;

./configure --prefix=/usr --sysconfdir=/etc               \
  --with-npapi-incl=/usr/include/npapi-sdk --enable-media=gst \
  --with-npapi-plugindir=/usr/lib/mozilla/plugins         \
  --without-gconf &amp;&amp;
make</userinput></screen>

    <para>
      To test the results issue <command>make check</command>.
    </para>

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

<screen role="root"><userinput>make install &amp;&amp;
make install-plugin</userinput></screen>
  </sect2>

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

    <para>
      <command>sed -i '/^LIBS/s/\(.*\)/\1 -lboost_system/' ...</command>:
      This fixes linking to the current <application>boost</application> libraries.
    </para>

    <para>
      <command>sed -e '/DGifOpen/s:Data:&amp;, NULL:' ...</command>:
      This sed fixes building with recent versions of
      <application>Giflib</application>.
    </para>

    <para>
      <command>sed -i '/#include &lt;csignal&gt;/a\#include &lt;unistd.h&gt;' ...</command>:
      This fixes building when <application>kdelibs</application> has been installed.
    </para>

    <para>
      <option>--enable-media=gst</option>: This tells it to use Gstreamer for
      to play video and audio (--enable-media=ffmpeg is broken with
      FFmpeg-0.11.1).
    </para>

    <para>
      <option>--with-npapi-incl=/usr/include/npapi-sdk</option>: This option tells
      it where to find some Mozilla headers that it needs.
    </para>

    <para>
      <option>--with-npapi-plugindir=/usr/lib/mozilla/plugins</option>: This
      option tells it to install the Mozilla browser plugin into
      /usr/lib/mozilla/plugins.
    </para>

    <para>
      <option>--without-gconf</option>: Omit this switch if you have GConf
      installed and wish gnash to use it.
    </para>

    <para>
      <command>make install-plugin</command>: This command installs the Mozilla
      browser plugin.
    </para>
  </sect2>

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

    <segmentedlist>
      <segtitle>Installed Program</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>gnash-gtk-launcher</seg>
        <seg>
          2 private libraries in /usr/lib/gnash and
          libgnashplugin.so.
        </seg>
        <seg>
          /usr/lib/gnash and
          /usr/share/gnash.
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="gnash-gtk-launcher">
        <term><command>gnash-gtk-launcher</command></term>
        <listitem>
          <para>
            launches Gnash.
          </para>
          <indexterm zone="gnash gnash-gtk-launcher">
            <primary sortas="b-gnash-gtk-launcher">gnash-gtk-launcher</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libgnashplugin">
        <term><filename class="libraryfile">libgnashplugin.so</filename></term>
        <listitem>
          <para>
            is the Mozilla browser plugin.
          </para>
          <indexterm zone="gnash libgnashplugin">
            <primary sortas="c-libgnashplugin">libgnashplugin.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>
    </variablelist>
  </sect2>
</sect1>
