# $Id: Portfile,v 1.3 2003/04/01 13:04:25 jkh Exp $

PortSystem 1.0
name		VTK
version		4.2.1
categories	graphics
maintainers	jkh@opendarwin.org
description	3D visualization toolkit
long_description  an open source, freely available software system for 3D computer graphics, image processing, and visualization used by thousands of researchers and developers around the world. VTK consists of a C++ class library, and several interpreted interface layers including Tcl/Tk, Java, and Python.
homepage	http://www.vtk.org/
platforms	darwin freebsd
master_sites	http://www.vtk.org/files/release/4.2/
checksums	md5 a30fae7b969a11584517d28a937cb70a

depends_build	bin:cmake:cmake

configure	{ system "cd ${worksrcpath} && cmake" }

post-configure	{
	reinplace "s;BUILD_SHARED_LIBS:BOOL=.*;BUILD_SHARED_LIBS:BOOL=ON;" ${worksrcpath}/CMakeCache.txt
	reinplace "s;CMAKE_INSTALL_PREFIX:PATH=.*;CMAKE_INSTALL_PREFIX:PATH=${prefix};" ${worksrcpath}/CMakeCache.txt
	reinplace "s;VTK_USE_CARBON:BOOL=.*;VTK_USE_CARBON:BOOL=OFF;" ${worksrcpath}/CMakeCache.txt
	reinplace "s;VTK_USE_COCOA:BOOL=.*;VTK_USE_COCOA:BOOL=ON;" ${worksrcpath}/CMakeCache.txt
}

variant devel {
	version 4.3
	fetch.type	cvs
	cvs.root	 :pserver:anonymous@public.kitware.com:/cvsroot/VTK
	cvs.module	VTK
	cvs.password	VTK
}
