--- Portfile.orig	2009-10-02 18:37:02.000000000 +0200
+++ Portfile	2010-08-13 14:51:39.000000000 +0200
@@ -4,8 +4,8 @@
 PortSystem 1.0
 
 name        vtk5
-version     5.2.1
-revision    2
+version     5.6.0
+revision    0
 set branch  [join [lrange [split ${version} .] 0 1] .]
 categories  graphics devel
 maintainers nomaintainer
@@ -16,26 +16,28 @@
     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/${branch}/
-checksums vtk-${version}.tar.gz md5 d59520d5f6c49c8b4e3b9227e341b19f \
-          vtk-${version}.tar.gz sha1 e08ee5c9d738c2fe774fdb3111818b9899a7b751 \
-          vtk-${version}.tar.gz rmd160 c6cdee0c76e243d21d802690f138faab1c6eb863\
-      vtkdata-${version}.tar.gz md5 3cd99917ab1ec3ef369dd40db74b93b1 \
-      vtkdata-${version}.tar.gz sha1 a625f4934d0fbaad2242ae2bc920084775438933 \
-      vtkdata-${version}.tar.gz rmd160 5628fec27673d99426922dcd32b8d66a0d86c9ec
+homepage            http://www.vtk.org/
+platforms           darwin freebsd
+master_sites        http://www.vtk.org/files/release/${branch}/
+checksums           vtk-${version}.tar.gz \
+                    md5     a56232baae6071f9f59f138d8f4620c2 \
+                    sha1    355209c485304f1b0feefcda3585d45217ffd230 \
+                    rmd160  b7abf3b9bb14a3db81608c7aa2721935ae653295 \
+                    vtkdata-${version}.tar.gz \
+                    md5     97006362d7d67dc01289daf3e4ec4e38 \
+                    sha1    e0aa26dafd653da1db21fc97ce15aa0599d9c5ad \
+                    rmd160  8499816f6d714408c0f7f584fb4d781f4426e444
 
 depends_build   bin:cmake:cmake \
-        port:readline
+                port:readline
 distfiles   vtk-${version}.tar.gz \
-        vtkdata-${version}.tar.gz
+            vtkdata-${version}.tar.gz
 distname    VTK
 
 use_parallel_build yes
 
 post-extract {
-    delete ${worksrcpath}/Utilities/vtktiff/tif_fax3sm.c
+   delete ${worksrcpath}/Utilities/vtktiff/tif_fax3sm.c
 }
 
 configure   { system "cd ${worksrcpath} && ${configure.env} cmake ${configure.args} ${worksrcpath}" }
@@ -43,8 +45,8 @@
         -DBUILD_SHARED_LIBS:BOOL=ON \
         -DVTK_USE_RPATH:BOOL=ON \
         -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-        -DCMAKE_INSTALL_RPATH:STRING=${prefix}/lib/vtk-5.2 \
-        -DCMAKE_INSTALL_NAME_DIR:STRING=${prefix}/lib/vtk-5.2 \
+        -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 \
         -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
         -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
@@ -143,6 +145,7 @@
         -DVTK_INSTALL_NO_PYTHON:BOOL=ON
 }
 
+variant data description {install data and examples} {}
 
 set vtkdest ${destroot}${prefix}/share/doc/${name}
 
@@ -156,16 +159,18 @@
         system "cd ${worksrcpath}/Wrapping/Python; ${prefix}/bin/python2.6 setup.py install --prefix=${frameworks_dir}/Python.framework/Versions/2.6/ --root=${destroot}"
     }
 
-    xinstall -d -m 0755 ${vtkdest}
-    file copy ${worksrcpath}/README.html ${vtkdest}
-    file copy ${worksrcpath}/Copyright.txt ${vtkdest}
-    file copy ${worksrcpath}/Testing.txt ${vtkdest}
-
-    # Provide some examples
-    file copy ${worksrcpath}/Examples ${vtkdest}
-    foreach x {CommonCxxTests FilteringCxxTests GenericFilteringCxxTests GraphicsCxxTests IOCxxTests} { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples }
-    foreach x {ImagingCxxTests RenderingCxxTests TestCxxFeatures TestInstantiator VTKBenchMark VolumeRenderingCxxTests WidgetsCxxTests} { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples }
+    if {[variant_isset data]} {
+        xinstall -d -m 0755 ${vtkdest}
+        file copy ${worksrcpath}/README.html ${vtkdest}
+        file copy ${worksrcpath}/Copyright.txt ${vtkdest}
+        file copy ${worksrcpath}/Testing.txt ${vtkdest}
+
+        # Provide some examples
+        file copy ${worksrcpath}/Examples ${vtkdest}
+        foreach x {CommonCxxTests FilteringCxxTests GenericFilteringCxxTests GraphicsCxxTests IOCxxTests} { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples }
+        foreach x {ImagingCxxTests RenderingCxxTests TestCxxFeatures TestInstantiator VTKBenchMark VolumeRenderingCxxTests WidgetsCxxTests} { file copy ${worksrcpath}/bin/$x ${vtkdest}/Examples }
 
-    # Provide data files
-    system "tar -C ${destroot}${prefix}/share -xzvf ${distpath}/vtkdata-${version}.tar.gz"
+        # Provide data files
+        system "tar -C ${destroot}${prefix}/share -xzvf ${distpath}/vtkdata-${version}.tar.gz"
+    }
 }
