# $Id: Portfile,v 1.11 2006/07/22 04:30:31 pguyot Exp $

PortSystem		1.0
name			xfig
version			3.2.4
revision		5
categories		graphics x11
maintainers		pguyot@kallisys.net
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	http://xfig.org/software/xfig/3.2.4/ \
				ftp://www-epb.lbl.gov/xfig/
distname		${name}.${version}
distfiles		${distname}.full${extract.suffix}
checksums		${distname}.full${extract.suffix} \
					md5 1911fc0f733cb2f40336a8d0e82513de \
					sha1 723bf10355a92c079be08cd7be18b75baaccfbdc \
					rmd160 3cae7c8d3f2a89ef54fd4a4693e84fa7a9bacf44 \
				xfig-3.2.4-Xaw3d-1.5E.udiff \
					md5 d7585496ec07b42f03fce98b432ac22e \
					sha1 8516f66602b11f55b0aa23049ca4c3af60ca7cca \
					rmd160 0ddc33554a8f327e8367a45eddc7ec506838001c
depends_lib		lib:libXaw3d:Xaw3d \
				lib:libpng:libpng \
				lib:libjpeg:jpeg
depends_run		bin:gs:ghostscript \
				bin:fig2dev:transfig
use_xmkmf		yes
patch_sites		ftp://ftp.visi.com/users/hawkeyd/X/
patchfiles		xfig-3.2.4-Xaw3d-1.5E.udiff \
				patch-Imakefile \
				patch-u_fonts.h
post-patch {
	reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/Imakefile
	reinplace "s|__DESTROOT|${destroot}|g" ${worksrcpath}/Imakefile
}
destroot.target	install.all install.man
post-destroot {
	# Remove the /usr/X11R6/lib/X11/app-defaults symlink
	# (this could be done by handling symlinks better on images)
	file delete "${destroot}/usr/X11R6/lib/X11/app-defaults"
}
