# $Id: Portfile 47030 2009-02-20 06:52:28Z jeremyhu@macports.org $ PortSystem 1.0 name xpdf version 3.02 revision 4 description Xpdf is a viewer for PDF files. long_description \ Xpdf is a viewer for Portable Document Format \ (PDF) files. These are also sometimes also called \ Acrobat files, from the name of Adobes PDF software. maintainers ricci openmaintainer categories graphics print platforms darwin homepage http://www.foolabs.com/xpdf/ master_sites \ ftp://ftp.funet.fi/pub/TeX/CTAN/support/xpdf/ \ ftp://ctan.unsw.edu.au/tex-archive/support/xpdf/ \ ftp://ftp.tex.ac.uk/tex-archive/support/xpdf/ \ ftp://ftp.kddlabs.co.jp/CTAN/support/xpdf/ \ ftp://ftp.meiji.ac.jp/pub/TeX/CTAN/support/xpdf/ \ ftp://ctan.tug.org/tex-archive/support/xpdf/ \ ftp://ftp.dante.de/tex-archive/support/xpdf/ \ ftp://gd.tuwien.ac.at/publishing/tex/CTAN/support/xpdf/ \ ftp://ftp.ntnu.no/pub/tex/CTAN/support/xpdf/ \ ftp://www.dnsbalance.ring.gr.jp/pub/text/CTAN/support/xpdf/ \ http://www.t.ring.gr.jp/archives/text/CTAN/support/xpdf/ \ ftp://ftp.chg.ru/pub/TeX/CTAN/support/xpdf/ \ ftp://ftp.foolabs.com/pub/xpdf/ ## checksums md5 599dc4cc65a07ee868cf92a667a913d2 set xpdfmain ${distname}${extract.suffix} distfiles ${xpdfmain} \ xpdf-3.02pl1.patch \ xpdf-3.02pl2.patch checksums ${xpdfmain} md5 599dc4cc65a07ee868cf92a667a913d2 \ xpdf-3.02pl1.patch 877118786dfe27d1b7aa5a6759cc6e45 \ xpdf-3.02pl2.patch 3a5cb165ae66781e0b21e6219ae06795 extract.only ${xpdfmain} depends_lib port:xorg-libs lib:libfreetype.6:freetype \ port:libpaper lib:libXm:openmotif port:t1lib depends_run path:share/ghostscript/fonts:ghostscript port:poppler patchfiles xpdf-3.02-salvage-your-eye.patch \ patch-xpdf-NameToUnicodeTable.h.diff \ patch-xpdf-UnicodeMapTables.h.diff pre-patch { system "cd ${workpath} && patch -p0 < ${distpath}/xpdf-3.02pl1.patch" system "cd ${workpath} && patch -p0 < ${distpath}/xpdf-3.02pl2.patch" } post-patch { reinplace "s|/usr/local|${prefix}|g" \ ${worksrcpath}/doc/sample-xpdfrc ${worksrcpath}/xpdf/GlobalParams.cc } configure.args \ --with-x \ --mandir=${prefix}/share/man \ --with-appdef-dir=${prefix}/etc/X11/app-defaults \ --with-Xp-library=${prefix}/lib \ --with-Xp-includes=${prefix}/include \ --with-Xt-library=${prefix}/lib \ --with-Xt-includes=${prefix}/include \ --with-Xm-library=${prefix}/lib \ --with-Xm-includes=${prefix}/include \ --with-t1-library=${prefix}/lib \ --with-t1-includes=${prefix}/include \ --with-libpaper-library=${prefix}/lib \ --with-libpaper-includes=${prefix}/include \ --with-freetype2-library=${prefix}/lib \ --with-freetype2-includes=${prefix}/include/freetype2 \ --enable-wordlist \ --enable-opi configure.cxxflags-append "-I${prefix}/include/freetype2 -I${prefix}/include" configure.cflags-append "-I${x11prefix}/include" configure.cppflags-append "-I${x11prefix}/include" configure.ldflags-append "-lz" variant a4 description {Use A4 as the default paper size instead of Letter} { configure.args-append --enable-a4-paper } variant with_poppler description {Add Poppler support} { depends_run-append port:poppler post-destroot { foreach i { pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext } { delete ${destroot}${prefix}/bin/${i} delete ${destroot}${prefix}/share/man/man1/${i}.1 } } } platform puredarwin { depends_lib-delete lib:libXm:openmotif depends_lib-append port:lesstif configure.args-delete \ --with-Xp-library=${prefix}/lib \ --with-Xp-includes=${prefix}/include \ --with-Xt-library=${prefix}/lib \ --with-Xt-includes=${prefix}/include \ --with-Xm-library=${prefix}/lib \ --with-Xm-includes=${prefix}/include } variant drm description {Obey access restrictions in PDF files} { patchfiles-delete xpdf-3.02-salvage-your-eye.patch } post-install { ui_msg " \ Xpdf language support packages are also available at \ http://www.foolabs.com/xpdf/download.html" }