# $Id: Portfile 56056 2009-08-23 23:04:27Z ryandesign@macports.org $

PortSystem              1.0

name                    fig2ps
version                 1.3.6
categories              graphics tex
maintainers             vcn.com:jjstickel
platforms               darwin
homepage                http://fig2ps.sourceforge.net/
master_sites            sourceforge
use_configure           no

description             converts xfig files to PostScript or PDF, processing text with LaTeX

long_description \
		 fig2ps is a perl script which converts xfig files to PostScript or\
		 PDF, processing text with LaTeX. Its primary aim is to produce\
		 documents (such as articles) with a high quality, in which the\
		 pictures are seamlessly integrated with the text (notably, the font in\
		 the figures is exactly the same as in the text).

checksums \
    md5 ad8156d5177d76bbfb9b84ea3f403453 \
    sha1 6184054e3ed8b460db0f15f07400c66d8dbd7254

depends_run	path:bin/perl:perl5 \
		port:ghostscript \
		port:transfig \
		bin:latex:texlive

post-extract {
    reinplace "s|\$(DESTDIR)/usr|${destroot}${prefix}|" ${worksrcpath}/Makefile
    reinplace "s|\$(DESTDIR)|${destroot}${prefix}|" ${worksrcpath}/Makefile
    reinplace "s|usr/||" ${worksrcpath}/dirs
    reinplace "s|/etc|${prefix}/etc|" ${worksrcpath}/bin/fig2ps
}

build {}
