# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $

PortSystem			1.0
name				transfig
version				3.2.5
revision			2

description			Tools to convert Xfig's .fig files
long_description	TransFig is a set of tools for creating TeX documents \
					with graphics which are portable, in the sense that they \
					can be printed in a wide variety of environments. \
					Drivers currently exist for the following graphics \
					languages: (E)EPIC macros, LaTeX picture environment, PIC, \
					PiCTeX, PostScript, and TeXtyl.
platforms			darwin
categories			print graphics
maintainers			kallisys.net:pguyot openmaintainer
homepage			http://xfig.org/
master_sites		http://xfig.org/software/xfig/3.2.5/ \
					ftp://www-epb.lbl.gov/xfig/
distname			${name}.${version}
distfiles			${distname}${extract.suffix}
checksums			md5 3b2cffdd25529ae5877e305f29aae6d1 \
					sha1 2657c104d0099dcb4565a8762a9543310e55e767 \
					rmd160 435615bded662225127ea564fc746e9cb0058f18
depends_lib			lib:libpng:libpng
depends_run			bin:ppmtogif:netpbm
depends_build		path:bin/xmkmf:imake
use_xmkmf			yes
patchfiles			patch-fig2dev-dev-Imakefile \
					patch-fig2dev-Imakefile \
					patch-transfig-Imakefile
post-patch {
	reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/fig2dev/Imakefile
	reinplace "s|__DESTROOT|${destroot}|g" ${worksrcpath}/fig2dev/Imakefile
	reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/fig2dev/dev/Imakefile
	reinplace "s|__DESTROOT|${destroot}|g" ${worksrcpath}/fig2dev/dev/Imakefile
	reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/transfig/Imakefile
	reinplace "s|__DESTROOT|${destroot}|g" ${worksrcpath}/transfig/Imakefile
}
destroot.target		install install.man

livecheck.check	regex
livecheck.regex	{>Xfig/Transfig (.*) Download</a>}
