<?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 cups-filters-download-http
  "https://www.openprinting.org/download/cups-filters/cups-filters-&cups-filters-version;.tar.xz">
  <!ENTITY cups-filters-download-ftp  " ">
  <!ENTITY cups-filters-md5sum        "ad594ac06dfbfb02af34deb0805cab00">
  <!ENTITY cups-filters-size          "1.3 MB">
  <!ENTITY cups-filters-buildsize     "34 MB (additional 2 MB for the tests)">
  <!ENTITY cups-filters-time          "0.4 SBU">
]>

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

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-03-04 17:39:39 -0500 (Wed, 04 Mar 2015) $</date>
  </sect1info>

  <title>cups-filters-&cups-filters-version;</title>

  <indexterm zone="cups-filters">
    <primary sortas="a-cups-filters">cups-filters</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to CUPS Filters</title>

    <para>
      The <application>CUPS Filters</application> package contains backends,
      filters and other software that was once part of the core
      <application>CUPS</application> distribution but is no longer
      maintained by Apple Inc.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&cups-filters-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&cups-filters-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &cups-filters-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &cups-filters-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &cups-filters-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &cups-filters-time;
        </para>
      </listitem>
    </itemizedlist>
<!--
    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Required patch:
          <ulink url="&patch-root;/cups-filters-&cups-filters-version;-poppler_fix-1.patch"/>
        </para>
      </listitem>
    </itemizedlist>
-->
    <bridgehead renderas="sect3">CUPS Filters Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="cups"/>,
      <xref linkend="glib2"/>,
      <xref linkend="ijs"/>,
      <xref linkend="lcms2"/>,
      <xref linkend="poppler"/> and
      <xref linkend="qpdf"/>
    </para>

    <bridgehead renderas="sect4">Recommended</bridgehead>
    <para role="recommended">
      <xref linkend="libjpeg"/>,
      <xref linkend="libpng"/> and
      <xref linkend="libtiff"/>
    </para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="avahi"/> and
      <xref linkend="php"/> (use of this might be broken) 
    </para>

    <bridgehead renderas="sect4">Required (Runtime)</bridgehead>
    <para role="required runtime">
      <xref linkend="gs"/> (Needed for PostScript printers), or
      <xref linkend="gutenprint"/> (for supported printers),
      or other printer drivers
    </para>

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

  <sect2 role="installation">
    <title>Installation of CUPS Filters</title>

    <para>
      Install <application>CUPS Filters</application> by running the following
      commands:
    </para>
<!--
<userinput>patch -Np1 -i ../cups-filters-&cups-filters-version;-poppler_fix-1.patch &amp;&amp;
-->

<screen><userinput>./configure --prefix=/usr                   \
            --sysconfdir=/etc               \
            --localstatedir=/var            \
            --without-rcdir                 \
            --disable-static                \
            --with-gs-path=/usr/bin/gs      \
            --with-pdftops-path=/usr/bin/gs \
            --docdir=/usr/share/doc/cups-filters-&cups-filters-version; &amp;&amp;
make</userinput></screen>

    <para>
      To test the results, issue: <command>make check 2&gt;&amp;1 &gt;testlog</command>.
    </para>

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

<screen role="root"><userinput>make install</userinput></screen>

  </sect2>

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

    <para>
      <command>patch ...</command>: Allow the package to build with 
      poppler-0.31.0 and later.
    </para>

    <para>
      <parameter>--without-rcdir</parameter>: This switch disables
      installation of the bundled bootscript which is not compatible
      with BLFS.
    </para>

    <para>
      <parameter>--with-gs-path=/usr/bin/gs</parameter>: This switch
      defines the path to the <application>GhostScript</application>
      binary in case <xref linkend="gs"/> is not installed at build time.
    </para>

    <para>
      <parameter>--with-pdftops-path=/usr/bin/gs</parameter>: This switch
      defines the path to the <application>GhostScript</application>
      binary in case <xref linkend="gs"/> is not installed at build time.
    </para>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
      href="../../xincludes/static-libraries.xml"/>

    <para>
      <command>make check 2&gt;&amp;1 &gt;testlog</command>: the testsuite
      dumps a stream of bytes into the input buffer after it finishes. Sending
      the output to a file keeps the history usable, but some debug information
      will still appear on the screen.
    </para>

    <para>
      <option>--with-test-path=<replaceable>VALUE</replaceable></option> : if you wish to run the tests, but
      you do not have the default
      <filename>/usr/share/fonts/dejavu/DejaVuSans.ttf</filename> use this switch
      to specify where <filename>DejaVuSans.ttf</filename> (or perhaps some other
      text TTF font - untested) is located.
    </para>

  </sect2>

<!-- TODO: Write a bootscript for cups-browsed -->

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

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

      <seglistitem>
        <seg>
          ttfread and cups-browsed
        </seg>
        <seg>
          libcupsfilters.so and libfontembed.so
        </seg>
        <seg>
          /usr/include/cupsfilters,
          /usr/include/fontembed,
          /usr/lib/cups/backend,
          /usr/lib/cups/filter,
          /usr/share/cups/banners,
          /usr/share/cups/charsets,
          /usr/share/cups/data,
          /usr/share/doc/cups-filters-&cups-filters-version; and
          /usr/share/ppd/cupsfilters
        </seg>
      </seglistitem>
    </segmentedlist>

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

      <varlistentry id="libcupsfilters">
        <term><filename class="libraryfile">libcupsfilters.so</filename></term>
        <listitem>
          <para>
            contains <application>CUPS Filters</application> API functions.
          </para>
          <indexterm zone="cups-filters libcupsfilters">
            <primary sortas="c-libcupsfilters">libcupsfilters.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
