%define enable_japanese 1 %define vflib gs5.50-vflib-1.0 %define gsj gs550j1 Summary: A PostScript(TM) interpreter and renderer. Name: ghostscript %define hpdjver 2.6 %define md2kver 0.2a Version: 5.50 Release: 7j1 License: GPL URL: http://gnu-gs.sourceforge.net/ Group: Applications/Publishing Source0: ftp://ftp.cs.wisc.edu/pub/ghost/gnu/gs550/gnu-gs-%{version}.tar.gz Source1: ftp://ftp.cs.wisc.edu/pub/ghost/gnu/gs550/gnu-gs-%{version}jpeg.tar.gz Source2: http://www.erdw.ethz.ch/~bonk/ftp/gs-driver-distrib/hp8xxs13.zip Source3: ftp://ftp.sbs.de/pub/graphics/ghostscript/pcl3/hpdj-%{hpdjver}.tar.gz Source4: ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/gs550/ghostscript-%{version}gnu.tar.gz Source5: http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/gdevmd2k-%{md2kver}.tar.gz Source6: http://lcewww.et.tudelft.nl/~haver/cgi-bin/download/linux/epson740.tgz Source10: http://www.ldl.jaist.ac.jp/~akr/nonresearch/free-software/ghostscript/%{vflib}.tar.gz Source11: %{gsj}.tar.gz Patch0: ghostscript-5.50-config.patch Patch1: gs5.50-rth.patch Patch3: gs5.50-hp8xx.patch Patch4: gs5.50-hpdj.patch # Location of files used to generate patch 5: # http://www.ultranet.com/~setaylor/papers.htm Patch5: gs5.50-lexmark5700.patch # Location of files used to generate patch 6: # http://bimbo.fjfi.cvut.cz/~paluch/l7kdriver/ Patch6: gs5.50-lexmark7000.patch # Same as Patch0, but patched against vflib changes Patch10: ghostscript-5.50-configj.patch Patch11: ghostscript-5.50-cdj880.patch Patch12: ghostscript-5.50-bmp16m.patch Patch13: ghostscript-5.50-gcc296.patch %if %{enable_japanese} Patch20: ghostscript-5.50-jisb.patch %endif Patch21: ghostscript-5.50-ps.patch Requires: urw-fonts >= 1.1, ghostscript-fonts BuildRequires: freetype-devel %if %{enable_japanese} BuildPreReq: VFlib2-devel cmpskit Requires: VFlib2, cmpskit >= 2 %endif BuildRoot: /var/tmp/ghostscript-root %description Ghostscript is a set of software that provides a PostScript(TM) interpreter, a set of C procedures (the Ghostscript library, which implements the graphics capabilities in the PostScript language) and an interpreter for Portable Document Format (PDF) files. Ghostscript translates PostScript code into many common, bitmapped formats, like those understood by your printer or screen. Ghostscript is normally used to display PostScript files and to print PostScript files to non-PostScript printers. If you need to display PostScript files or print them to non-PostScript printers, you should install ghostscript. If you install ghostscript, you also need to install the ghostscript-fonts package. %prep %setup -q -n gs%{version} %setup -q -T -D -a 1 -a 5 -b 4 -a 10 -a 11 -n gs%{version} ln -s jpeg-6b jpeg %if %{enable_japanese} patch -s -p1 < %{vflib}/%{vflib}.diff %patch10 -p1 -b .config patch -s -p1 -b --suffix .gsj < %{gsj}.diff cat jdevs.add >>contrib.mak %else %patch0 -p1 -b .config %endif %patch1 -p1 -b .rth # Add support for HP 8xx printers %patch3 -p1 -b .hp8xx mkdir tmp cd tmp unzip -a -L %{SOURCE2} mv *.c *.h .. rm -f * # Add upp files for epson 740 tar xzvf %{SOURCE6} mv epson740/*.upp .. # Add support for some other HP printers tar xzfO %{SOURCE3} hpdj-%{hpdjver}/hpdj.tar | tar xf - mv *.c *.h *.1 .. cd .. %patch11 -p1 -b .cdj880 cat tmp/contrib.mak-%{version}.add >>contrib.mak patch -p0 -z .hpdjauto < tmp/zmedia2.c-%{version}.diff %patch4 -p1 -b .hpdj %patch5 -p1 -b .lxm # Add support for ALPS printers mv gdevmd2k-%{md2kver}/*.[ch] . cat gdevmd2k-%{md2kver}/gdevmd2k.mak-5.50 >>contrib.mak perl -pi -e "s/^DEVICE_DEVS6=/DEVICE_DEVS6=md2k.dev md5k.dev /g" unix-gcc.mak %patch6 -p1 -b .lx7000 %patch12 -p1 -b .bmp16m %patch13 -p1 -b .gcc296 %if %{enable_japanese} %patch20 -p0 %endif %patch21 -p0 rm -rf tmp ln -s unix-gcc.mak Makefile %build # Ugly workaround for a bug in the dj850 driver... mkdir obj make obj/arch.h ln -s obj/arch.h . make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" gdevcd8.o mv gdevcd8.o obj %ifarch alpha make RPM_OPT_FLAGS="" prefix=/usr %else make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=/usr %endif %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/{bin,man,doc} make install prefix=$RPM_BUILD_ROOT/usr mandir=$RPM_BUILD_ROOT/%{_mandir} ln -sf gs.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/ghostscript.1.gz ln -sf gs $RPM_BUILD_ROOT/usr/bin/ghostscript strip -R .comment $RPM_BUILD_ROOT/usr/bin/gs mkdir ourdocs cp -a $RPM_BUILD_ROOT/usr/doc/ghostscript-%{PACKAGE_VERSION}/* ourdocs/ %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc ourdocs/* /usr/bin/* %dir /usr/share/ghostscript %dir /usr/share/ghostscript/%{PACKAGE_VERSION} /usr/share/ghostscript/%{PACKAGE_VERSION}/*ps /usr/share/ghostscript/%{PACKAGE_VERSION}/*upp %config /usr/share/ghostscript/%{version}/Fontmap /usr/share/ghostscript/%{PACKAGE_VERSION}/examples %{_mandir}/*/* %if %{enable_japanese} /usr/share/ghostscript/5.50/vflib/ %endif %changelog * Fri Sep 1 2000 Mitsuo Hamada - add support JIS B size - fix the problem of reconverting GNUPLOT output * Wed Aug 2 2000 Matt Wilson - rebuilt against new libpng * Wed Aug 2 2000 Bernhard Rosenkraenzer - Fix up the cdj880 patch (Bug #14978) - Fix build with gcc 2.96 * Fri Jul 21 2000 Bill Nottingham - turn off japanese support * Thu Jul 13 2000 Prospector - automatic rebuild * Fri Jul 07 2000 Trond Eivind Glomsrød - fixed the broken inclusion of files in /usr/doc - Build requires freetype-devel * Fri Jun 16 2000 Matt Wilson - build japanese support in main distribution - FHS manpage paths * Sun Mar 26 2000 Chris Ding - enabled bmp16m driver * Thu Mar 23 2000 Matt Wilson - added a boatload of Japanese printers * Thu Mar 16 2000 Matt Wilson - add japanese support, enable_japanese macro * Mon Feb 14 2000 Bernhard Rosenkraenzer - 5.50 at last... - hpdj 2.6 - Added 3rd party drivers: - Lexmark 5700 (lxm5700m) - Alps MD-* (md2k, md5k) - Lexmark 2050, 3200, 5700 and 7000 (lex2050, lex3200, lex5700, lex7000) * Fri Feb 4 2000 Bernhard Rosenkraenzer - rebuild to compress man page - fix gs.1 symlink * Wed Jan 26 2000 Bill Nottingham - add stylus 740 uniprint files * Thu Jan 13 2000 Preston Brown - add lq850 dot matrix driver (#6357) * Thu Oct 28 1999 Bill Nottingham - oops, include oki182 driver. * Tue Aug 24 1999 Bill Nottingham - don't optimize on Alpha. This way it works. * Thu Jul 29 1999 Michael K. Johnson - added hpdj driver - changed build to use tar_cat so adding new drivers is sane * Thu Jul 1 1999 Bill Nottingham - add OkiPage 4w+, HP 8xx drivers * Mon Apr 5 1999 Bill Nottingham - fix typo in config patch. * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 6) * Mon Mar 15 1999 Cristian Gafton - added patch from rth to fix alignement problems on the alpha. * Wed Feb 24 1999 Preston Brown - Injected new description and group. * Mon Feb 08 1999 Bill Nottingham - add uniprint .upp files * Sat Feb 06 1999 Preston Brown - fontpath update. * Wed Dec 23 1998 Preston Brown - updates for ghostscript 5.10 * Fri Nov 13 1998 Preston Brown - updated to use shared urw-fonts package. * Mon Nov 09 1998 Preston Brown - turned on truetype (ttf) font support. * Thu Jul 2 1998 Jeff Johnson - updated to 4.03. * Tue May 05 1998 Cristian Gafton - enabled more printer drivers - buildroot * Mon Apr 27 1998 Prospector System - translations modified for de, fr, tr * Mon Mar 03 1997 Erik Troan - Made /usr/share/ghostscript/3.33/Fontmap a config file.