# $Id$ PortSystem 1.0 name ghostscript version 8.64 revision 3 categories print maintainers takanori openmaintainer description GPL Ghostscript, An interpreter for PostScript and PDF long_description \ Ghostscript is the well-known PostScript interpreter which \ is available for all common and most esoteric platforms and \ supports many different printers and some displays. platforms darwin homepage http://www.cs.wisc.edu/~ghost/ master_sites sourceforge:${name}:source \ sourceforge:gs-fonts:fonts distfiles ${distname}.tar.gz:source \ ghostscript-fonts-other-6.0.tar.gz:fonts patchfiles patch-base_macos-fw.mak.diff \ patch-base_macosx.mak.diff \ patch-base_gdevbit.c.diff \ CVE-2009-0196.diff \ CVE-2009-0583,0584,0792.diff checksums ${distname}.tar.gz rmd160 c0d5ab9a35cbc7311708ab91f0a4c47e332db121 \ ghostscript-fonts-other-6.0.tar.gz rmd160 ab60dbf71e7d91283a106c3df381cadfe173082f depends_lib port:xorg-libXext \ port:xorg-libXt \ path:lib/pkgconfig/cairo.pc:cairo \ port:expat \ port:fontconfig \ port:libiconv \ port:zlib \ path:bin/perl:perl5 depends_build port:pkgconfig \ port:autoconf post-patch { foreach f {base/macosx.mak base/macos-fw.mak} { reinplace "s|@@FRAMEWORKS_DIR@@|${frameworks_dir}|" ${worksrcpath}/${f} } # Ensure that MacPorts perl is used foreach f {lib/fixmswrd.pl toolbin/bugsByEngineer.pl toolbin/pscet_status.pl} { reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|" ${worksrcpath}/${f} } } use_autoconf yes autoconf.cmd autoreconf autoconf.args -fvi # Make included JasPer uses its own headers rather than the system ones configure.cppflags-delete "-I${prefix}/include" configure.cppflags-append "-isystem${prefix}/include" configure.args --disable-compile-inits \ --disable-cups build.target use_parallel_build no post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/${name}/fonts foreach f {*.afm *.gsf *.pfa *.pfm} { eval xinstall -m 644 [glob ${workpath}/fonts/${f}] ${destroot}${prefix}/share/${name}/fonts } xinstall -m 755 -d ${destroot}${prefix}/share/doc ln -s ../${name}/${version}/doc ${destroot}${prefix}/share/doc/${name} xinstall -m 755 -d ${destroot}${prefix}/share/${name}/${version}/examples/cjk eval xinstall -m 644 [glob ${worksrcpath}/examples/cjk/*.ps] ${destroot}${prefix}/share/${name}/${version}/examples/cjk } livecheck.distname GPL Ghostscript universal_variant no variant no_x11 { depends_lib-delete port:xorg-libXext depends_lib-delete port:xorg-libXt configure.args-append --without-x } variant cups description {Enable cups support} { configure.args-delete --disable-cups configure.args-append --enable-cups # Informing user enable cups will install files outside of the common directory structure destroot.violate_mtree yes } variant framework description {Build and install Ghostscript.framework} { post-build { move ${worksrcpath}/Makefile ${worksrcpath}/Makefile.CONFIGURE ln -s ${worksrcpath}/base/macosx.mak ${worksrcpath}/Makefile system "cd ${worksrcpath} && make framework" delete ${worksrcpath}/Makefile move ${worksrcpath}/Makefile.CONFIGURE ${worksrcpath}/Makefile # COMPILE_INITS=0 #copy ${worksrcpath}/Resource ${worksrcpath}/sobin/Ghostscript.framework/Versions/${version}/Resources #copy ${workpath}/fonts ${worksrcpath}/sobin/Ghostscript.framework/Resources } post-destroot { xinstall -m 755 -d ${destroot}${prefix}/Library/Frameworks copy ${worksrcpath}/sobin/Ghostscript.framework ${destroot}${prefix}/Library/Frameworks } }