# $Header: /magellan-cvs/smage/xpdf/xpdf-3.02-r2.smage2,v 1.1 2008/03/24 14:25:05 niro Exp $ PNAME="xpdf" PVER="3.02" PBUILD="r2" PCATEGORIE="app-text" STATE="unstable" DESCRIPTION="Xpdf is an open source viewer for Portable Document Format (PDF) files." HOMEPAGE="http://www.foolabs.com/xpdf/" sminclude xorg DEPEND=">= x11-libs/libX11-1 >= x11-libs/libXpm-3.5 >= media-libs/freetype-2 >= x11-libs/lesstif-0.95 >= app-text/ghostscript-esp-8.15 >= media-libs/t1lib-5.1.0" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" SRC_URI=( ftp://ftp.foolabs.com/pub/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-3.00-gcc41.patch mirror://${PNAME}/${PNAME}-3.01-crash.patch mirror://${PNAME}/${PNAME}-3.01-pdftoppm.patch mirror://${PNAME}/${PNAME}-${PVER}pl1.patch mirror://${PNAME}/${PNAME}-${PVER}pl2.patch ) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} mpatch ${PNAME}-3.00-gcc41.patch || die mpatch ${PNAME}-3.01-crash.patch || die mpatch ${PNAME}-3.01-pdftoppm.patch || die # security fix - CVE-2007-3387 mpatch ${PNAME}-${PVER}pl1.patch || die # more security fixes mpatch ${PNAME}-${PVER}pl2.patch || die # rebuild makefiles autoconf || die } src_compile() { cd ${SRCDIR} mconfigure \ --enable-freetype2 \ --with-freetype2-includes=/usr/include/freetype2 \ --enable-opi \ --enable-multithreaded \ --with-t1-library \ || die mmake || die } src_install() { cd ${SRCDIR} # needed directories install -d ${BINDIR}/etc || die make DESTDIR=${BINDIR} install || die minstalldocs ANNOUNCE CHANGES COPYING README || die cat > ${BINDIR}/etc/xpdfrc << "EOF" displayFontT1 Times-Roman /usr/share/ghostscript/fonts/n021003l.pfb displayFontT1 Times-Italic /usr/share/ghostscript/fonts/n021023l.pfb displayFontT1 Times-Bold /usr/share/ghostscript/fonts/n021004l.pfb displayFontT1 Times-BoldItalic /usr/share/ghostscript/fonts/n021024l.pfb displayFontT1 Helvetica /usr/share/ghostscript/fonts/n019003l.pfb displayFontT1 Helvetica-Oblique /usr/share/ghostscript/fonts/n019023l.pfb displayFontT1 Helvetica-Bold /usr/share/ghostscript/fonts/n019004l.pfb displayFontT1 Helvetica-BoldOblique /usr/share/ghostscript/fonts/n019024l.pfb displayFontT1 Courier /usr/share/ghostscript/fonts/n022003l.pfb displayFontT1 Courier-Oblique /usr/share/ghostscript/fonts/n022023l.pfb displayFontT1 Courier-Bold /usr/share/ghostscript/fonts/n022004l.pfb displayFontT1 Courier-BoldOblique /usr/share/ghostscript/fonts/n022024l.pfb displayFontT1 Symbol /usr/share/ghostscript/fonts/s050000l.pfb displayFontT1 ZapfDingbats /usr/share/ghostscript/fonts/d050000l.pfb #fontDir /usr/share/fonts/TTF # #psFile "|lpr" #psPaperSize letter #textEOL unix # #enableT1lib no #enableFreeType yes #antialias yes # #urlCommand "links -g %s" EOF }