# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
set branch [join [lrange [split ${version} .] 0 1] .]
# There was a stealth-update of vtkdata-5.10.1 that invalidated the checksums
# (see https://trac.macports.org/wiki/PortfileRecipes#stealth-updates)
# Remove the 'dist_subdir' line when the next proper version of vtk5 is
dist_subdir ${name}/${version}_1
categories graphics devel
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/
master_sites http://www.vtk.org/files/release/${branch}/
distfiles vtk-${version}${extract.suffix}
checksums vtk-${version}${extract.suffix} \
md5 264b0052e65bd6571a84727113508789 \
sha1 deb834f46b3f7fc3e122ddff45e2354d69d2adc3 \
rmd160 3b0b138bf45743e925a905fb2eccb6b3ab3dada4
depends_build-append port:readline
patchfiles patch-tiff-inline.diff legacy.patch
# Xcode 5.1 breaks vtk build. A backwards compatible fix is to remove
# -fobjc-gc; see http://review.source.kitware.com/#/c/14424/
reinplace -W ${worksrcpath} "s,-fobjc-gc,,g" CMakeLists.txt
-DBUILD_SHARED_LIBS:BOOL=ON \
-DVTK_USE_RPATH:BOOL=ON \
-DCMAKE_INSTALL_RPATH:STRING=${prefix}/lib/vtk-${branch} \
-DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk-${branch} \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
-DVTK_INSTALL_PREFIX:PATH=${prefix} \
-DVTK_USE_HYBRID:BOOL=ON \
-DVTK_WRAP_TCL:BOOL=OFF \
-DTK_INCLUDE_PATH=${prefix}/include \
-DTK_LIBRARY=${prefix}/lib/libtk.dylib \
-DVTK_USE_CARBON:BOOL=OFF \