<?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 w3m-download-http "&sourceforge-repo;/w3m/w3m-&w3m-version;.tar.gz">
  <!ENTITY w3m-download-ftp  " ">
  <!ENTITY w3m-md5sum        "1b845a983a50b8dec0169ac48479eacc">
  <!ENTITY w3m-size          "2.1 MB">
  <!ENTITY w3m-buildsize     "26 MB">
  <!ENTITY w3m-time          "0.3 SBU">
]>

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

  <sect1info>
    <othername>$LastChangedBy: pierre $</othername>
    <date>$Date: 2015-03-01 05:42:20 -0500 (Sun, 01 Mar 2015) $</date>
  </sect1info>

  <title>W3m-&w3m-version;</title>

  <indexterm zone="w3m">
    <primary sortas="a-W3m">W3m</primary>
  </indexterm>

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

    <para><application>w3m</application> is primarily a pager but it can
    also be used as a text-mode WWW browser.</para>

    &lfs77_checked;

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

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

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

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required"><xref linkend="gc"/></para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="gpm"/>,
      <xref linkend="openssl"/>,
      <xref linkend="imlib2"/>,
      <xref linkend="gtk2"/>,
      <ulink url="http://ftp.gnome.org/pub/gnome/sources/imlib/1.9/">Imlib</ulink>
        (not recommended: obsolete, abandoned upstream,
        <ulink url="http://bugs.debian.org/448360">buggy</ulink>, and gives no
        additional functionality as compared to other image loading libraries),
      <xref linkend="gdk-pixbuf"/>,
      <xref linkend="compface"/>, and
      <ulink url="http://packages.debian.org/unstable/text/nkf">nkf</ulink>,
      a Mail User Agent, and 
      an External Browser
    </para>

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

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

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

<screen><userinput>patch -Np1 -i ../w3m-&w3m-version;-bdwgc72-1.patch &amp;&amp;
sed -i 's/file_handle/file_foo/' istream.{c,h} &amp;&amp;
sed -i 's#gdk-pixbuf-xlib-2.0#&amp; x11#' configure &amp;&amp;

./configure --prefix=/usr --sysconfdir=/etc &amp;&amp;
make</userinput></screen>

    <para>This package does not come with a test suite.</para>

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

<screen role="root"><userinput>make install &amp;&amp;
install -v -m644 -D doc/keymap.default /etc/w3m/keymap &amp;&amp;
install -v -m644    doc/menu.default /etc/w3m/menu &amp;&amp;
install -v -m755 -d /usr/share/doc/w3m-&w3m-version; &amp;&amp;
install -v -m644    doc/{HISTORY,READ*,keymap.*,menu.*,*.html} \
                    /usr/share/doc/w3m-&w3m-version;</userinput></screen>
  </sect2>

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

    <para>
      <command>patch -p1 &lt; ../w3m-&w3m-version;-bdwgc72-1.patch</command>:
      This patch fixes compiling w3m with GC-7.2 installed.
    </para>

    <para><command>sed -i 's/file_handle/file_foo/' istream.{c,h}</command>:
    This sed renames the file_handle function to avoid a clash with a glibc
    function that has the same name, defined in
    /usr/include/bits/fcntl.h.</para>

    <para><command>sed -i 's#gdk-pixbuf-xlib-2.0#&amp; x11#'
    configure</command>: This sed fixes compiling <application>w3m</application>
    using <xref linkend="gtk2"/> as its image library. It has no impact if
    <xref linkend="gtk2"/> is not installed.</para>

    <para><option>--sysconfdir=/etc</option>: This option puts the configuration
    files in /etc.</para>
  </sect2>

  <sect2 role="configuration">
    <title>Configuring W3m</title>

    <sect3 id="w3m-config">
      <title>Config Files</title>

      <para><filename>/etc/w3m/*</filename> and
      <filename>~/.w3m/*</filename></para>

      <indexterm zone="w3m w3m-config">
        <primary sortas="e-etc-w3m/*">/etc/w3m/*</primary>
      </indexterm>

      <indexterm zone="w3m w3m-config">
        <primary sortas="e-AA.w3m/*">~/.w3m/*</primary>
      </indexterm>
    </sect3>
  </sect2>

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

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

      <seglistitem>
        <seg>w3m and w3mman</seg>
        <seg>None</seg>
        <seg>/usr/libexec/w3m,
             /usr/share/w3m, and
             /usr/share/doc/w3m-&w3m-version;</seg>
      </seglistitem>
    </segmentedlist>

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

      <varlistentry id="w3m-prog">
        <term><command>w3m</command></term>
        <listitem>
          <para>is a text based web browser and pager.</para>
          <indexterm zone="w3m w3m-prog">
            <primary sortas="b-w3m">w3m</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="w3mman">
         <!-- Don't remove the extra space, it prevent a FOP warning. -->
        <term><command>w3mman</command> </term>
        <listitem>
          <para>is an interface to the on-line reference manuals in
          <command>w3m</command>.</para>
          <indexterm zone="w3m w3mman">
            <primary sortas="b-w3mman">w3mman</primary>
          </indexterm>
        </listitem>
      </varlistentry>
    </variablelist>
  </sect2>
</sect1>
