# $Id$ PortSystem 1.0 name ghostscript version 8.63 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-std-8.11.tar.gz:fonts \ ghostscript-fonts-other-6.0.tar.gz:fonts patchfiles patch-src_macos-fw.mak.diff \ patch-src_macosx.mak.diff \ patch-src_unix-aux.mak.diff checksums ${distname}.tar.gz md5 b22e689b237a6594d1ca408f2b55a891 \ ghostscript-fonts-std-8.11.tar.gz md5 6865682b095f8c4500c54b285ff05ef6 \ ghostscript-fonts-other-6.0.tar.gz md5 1a643ae62ef166562e4d422b1a601272 depends_lib lib:libXext.6:xorg-libXext \ lib:libXt.6:xorg-libXt \ path:lib/pkgconfig/cairo.pc:cairo \ port:expat \ port:fontconfig \ port:libiconv \ port:zlib \ path:bin/perl:perl5.8 depends_build port:pkgconfig \ port:autoconf # Can be removed once MacPorts 1.7.0 is released if {![info exists frameworks_dir]} { set frameworks_dir ${prefix}/Library/Frameworks } post-patch { foreach f {src/macosx.mak src/macos-fw.mak} { reinplace "s|@@DESTROOT@@|${destroot}|" ${worksrcpath}/${f} reinplace "s|@@FRAMEWORKS_DIR@@|${frameworks_dir}|" ${worksrcpath}/${f} } # Ensure that MacPorts perl is used foreach f {lib/fixmswrd.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 *.pfb *.pfm fonts.dir fonts.scale} { eval xinstall -m 644 [glob ${workpath}/fonts/${f}] ${destroot}${prefix}/share/${name}/fonts } xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}-fonts xinstall -m 644 -W ${workpath}/fonts COPYING ChangeLog README README.tweaks TODO ${destroot}${prefix}/share/doc/${name}-fonts ln -s ../${name}/${version}/doc ${destroot}${prefix}/share/doc/${name} } livecheck.distname GPL Ghostscript universal_variant no 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 } # Added variant that build the Ghostscript framework. (Thanks, Sal!) variant framework description {Build and install Ghostscript.framework} { post-build { move ${worksrcpath}/Makefile ${worksrcpath}/Makefile.CONFIGURE ln -s ${worksrcpath}/src/macosx.mak ${worksrcpath}/Makefile system "cd ${worksrcpath} && make framework" delete ${worksrcpath}/Makefile move ${worksrcpath}/Makefile.CONFIGURE ${worksrcpath}/Makefile } post-destroot { xinstall -m 755 -d ${destroot}${prefix}/Library/Frameworks move ${worksrcpath}/Makefile ${worksrcpath}/Makefile.CONFIGURE ln -s ${worksrcpath}/src/macosx.mak ${worksrcpath}/Makefile system "cd ${worksrcpath} && make framework_install" delete ${worksrcpath}/Makefile move ${worksrcpath}/Makefile.CONFIGURE ${worksrcpath}/Makefile } }