# $Id: Portfile 64763 2010-03-15 16:31:33Z nox@macports.org $

PortSystem 1.0

name			xfig
version			3.2.5
revision		8
categories		graphics x11
maintainers		nomaintainer
description		Facility for Interactive Generation of figures under X11
long_description	\
				Xfig is a menu-driven tool that allows the user to draw and \
				manipulate objects interactively in an X window.  The \
				resulting pictures can be saved, printed on PostScript \
				printers or converted to a variety of other formats (e.g. to \
				allow inclusion in LaTeX documents).
homepage		http://xfig.org/
platforms		darwin
master_sites	sourceforge:mcj
distname		${name}.${version}
distfiles		${distname}.full${extract.suffix}
checksums		md5 fae0c67a3951bd41c057deb63b6aa47a \
				sha1 ce09d1a74dbddf0bc6b20fe9c558db584fbfed17 \
				rmd160 0d5ada9e4b7f1dbd8dab8a09fd5946ec0211904c
depends_lib		port:Xaw3d \
				port:libpng \
				port:jpeg \
				port:zlib
depends_run		bin:gs:ghostscript \
				bin:fig2dev:transfig
use_xmkmf		yes
xmkmf.args-append	\
				-DUseSeparateConfDir=NO -DBuildHtmlManPages=NO
patchfiles		patch-Imakefile \
				patch-fig.h \
                patch-f_util.c \
				patch-w_keyboard.c \
                patch-w_library.c

post-patch {
	reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/Imakefile
	reinplace "s|__DESTROOT|${destroot}|g" ${worksrcpath}/Imakefile
}
destroot.target	install.all install.man

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