Ignore:
Timestamp:
11/24/2011 10:35:46 AM (12 years ago)
Author:
Andrew Benton <andy@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
ce45c19
Parents:
827336dc
Message:

Updated ghostscript to 9.04

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@9007 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pst/printing/gs.xml

    r827336dc rd453af5  
    77  <!-- <!ENTITY gs-download-http "&sourceforge-repo;/ghostscript/ghostscript-&gs-version;.tar.bz2"> -->
    88  <!-- FIXME use .bz2 or .xz when updating, if they are available -->
    9   <!ENTITY gs-download-http "http://ghostscript.com/releases/ghostscript-&gs-version;.tar.gz">
     9  <!ENTITY gs-download-http "http://ghostscript.com/releases/ghostscript-&gs-version;.tar.bz2">
    1010  <!-- no response 2010-12-18
    1111  <!ENTITY gs-download-ftp  "ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs900/ghostscript-&gs-version;.tar.gz"> -->
    1212  <!ENTITY gs-download-ftp  " ">
    13   <!ENTITY gs-md5sum        "a402462478b4cdda3e1816899227b845">
    14   <!ENTITY gs-size          "22.3 MB">
    15   <!ENTITY gs-buildsize     "170 MB (includes installing libgs.so and both font tarballs)">
    16   <!ENTITY gs-time          "2.7 SBU (includes building and installing libgs.so)">
     13  <!ENTITY gs-md5sum        "9f6899e821ab6d78ab2c856f10fa3023">
     14  <!ENTITY gs-size          "28.5 MB">
     15  <!ENTITY gs-buildsize     "297 MB (includes installing libgs.so and both font tarballs)">
     16  <!ENTITY gs-time          "2.5 SBU (includes building and installing libgs.so)">
    1717
    1818  <!-- <!ENTITY gs-standard-fonts-download "ftp://ftp.imagemagick.org/pub/ImageMagick/delegates/ghostscript-fonts-std-8.11.tar.gz"> -->
     
    4747    targets.</para>
    4848
    49     &lfs67_checked;
     49    &lfs70_checked;
    5050
    5151    <bridgehead renderas="sect3">Package Information</bridgehead>
     
    9696      <listitem>
    9797        <para>Download size: &gs-other-fonts-size;</para>
    98       </listitem>
    99     </itemizedlist>
    100 
    101     <itemizedlist spacing="compact">
    102       <title>Patches</title>
    103       <listitem>
    104         <para>Required patch: <ulink
    105         url="&patch-root;/ghostscript-&gs-version;-security_fixes-1.patch"/>
    106         </para>
    107       </listitem>
    108       <listitem>
    109         <para>Recommended patch (unless you build without JPEG2000 support) : <ulink
    110         url="&patch-root;/ghostscript-&gs-version;-system_jasper-1.patch"/>
    111         </para>
    11298      </listitem>
    11399    </itemizedlist>
     
    134120    <!-- the link for ijs source ultimately takes users back to the ghostscript site
    135121    <ulink url="http://www.linuxprinting.org/ijs/">IJS</ulink>, and -->
    136     <ulink url="http://packages.debian.org/unstable/source/libpaper">libpaper</ulink></para>
     122    <ulink url="http://packages.debian.org/unstable/source/libpaper">libpaper</ulink>.</para>
    137123
    138124    <para condition="html" role="usernotes">User Notes:
     
    153139      </note>
    154140
    155       <para>Begin by patching some vulnerabilities:</para>
    156 
    157 <screen><userinput>patch -Np1 -i ../ghostscript-&gs-version;-security_fixes-1.patch
    158 </userinput></screen>
    159 
    160141      <para><application>GPL Ghostscript</application> includes (old) copies of
    161142      several libraries. Some of these seem to have been patched to fix known
    162143      vulnerabilities, but others of these copies are less-well maintained.
    163144      To ensure that any future fixes are applied throughout the whole system,
    164       it is recommended that you build the released versions of these libraries
    165       and then configure <application>GPL Ghostscript</application> to link to
    166       them. This configuration has several steps.</para>
    167 
    168       <para>Unless you intend to build <application>GPL Ghostscript</application>
    169       without support for <literal>JPEG2000</literal> files, apply a patch to
    170       allow it to build against a current system-installed version of
    171       <application>JasPer</application>:</para>
    172 
    173 <screen><userinput>patch -Np1 -i ../ghostscript-&gs-version;-system_jasper-1.patch
    174 </userinput></screen>
    175 
    176       <para>Remove the local copies of <application>expat</application>,
    177       <application>JasPer</application>, <application>lcms</application>,
    178       <application>libjpeg</application>, <application>libpng</application>,
    179       <application>libtiff</application>, and <application>zlib</application>:
     145      it is recommended that you install the released versions of these
     146      libraries and then configure <application>GPL Ghostscript</application>
     147      to link to them.</para>
     148
     149      <para>If you have installed these dependencies on your system, remove the
     150      copies of <application>expat</application>,
     151      <application>freetype</application>, <application>JasPer</application>,
     152      <application>lcms</application>, <application>libjpeg</application>,
     153      <application>libpng</application>, <application>libtiff</application>
     154      and <application>zlib</application>:
    180155      </para>
    181156
    182 <screen><userinput>rm -rf expat jasper lcms jpeg libpng tiff zlib
    183 </userinput></screen>
     157<screen><userinput>rm -rf expat freetype jasper lcms jpeg libpng tiff zlib</userinput></screen>
    184158
    185159    <para>Run the configure command:</para>
    186160
    187 <screen><userinput>./configure --prefix=/usr --enable-dynamic --with-drivers=ALL,x11 --with-system-libtiff --disable-compile-inits</userinput></screen>
     161<screen><userinput>./configure --prefix=/usr --enable-dynamic --with-system-libtiff</userinput></screen>
    188162
    189163    <para>To ensure the build is able to use the system versions of
    190164    <application>expat</application>, <application>freetype</application>, and
    191     <application>lcms</application> it is necessary to make some changes and an
     165    <application>zlib</application> it is necessary to make some changes and an
    192166    addition to the <literal>Makefile</literal> before building the package:</para>
    193167
    194 <screen><userinput>sed -i  -e 's|SHARE_LCMS=0|SHARE_LCMS=1|' \
    195         -e 's|LCMSSRCDIR=lcms|LCMSSRCDIR=/usr|' \
    196         -e 's|=imdi|&amp;\n\n# Use system expat library\n\nSHARE_EXPAT=1|' \
    197         -e 's|SHARE_FT=0|SHARE_FT=1|' Makefile &amp;&amp;
     168<screen><userinput>sed -i '/^EXTRALIBS/s# -ldl# -lfreetype -lz#
     169  /=imdi/aSHARE_EXPAT=1' Makefile &amp;&amp;
    198170make</userinput></screen>
     171
     172    <warning>
     173      <para>If you have a multiprocessor computer and try to run make with
     174      multiple jobs (eg, -j4) then the build may fail due to race conditions in
     175      the <application>Ghostscript</application> build system.</para>
     176    </warning>
     177
     178    <note>
     179      <para>The shared library depends on <xref linkend="gtk2"/>. It is
     180      only used in external programs like <xref linkend="imagemagick"/>.</para>
     181    </note>
     182
     183    <para>To compile the shared library
     184    <filename class='libraryfile'>libgs.so</filename>, run the
     185    following additional command as an unprivileged user:</para>
     186
     187<screen><userinput>make so</userinput></screen>
    199188
    200189    <para>This package does not come with a test suite. However, you may test
     
    204193    <screen><userinput>bin/gs -Ilib -dBATCH examples/tiger.eps</userinput></screen>
    205194
    206     <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
    207 
    208 <!-- for 9.00 docdir is only referenced by GS_DOCDIR which is itself not referenced
    209  so the docs still go into /usr/share/ghostscript/9.00/
    210 <screen role="root"><userinput>make install docdir=/usr/share/doc/ghostscript-&gs-version; &amp;&amp;-->
    211 <screen role="root"><userinput>make install &amp;&amp;
    212 for INSTFILE in `ls doc`
    213 do
    214   <!--if [ ! -f          /usr/share/doc/ghostscript-&gs-version;/$INSTFILE ]; then -->
    215   if [ ! -f          /usr/share/ghostscript/&gs-version;/doc/$INSTFILE ]; then
    216     install -v -m644 doc/$INSTFILE \
    217                      /usr/share/ghostscript/&gs-version;/doc
    218                      <!--/usr/share/doc/ghostscript-&gs-version;-->
    219   fi
    220 done &amp;&amp;
    221 
    222 <!--install -v -m755 -d /usr/share/doc/ghostscript-&gs-version;/figures &amp;&amp;-->
    223 install -v -m755 -d /usr/share/ghostscript/&gs-version;/doc/figures &amp;&amp;
    224 install -v -m644    doc/figures/* \
    225                     /usr/share/ghostscript/&gs-version;/doc/figures &amp;&amp;
    226                     <!--/usr/share/doc/ghostscript-&gs-version;/figures-->
    227 ln -sv ../ghostscript/&gs-version;/doc /usr/share/doc/ghostscript-&gs-version;
    228 </userinput></screen>
    229 
    230     <para>To install the shared library
    231     <filename class='libraryfile'>libgs.so</filename>, run the
    232     following additional command as an unprivileged user:</para>
    233 
    234 <screen><userinput>make so</userinput></screen>
    235 
    236     <para>And again as the <systemitem class="username">root</systemitem>
     195    <para>Now, as the <systemitem class="username">root</systemitem>
    237196    user:</para>
    238197
    239 <screen role="root"><userinput>make soinstall docdir=/usr/share/doc/ghostscript-&gs-version; &amp;&amp;
     198<screen role="root"><userinput>make install</userinput></screen>
     199
     200    <para>If you want the shared library too:</para>
     201
     202<screen role="root"><userinput>make soinstall &amp;&amp;
    240203install -v -m644 base/*.h /usr/include/ghostscript &amp;&amp;
    241204ln -v -s ghostscript /usr/include/ps</userinput></screen>
    242205
    243     <note>
    244       <para>The shared library depends on <xref linkend="gtk2"/>. It is
    245       only used in external programs like <!-- <xref linkend="gsview"/> and -->
    246       <xref linkend="imagemagick"/>.</para>
    247     </note>
     206    <para>Now install the documentation:</para>
     207
     208<screen role="root"><userinput>cp -rf doc /usr/share/ghostscript/&gs-version; &amp;&amp;
     209ln -sv ../ghostscript/&gs-version;/doc /usr/share/doc/ghostscript-&gs-version;</userinput></screen>
    248210
    249211    <para>To finish the installation, unpack all fonts you've downloaded to
    250212    <filename class="directory">/usr/share/ghostscript</filename> and ensure
    251213    the ownerships of the files are
    252     <systemitem class="username">root</systemitem>:<systemitem
    253     class="groupname">root</systemitem>. Substitute
     214    <systemitem class="username">root</systemitem>:
     215    <systemitem class="groupname">root</systemitem>. Substitute
    254216    <replaceable>&lt;font-tarball&gt;</replaceable> appropriately in
    255217    the command below for the fonts you wish to install:</para>
    256218
    257 <screen role="root"><userinput>tar -xvf ../<replaceable>&lt;font-tarball&gt;</replaceable> \
    258     -C /usr/share/ghostscript --no-same-owner</userinput></screen>
     219<screen role="root"><userinput>tar -xvf ../<replaceable>&lt;font-tarball&gt;</replaceable> -C /usr/share/ghostscript --no-same-owner</userinput></screen>
    259220
    260221  </sect2>
     
    263224    <title>Command Explanations</title>
    264225
    265     <para><command>--with-drivers=ALL,x11</command>: This parameter adds the
     226    <!-- works fine on 32 bit systems for me - Andrew Benton
     227    <para><command>with-drivers=ALL,x11</command>: This parameter adds the
    266228    <literal>x11</literal> output device to the default (<literal>ALL</literal>)
    267229    selection so that the test to render the tiger will work on 32-bit systems
    268230    (this does no harm on the <literal>x86_64</literal> architecture, although
    269     it is not required there).</para>
    270     <para><command>--disable-compile-inits</command>: This parameter is intended
    271     to avoid compiling initialization files into the executables.  It is used here
    272     to simplify building agaisnt the system version of
    273     <application>zlib</application>.</para>
    274     <para><option>--without-jasper</option>: If you know you do not wish to print
    275     any <literal>JPEG2000</literal> files, this switch (and removing the
    276     <filename class="directory">jasper/</filename> source) will achieve this.</para>
     231    it is not required there).</para> -->
     232
     233    <!-- The build fails for me with this option with ghostscript-9.04 and
     234    zlib-1.2.5 - Andrew Benton
     235    <para><command>disable-compile-inits</command>: This parameter is intended
     236    to avoid compiling initialization files into the executables.  It is used
     237    here to simplify building against the system version of
     238    <application>zlib</application>.</para> -->
     239
     240    <para><option>--without-jasper</option>: If you know you do not wish to
     241    print any <literal>JPEG2000</literal> files, this switch (and removing the
     242    <filename class="directory">jasper</filename> folder in the source) will
     243    disable JPEG2000 support in <application>Ghostscript</application>.</para>
     244
    277245    <para><option>--without-jbig2dec</option>: The <literal>JBIG2</literal>
    278     decompression code (used for some faxes) can be disabled by using this switch
    279     and removing the <filename class="directory">jbig2dec/</filename> source.</para>
    280     <para><command>install ...</command>: Some packages
     246    decompression code (used for some faxes) can be disabled by using this
     247    switch and removing the <filename class="directory">jbig2dec/</filename>
     248    source.</para>
     249
     250    <para><command>install -v -m644 base/*.h...</command>: Some packages
    281251    (<application>ImageMagick</application> is one) need the
    282252    <application>Ghostscript</application> interface headers in place to link
    283253    to the shared library. These commands install the headers.</para>
    284254
    285     <para><command>ln -sv ... /usr/share/doc/ghostscript-&gs-version;</command>: This puts
    286     the documentation where it is expected to be found.</para>
    287 
    288     <para><command>ln -v -s ghostscript /usr/include/ps</command>: Some
    289     packages expect to find the interface headers in an alternate
    290     location.</para>
     255    <para><command>ln -sv ... /usr/share/doc/ghostscript-&gs-version;</command>:
     256    This puts a symbolic link to the documentation where it is expected to be
     257    found.</para>
     258
     259    <para><command>ln -v -s ghostscript /usr/include/ps</command>: Some packages
     260    expect to find the interface headers in an alternate location.</para>
    291261
    292262  </sect2>
     
    301271      <seglistitem>
    302272        <seg>bdftops, dumphint, dvipdf, eps2eps, fixmswrd.pl, font2c, gs, gsbj,
    303         gsc (from soinstall), gsdj, gsdj500, gslj, gslp, gsnd, gsx (from soinstall),
    304         lprsetup.sh, pdf2dsc, pdf2ps, pdfopt,
     273        gsc (from soinstall), gsdj, gsdj500, gslj, gslp, gsnd, gsx
     274        (from soinstall), lprsetup.sh, pdf2dsc, pdf2ps, pdfopt,
    305275        pf2afm, pfbtopfa, printafm, ps2ascii, ps2epsi, ps2pdf, ps2pdf12,
    306276        ps2pdf13, ps2pdf14, ps2pdfwr, ps2ps, ps2ps2, pv.sh, unix-lpr.sh, and
    307277        wftopfa</seg>
    308278        <seg>libgs.so </seg>
    309         <seg>/usr/include/ghostscript, /usr/lib/ghostscript, /usr/share/ghostscript,
    310         <!--and /usr/share/doc/ghostscript</seg>-->
     279        <seg>/usr/include/ghostscript, /usr/lib/ghostscript,
     280        /usr/share/ghostscript,
    311281        and /usr/share/doc/ghostscript-&gs-version;</seg>
    312282      </seglistitem>
     
    321291        <term><command>gs</command></term>
    322292        <listitem>
    323           <para>is an interpreter for Adobe Systems' PostScript(tm) and Portable Document Format
    324           (PDF).</para>
     293          <para>is an interpreter for Adobe Systems' PostScript(tm) and Portable
     294          Document Format (PDF).</para>
    325295          <indexterm zone="gs gplgs-prog">
    326296            <primary sortas="b-gs">gs</primary>
Note: See TracChangeset for help on using the changeset viewer.