summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/vtk
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/vtk')
-rw-r--r--sci-libs/vtk/Manifest6
-rw-r--r--sci-libs/vtk/files/vtk-5.10.1-ffmpeg-1.patch49
-rw-r--r--sci-libs/vtk/files/vtk-5.10.1-libav-9.patch117
-rw-r--r--sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch57
-rw-r--r--sci-libs/vtk/files/vtk-5.2.0-tcl-install.patch12
-rw-r--r--sci-libs/vtk/files/vtk-5.4.2-boost-property_map.patch194
-rw-r--r--sci-libs/vtk/files/vtk-5.4.2-cg-path.patch35
-rw-r--r--sci-libs/vtk/files/vtk-5.4.2-libpng14.patch20
-rw-r--r--sci-libs/vtk/files/vtk-5.6.0-R.patch57
-rw-r--r--sci-libs/vtk/files/vtk-5.6.0-boost-property_map.patch13
-rw-r--r--sci-libs/vtk/files/vtk-5.6.0-cg-path.patch36
-rw-r--r--sci-libs/vtk/files/vtk-5.6.0-ffmpeg.patch42
-rw-r--r--sci-libs/vtk/files/vtk-5.6.0-libpng14.patch22
-rw-r--r--sci-libs/vtk/files/vtk-5.6.0-odbc.patch12
-rw-r--r--sci-libs/vtk/files/vtk-5.6.1-ffmpeg.patch42
-rw-r--r--sci-libs/vtk/files/vtk-5.6.1-gcc-46.patch29
-rw-r--r--sci-libs/vtk/files/vtk-5.6.1-libav-0.8.patch66
-rw-r--r--sci-libs/vtk/files/vtk-5.6.1-libpng15.patch22
-rw-r--r--sci-libs/vtk/files/vtk-5.8.0-R.patch45
-rw-r--r--sci-libs/vtk/files/vtk-5.8.0-boost.patch39
-rw-r--r--sci-libs/vtk/files/vtk-6.0.0-cg-path.patch16
-rw-r--r--sci-libs/vtk/files/vtk-6.0.0-install.patch19
-rw-r--r--sci-libs/vtk/files/vtk-6.0.0-netcdf.patch75
-rw-r--r--sci-libs/vtk/files/vtk-6.0.0-system.patch27
-rw-r--r--sci-libs/vtk/files/vtk-6.0.0-vtkpython.patch12
-rw-r--r--sci-libs/vtk/files/vtk-6.1.0-freetype.patch22
-rw-r--r--sci-libs/vtk/files/vtk-6.1.0-glext.patch13
-rw-r--r--sci-libs/vtk/files/vtk-6.1.0-install.patch19
-rw-r--r--sci-libs/vtk/files/vtk-6.1.0-memset.patch147
-rw-r--r--sci-libs/vtk/files/vtk-6.1.0-netcdf.patch29
-rw-r--r--sci-libs/vtk/files/vtk-6.1.0-system.patch27
-rw-r--r--sci-libs/vtk/files/vtk-6.1.0-web.patch25
-rw-r--r--sci-libs/vtk/metadata.xml26
-rw-r--r--sci-libs/vtk/vtk-6.0.0.ebuild323
-rw-r--r--sci-libs/vtk/vtk-6.1.0-r1.ebuild389
-rw-r--r--sci-libs/vtk/vtk-6.1.0.ebuild379
36 files changed, 2463 insertions, 0 deletions
diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
new file mode 100644
index 000000000000..9e64a2fff0be
--- /dev/null
+++ b/sci-libs/vtk/Manifest
@@ -0,0 +1,6 @@
+DIST VTK-6.1.0.tar.gz 27608882 SHA256 bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34 SHA512 3ab922166502348e5cdd68e14dbf4717c0405c9d8881c04aa8be8f95d8516af39cd02aaca5171c6de8af1b462ca386399b7a87a843ec62999f0f32c11788a2dc WHIRLPOOL e387390efdc8cd2e413524794786369ba8a2bfe788913dfb161b82d9bc041e15ed5585286bebe38f955d1def3043481303d3bc74c648bbf5bf856e212ac9950c
+DIST VTKData-6.1.0.tar.gz 94452190 SHA256 aba27ac05d721e36b9424131f1d0f673448f2b31aac34e9e74590fdf208ad0c7 SHA512 4e23cc3de3b81a852458849f2bd4dfe2e84e9df4f77f5f0d4ac249b04a7f74144a483a91876bd748bb90685d1943071e9b36fce8dd618376621bc37e63365e65 WHIRLPOOL 1ee803055e3bbf0c8150807a77efce81406c8a512c40644c5ccc35279cb1098bb8f0382b5f2bb01f483c8a38a4e81ee70ed39145c52b4375a0545919faee2a28
+DIST VTKLargeData-6.1.0.tar.gz 166019220 SHA256 d8985508ff2b7fbfbae0aadedfbe2b293640cf6441d3cce41da5c3f591c96d4c SHA512 3663a124c16448882ad3aef0fb15f55f438863ba2176106803ad9c6fb561325accd74f2675d8b6e1de791babfa8b992e516d87640efedda4a6daeb5affc2cf3f WHIRLPOOL db62af365a5c1d71b209d21578184ff1ee7a5913aefd7e5729b7dc555bdd20a8f070ed83051387634bf6a9fc1141ab68a291ec0d557602fa5802e3e6020b7ae1
+DIST vtk-6.0.0.tar.gz 24170173 SHA256 426df543cffeacf21154dddcd2a6efbd91a586570a07a0db4c426d3e0acd10e4 SHA512 ac238e2d228df4fc4d324826b8729af9ab3274039d5abf834f013fb4deaddc116ba2b1b24fb93aaf4b1bfc4bb321d19bc05566883cf3db1f982c9650d77583e8 WHIRLPOOL b8619e254f97392dae01b8e2376bd70a07ce21504580d29844fcf1ab5621d85ba12bfd6047b4f90afd2b648d8b6c17e4ce5d789d6e1f84b5a4f847de5ee376b9
+DIST vtkDocHtml-6.0.0.tar.gz 204228463 SHA256 f5324c4c197b0cacd19bf1e5721bb012d753d49526e224d9f2dd7412f34e4434 SHA512 b6d5660f3ae6046c63b22b613cab6822f45f6b30a09522277e32f941c75dc48e8c92abc4d7f02b17e3f4d8e625de6dce7f000acc79e2d588a13d1577c139291a WHIRLPOOL b951c4ee62639c6bada2e02c2fceddbdb730c76d80c61a6ed013d8d9878b78a697158f41f53d68b5d62e4baa1f9ecb88e2437490da7610970622a40ecb14db1f
+DIST vtkDocHtml-6.1.0.tar.gz 230827905 SHA256 e35d0f5b7905e5c827d8daa71ee61b14dc080445efad91f97583a2b9303c1813 SHA512 fcae74a65157d87b39a162facdecbb0ab0a9b95b9f2555ed2b15d635b82034bfc62181eea441caf0b1edbe036b792a8231d409908b943398ce7f662c149d3a60 WHIRLPOOL bc1714223259953a605612c0da124ece60604989458b7de5cf24b37d0f4c339f50c07a13d899f218364e61a35f8e1ace126eda5e83acbc3fe4930b041df0f55d
diff --git a/sci-libs/vtk/files/vtk-5.10.1-ffmpeg-1.patch b/sci-libs/vtk/files/vtk-5.10.1-ffmpeg-1.patch
new file mode 100644
index 000000000000..2cefb12591a5
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.10.1-ffmpeg-1.patch
@@ -0,0 +1,49 @@
+https://bugs.gentoo.org/show_bug.cgi?id=450464
+
+Index: VTK5.10.1/IO/vtkFFMPEGWriter.cxx
+===================================================================
+--- VTK5.10.1.orig/IO/vtkFFMPEGWriter.cxx
++++ VTK5.10.1/IO/vtkFFMPEGWriter.cxx
+@@ -192,13 +192,6 @@ int vtkFFMPEGWriterInternal::Start()
+ c->bit_rate_tolerance = this->Writer->GetBitRateTolerance();
+ }
+
+- //apply the chosen parameters
+- if (av_set_parameters(this->avFormatContext, NULL) < 0)
+- {
+- vtkGenericWarningMacro (<< "Invalid output format parameters." );
+- return 0;
+- }
+-
+ //manufacture a codec with the chosen parameters
+ AVCodec *codec = avcodec_find_encoder(c->codec_id);
+ if (!codec)
+@@ -259,14 +252,17 @@ int vtkFFMPEGWriterInternal::Start()
+
+
+ //Finally, open the file and start it off.
+- if (url_fopen(&this->avFormatContext->pb, this->avFormatContext->filename, URL_WRONLY) < 0)
++ if (avio_open(&this->avFormatContext->pb, this->avFormatContext->filename, AVIO_FLAG_WRITE) < 0)
+ {
+ vtkGenericWarningMacro (<< "Could not open " << this->Writer->GetFileName() << "." );
+ return 0;
+ }
+ this->openedFile = 1;
+
+- av_write_header(this->avFormatContext);
++ if(avformat_write_header(this->avFormatContext, NULL) < 0) {
++ vtkGenericWarningMacro (<< "Failed to write header." );
++ return 0;
++ }
+ return 1;
+ }
+
+@@ -391,7 +387,7 @@ void vtkFFMPEGWriterInternal::End()
+ #ifdef VTK_FFMPEG_OLD_URL_FCLOSE
+ url_fclose(&this->avFormatContext->pb);
+ #else
+- url_fclose(this->avFormatContext->pb);
++ avio_close(this->avFormatContext->pb);
+ #endif
+ this->openedFile = 0;
+ }
diff --git a/sci-libs/vtk/files/vtk-5.10.1-libav-9.patch b/sci-libs/vtk/files/vtk-5.10.1-libav-9.patch
new file mode 100644
index 000000000000..eb7b71c5ec9e
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.10.1-libav-9.patch
@@ -0,0 +1,117 @@
+diff -burN VTK5.10.1.old/IO/vtkFFMPEGWriter.cxx VTK5.10.1/IO/vtkFFMPEGWriter.cxx
+--- VTK5.10.1.old/IO/vtkFFMPEGWriter.cxx 2013-05-25 01:26:52.768954436 +0200
++++ VTK5.10.1/IO/vtkFFMPEGWriter.cxx 2013-05-25 11:13:53.112672449 +0200
+@@ -60,9 +60,6 @@
+
+ AVStream *avStream;
+
+- unsigned char *codecBuf;
+- int codecBufSize;
+-
+ AVFrame *rgbInput;
+ AVFrame *yuvOutput;
+
+@@ -83,7 +80,6 @@
+
+ this->avStream = NULL;
+
+- this->codecBuf = NULL;
+ this->rgbInput = NULL;
+ this->yuvOutput = NULL;
+
+@@ -140,7 +136,7 @@
+ strcpy(this->avFormatContext->filename, this->Writer->GetFileName());
+
+ //create a stream for that file
+- this->avStream = av_new_stream(this->avFormatContext, 0);
++ this->avStream = avformat_new_stream(this->avFormatContext, NULL);
+ if (!this->avStream)
+ {
+ vtkGenericWarningMacro (<< "Could not create video stream.");
+@@ -199,7 +195,7 @@
+ vtkGenericWarningMacro (<< "Codec not found." );
+ return 0;
+ }
+- if (avcodec_open(c, codec) < 0)
++ if (avcodec_open2(c, codec, NULL) < 0)
+ {
+ vtkGenericWarningMacro (<< "Could not open codec.");
+ return 0;
+@@ -207,15 +203,6 @@
+
+ //create buffers for the codec to work with.
+
+- //working compression space
+- this->codecBufSize = 2*c->width*c->height*4; //hopefully this is enough
+- this->codecBuf = new unsigned char[this->codecBufSize];
+- if (!this->codecBuf)
+- {
+- vtkGenericWarningMacro (<< "Could not make codec working space." );
+- return 0;
+- }
+-
+ //for the output of the writer's input...
+ this->rgbInput = avcodec_alloc_frame();
+ if (!this->rgbInput)
+@@ -316,38 +303,24 @@
+ return 0;
+ }
+ #endif
+-
++ AVPacket pkt = { 0 };
++ int got_frame;
+
+ //run the encoder
+- int toAdd = avcodec_encode_video(cc,
+- this->codecBuf,
+- this->codecBufSize,
+- this->yuvOutput);
++ int ret = avcodec_encode_video2(cc,
++ &pkt,
++ this->yuvOutput,
++ &got_frame);
+
+ //dump the compressed result to file
+- if (toAdd)
++ if (got_frame)
+ {
+- //create an avpacket to output the compressed result
+- AVPacket pkt;
+- av_init_packet(&pkt);
+-
+- //to do playback at actual recorded rate, this will need more work
+- pkt.pts = cc->coded_frame->pts;
+- //pkt.dts = ?; not dure what decompression time stamp should be
+- pkt.data = this->codecBuf;
+- pkt.size = toAdd;
+ pkt.stream_index = this->avStream->index;
+- if (cc->coded_frame->key_frame) //treat keyframes well
+- {
+- pkt.flags |= AV_PKT_FLAG_KEY;
+- }
+- pkt.duration = 0; //presentation duration in time_base units or 0 if NA
+- pkt.pos = -1; //byte position in stream or -1 if NA
+
+- toAdd = av_write_frame(this->avFormatContext, &pkt);
++ ret = av_write_frame(this->avFormatContext, &pkt);
+ }
+
+- if (toAdd) //should not have anything left over
++ if (ret < 0) //should not have anything left over
+ {
+ vtkGenericWarningMacro (<< "Problem encoding frame." );
+ return 0;
+@@ -373,12 +346,6 @@
+ this->rgbInput = NULL;
+ }
+
+- if (this->codecBuf)
+- {
+- av_free(this->codecBuf);
+- this->codecBuf = NULL;
+- }
+-
+ if (this->avFormatContext)
+ {
+ if (this->openedFile)
+Binary files VTK5.10.1.old/IO/.vtkFFMPEGWriter.cxx.swp and VTK5.10.1/IO/.vtkFFMPEGWriter.cxx.swp differ
diff --git a/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch b/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch
new file mode 100644
index 000000000000..ed7ec08c2ea7
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch
@@ -0,0 +1,57 @@
+ Common/vtkTclUtil.cxx | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/Common/vtkTclUtil.cxx b/Common/vtkTclUtil.cxx
+index 390b0a4..2b7bccb 100644
+--- a/Common/vtkTclUtil.cxx
++++ b/Common/vtkTclUtil.cxx
+@@ -21,6 +21,12 @@
+ #include <string>
+ #include <vtksys/SystemTools.hxx>
+
++#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
++#define vtkTclGetErrorLine(m) (m->errorLine)
++#else
++#define vtkTclGetErrorLine(m) (Tcl_GetErrorLine(m))
++#endif
++
+ extern "C"
+ {
+ #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
+@@ -490,13 +496,15 @@ VTKTCL_EXPORT void vtkTclVoidFunc(void *arg)
+ vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
+ arg2->command << endl <<
+ Tcl_GetVar(arg2->interp,(char *)("errorInfo"),0) <<
+- " at line number " << arg2->interp->errorLine);
++ " at line number " <<
++ vtkTclGetErrorLine(arg2->interp));
+ }
+ else
+ {
+ vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
+ arg2->command << endl <<
+- " at line number " << arg2->interp->errorLine);
++ " at line number " <<
++ vtkTclGetErrorLine(arg2->interp));
+ }
+ }
+ }
+@@ -723,14 +731,15 @@ void vtkTclCommand::Execute(vtkObject *, unsigned long, void *)
+ vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
+ this->StringCommand << endl <<
+ Tcl_GetVar(this->Interp,(char *)("errorInfo"),0) <<
+- " at line number " << this->Interp->errorLine);
++ " at line number " <<
++ vtkTclGetErrorLine(this->Interp));
+ }
+ else
+ {
+ vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
+ this->StringCommand << endl <<
+- " at line number " <<
+- this->Interp->errorLine);
++ " at line number " <<
++ vtkTclGetErrorLine(this->Interp));
+ }
+ }
+ else if (res == -1)
diff --git a/sci-libs/vtk/files/vtk-5.2.0-tcl-install.patch b/sci-libs/vtk/files/vtk-5.2.0-tcl-install.patch
new file mode 100644
index 000000000000..c7da78678825
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.2.0-tcl-install.patch
@@ -0,0 +1,12 @@
+diff -Naur VTK/CMakeLists.txt VTK.new/CMakeLists.txt
+--- VTK/CMakeLists.txt 2008-05-13 17:50:09.000000000 -0400
++++ VTK.new/CMakeLists.txt 2008-10-05 10:34:42.000000000 -0400
+@@ -182,7 +182,7 @@
+ # Compute the proper location for installing the Tcl package. This
+ # must be a fixed relative path below the library install location and
+ # is therefore not settable by parent projects.
+-SET(VTK_INSTALL_TCL_DIR ${VTK_INSTALL_LIB_DIR})
++SET(VTK_INSTALL_TCL_DIR ${VTK_INSTALL_PACKAGE_DIR})
+
+ IF(NOT VTK_INSTALL_JAVA_DIR)
+ SET(VTK_INSTALL_JAVA_DIR ${VTK_INSTALL_PACKAGE_DIR}/java)
diff --git a/sci-libs/vtk/files/vtk-5.4.2-boost-property_map.patch b/sci-libs/vtk/files/vtk-5.4.2-boost-property_map.patch
new file mode 100644
index 000000000000..90c6d6a1fed3
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.4.2-boost-property_map.patch
@@ -0,0 +1,194 @@
+diff --git a/Infovis/Testing/Cxx/TestBoostAdapter.cxx b/Infovis/Testing/Cxx/TestBoostAdapter.cxx
+index 6af2855..484a9e0 100644
+--- a/Infovis/Testing/Cxx/TestBoostAdapter.cxx
++++ b/Infovis/Testing/Cxx/TestBoostAdapter.cxx
+@@ -36,8 +36,8 @@
+ #include <boost/graph/strong_components.hpp>
+ #include <boost/graph/dijkstra_shortest_paths.hpp>
+ #include <boost/graph/transitive_closure.hpp>
+-#include <boost/property_map.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+
+ #include "vtkGraph.h"
+ #include "vtkBoostGraphAdapter.h"
+diff --git a/Infovis/vtkBoostBiconnectedComponents.cxx b/Infovis/vtkBoostBiconnectedComponents.cxx
+index 6799dd0..dd759d5 100644
+--- a/Infovis/vtkBoostBiconnectedComponents.cxx
++++ b/Infovis/vtkBoostBiconnectedComponents.cxx
+@@ -32,7 +32,7 @@
+ #include "vtkGraph.h"
+ #include "vtkBoostGraphAdapter.h"
+ #include <boost/graph/biconnected_components.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+ #include <boost/version.hpp>
+ #include <vtksys/stl/vector>
+ #include <vtksys/stl/utility>
+diff --git a/Infovis/vtkBoostBrandesCentrality.cxx b/Infovis/vtkBoostBrandesCentrality.cxx
+index e214a72..443c039 100644
+--- a/Infovis/vtkBoostBrandesCentrality.cxx
++++ b/Infovis/vtkBoostBrandesCentrality.cxx
+@@ -36,7 +36,7 @@
+
+ #include <boost/graph/adjacency_list.hpp>
+ #include <boost/graph/betweenness_centrality.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+
+ using namespace boost;
+
+diff --git a/Infovis/vtkBoostBreadthFirstSearch.cxx b/Infovis/vtkBoostBreadthFirstSearch.cxx
+index 7fab585..6e56a7c 100644
+--- a/Infovis/vtkBoostBreadthFirstSearch.cxx
++++ b/Infovis/vtkBoostBreadthFirstSearch.cxx
+@@ -46,8 +46,8 @@
+
+ #include <boost/graph/visitors.hpp>
+ #include <boost/graph/breadth_first_search.hpp>
+-#include <boost/property_map.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+ #include <boost/pending/queue.hpp>
+
+ #include <vtksys/stl/utility> // for pair
+diff --git a/Infovis/vtkBoostBreadthFirstSearchTree.cxx b/Infovis/vtkBoostBreadthFirstSearchTree.cxx
+index 5c64516..64ee7b5 100644
+--- a/Infovis/vtkBoostBreadthFirstSearchTree.cxx
++++ b/Infovis/vtkBoostBreadthFirstSearchTree.cxx
+@@ -39,7 +39,7 @@
+ #include "vtkTree.h"
+
+ #include <boost/graph/breadth_first_search.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+ #include <boost/pending/queue.hpp>
+
+ using namespace boost;
+diff --git a/Infovis/vtkBoostConnectedComponents.cxx b/Infovis/vtkBoostConnectedComponents.cxx
+index 69e9d8f..c88f4ab 100644
+--- a/Infovis/vtkBoostConnectedComponents.cxx
++++ b/Infovis/vtkBoostConnectedComponents.cxx
+@@ -33,7 +33,7 @@
+
+ #include "vtkBoostGraphAdapter.h"
+ #include <boost/graph/strong_components.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+
+ using namespace boost;
+
+diff --git a/Infovis/vtkBoostKruskalMinimumSpanningTree.cxx b/Infovis/vtkBoostKruskalMinimumSpanningTree.cxx
+index b0c89de..7ea3aa9 100644
+--- a/Infovis/vtkBoostKruskalMinimumSpanningTree.cxx
++++ b/Infovis/vtkBoostKruskalMinimumSpanningTree.cxx
+@@ -40,7 +40,7 @@ PURPOSE. See the above copyright notice for more information.
+ #include "vtkTree.h"
+
+ #include <boost/graph/kruskal_min_spanning_tree.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+ #include <boost/pending/queue.hpp>
+
+ using namespace boost;
+diff --git a/Infovis/vtkBoostPrimMinimumSpanningTree.cxx b/Infovis/vtkBoostPrimMinimumSpanningTree.cxx
+index 935d0f7..48716fd 100644
+--- a/Infovis/vtkBoostPrimMinimumSpanningTree.cxx
++++ b/Infovis/vtkBoostPrimMinimumSpanningTree.cxx
+@@ -39,7 +39,7 @@ PURPOSE. See the above copyright notice for more information.
+ #include "vtkTree.h"
+
+ #include <boost/graph/prim_minimum_spanning_tree.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+ #include <boost/pending/queue.hpp>
+
+ using namespace boost;
+diff --git a/Infovis/vtkTreeLayoutStrategy.cxx b/Infovis/vtkTreeLayoutStrategy.cxx
+index 6efa586..222afe9 100644
+--- a/Infovis/vtkTreeLayoutStrategy.cxx
++++ b/Infovis/vtkTreeLayoutStrategy.cxx
+@@ -375,8 +375,8 @@ void vtkTreeLayoutStrategy::PrintSelf(ostream& os, vtkIndent indent)
+ #include "vtkTreeToBoostAdapter.h"
+ #include <boost/graph/visitors.hpp>
+ #include <boost/graph/depth_first_search.hpp>
+-#include <boost/property_map.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+ #include <boost/pending/queue.hpp>
+
+ using namespace boost;
+diff --git a/Parallel/vtkPBGLBreadthFirstSearch.cxx b/Parallel/vtkPBGLBreadthFirstSearch.cxx
+index 2b4681b..eebeaa9 100644
+--- a/Parallel/vtkPBGLBreadthFirstSearch.cxx
++++ b/Parallel/vtkPBGLBreadthFirstSearch.cxx
+@@ -50,8 +50,8 @@
+ #include <boost/graph/distributed/breadth_first_search.hpp>
+ #include <boost/parallel/algorithm.hpp>
+ #include <boost/graph/visitors.hpp>
+-#include <boost/property_map.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+ #include <boost/pending/queue.hpp>
+
+ #include <vtksys/stl/utility> // for pair
+diff --git a/Parallel/vtkPBGLGraphAdapter.h b/Parallel/vtkPBGLGraphAdapter.h
+index 7b467b0..bacfd3a 100644
+--- a/Parallel/vtkPBGLGraphAdapter.h
++++ b/Parallel/vtkPBGLGraphAdapter.h
+@@ -31,7 +31,7 @@
+ #include <boost/graph/distributed/mpi_process_group.hpp>
+ #include <boost/graph/properties.hpp>
+ #include <boost/graph/parallel/container_traits.hpp>
+-#include <boost/parallel/local_property_map.hpp>
++#include <boost/property_map/parallel/local_property_map.hpp>
+ #include <boost/serialization/base_object.hpp>
+ #include <boost/functional/hash.hpp>
+ //ETX
+diff --git a/Parallel/vtkPBGLMinimumSpanningTree.cxx b/Parallel/vtkPBGLMinimumSpanningTree.cxx
+index da4647e..f9c3229 100644
+--- a/Parallel/vtkPBGLMinimumSpanningTree.cxx
++++ b/Parallel/vtkPBGLMinimumSpanningTree.cxx
+@@ -48,8 +48,8 @@
+ #include <boost/graph/distributed/dehne_gotz_min_spanning_tree.hpp>
+ #include <boost/graph/distributed/vertex_list_adaptor.hpp>
+ #include <boost/parallel/global_index_map.hpp>
+-#include <boost/property_map.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+ #include <boost/pending/queue.hpp>
+
+ #include <vtksys/stl/utility> // for pair
+diff --git a/Parallel/vtkPBGLShortestPaths.cxx b/Parallel/vtkPBGLShortestPaths.cxx
+index 074143f..8517304 100644
+--- a/Parallel/vtkPBGLShortestPaths.cxx
++++ b/Parallel/vtkPBGLShortestPaths.cxx
+@@ -49,8 +49,8 @@
+
+ #include <boost/graph/distributed/delta_stepping_shortest_paths.hpp>
+ #include <boost/parallel/algorithm.hpp>
+-#include <boost/property_map.hpp>
+-#include <boost/vector_property_map.hpp>
++#include <boost/property_map/property_map.hpp>
++#include <boost/property_map/vector_property_map.hpp>
+
+ #include <vtksys/stl/utility> // for pair
+
+diff --git a/Parallel/vtkPBGLVertexColoring.cxx b/Parallel/vtkPBGLVertexColoring.cxx
+index 9aa87a0..301a245 100644
+--- a/Parallel/vtkPBGLVertexColoring.cxx
++++ b/Parallel/vtkPBGLVertexColoring.cxx
+@@ -47,7 +47,7 @@
+
+ #include <boost/graph/distributed/boman_et_al_graph_coloring.hpp>
+ #include <boost/parallel/algorithm.hpp>
+-#include <boost/property_map.hpp>
++#include <boost/property_map/property_map.hpp>
+
+ #include <vtksys/stl/utility> // for pair
+
diff --git a/sci-libs/vtk/files/vtk-5.4.2-cg-path.patch b/sci-libs/vtk/files/vtk-5.4.2-cg-path.patch
new file mode 100644
index 000000000000..53d43ee804b9
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.4.2-cg-path.patch
@@ -0,0 +1,35 @@
+diff -Naur VTK/CMake/FindCg.cmake VTK.new/CMake/FindCg.cmake
+--- VTK/CMake/FindCg.cmake 2005-10-04 11:25:51.000000000 -0400
++++ VTK.new/CMake/FindCg.cmake 2009-07-17 14:10:30.000000000 -0400
+@@ -82,6 +82,7 @@
+ FIND_PROGRAM( CG_COMPILER cgc
+ /usr/bin
+ /usr/local/bin
++ /opt/nvidia-cg-toolkit/bin
+ DOC "The Cg Compiler"
+ )
+ GET_FILENAME_COMPONENT(CG_COMPILER_DIR "${CG_COMPILER}" PATH)
+@@ -89,6 +90,7 @@
+ FIND_PATH( CG_INCLUDE_PATH Cg/cg.h
+ /usr/include
+ /usr/local/include
++ /opt/nvidia-cg-toolkit/include
+ ${CG_COMPILER_SUPER_DIR}/include
+ DOC "The directory where Cg/cg.h resides"
+ )
+@@ -98,6 +100,7 @@
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
++ /opt/nvidia-cg-toolkit/lib
+ ${CG_COMPILER_SUPER_DIR}/lib64
+ ${CG_COMPILER_SUPER_DIR}/lib
+ DOC "The Cg runtime library"
+@@ -108,6 +111,7 @@
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
++ /opt/nvidia-cg-toolkit/lib
+ ${CG_COMPILER_SUPER_DIR}/lib64
+ ${CG_COMPILER_SUPER_DIR}/lib
+ DOC "The Cg runtime library"
diff --git a/sci-libs/vtk/files/vtk-5.4.2-libpng14.patch b/sci-libs/vtk/files/vtk-5.4.2-libpng14.patch
new file mode 100644
index 000000000000..1f12ae92658d
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.4.2-libpng14.patch
@@ -0,0 +1,20 @@
+--- IO/vtkPNGReader.cxx
++++ IO/vtkPNGReader.cxx
+@@ -116,7 +116,7 @@
+ // minimum of a byte per pixel
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
+ {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ // add alpha if any alpha found
+@@ -225,7 +225,7 @@
+ // minimum of a byte per pixel
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
+ {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ // add alpha if any alpha found
diff --git a/sci-libs/vtk/files/vtk-5.6.0-R.patch b/sci-libs/vtk/files/vtk-5.6.0-R.patch
new file mode 100644
index 000000000000..1327121c20c6
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.0-R.patch
@@ -0,0 +1,57 @@
+diff --git a/CMake/FindR.cmake b/CMake/FindR.cmake
+index ee49570..c830db0 100644
+--- a/CMake/FindR.cmake
++++ b/CMake/FindR.cmake
+@@ -18,13 +18,12 @@ IF (R_COMMAND)
+ ENDIF (R_COMMAND)
+ SET(CMAKE_FIND_APPBUNDLE ${TEMP_CMAKE_FIND_APPBUNDLE})
+
+-FIND_PATH(R_INCLUDE_DIR R.h PATHS /usr/local/lib /usr/local/lib64 PATH_SUFFIXES R/include DOC "Path to file R.h")
++FIND_PATH(R_INCLUDE_DIR R.h PATHS /usr/lib /usr/lib64 PATH_SUFFIXES R/include DOC "Path to file R.h")
+ FIND_LIBRARY(R_LIBRARY_BASE R PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "R library (example libR.a, libR.dylib, etc.).")
+-FIND_LIBRARY(R_LIBRARY_BLAS Rblas PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rblas library (example libRblas.a, libRblas.dylib, etc.).")
+-FIND_LIBRARY(R_LIBRARY_LAPACK Rlapack PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rlapack library (example libRlapack.a, libRlapack.dylib, etc.).")
++FIND_LIBRARY(R_LIBRARY_MATH Rmath PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rmath library (example libRmath.a, libRmath.dylib, etc.).")
+ FIND_LIBRARY(R_LIBRARY_READLINE readline DOC "(Optional) system readline library. Only required if the R libraries were build with readline support.")
+
+-SET(R_LIBRARIES ${R_LIBRARY_BASE} ${R_LIBRARY_BLAS} ${R_LIBRARY_LAPACK} ${R_LIBRARY_BASE})
++SET(R_LIBRARIES ${R_LIBRARY_BASE} ${R_LIBRARY_MATH} ${R_LIBRARY_BASE})
+ IF (R_LIBRARY_READLINE)
+ SET(R_LIBRARIES ${R_LIBRARIES} ${R_LIBRARY_READLINE})
+ ENDIF (R_LIBRARY_READLINE)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9d4e881..1a828a4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1054,8 +1054,18 @@ IF(VTK_WRAP_JAVA)
+ ENDIF(JAVA_AWT_LIBRARY)
+ ENDIF(VTK_WRAP_JAVA)
+
++IF(VTK_USE_GNU_R)
++ FIND_PACKAGE(R)
++ENDIF(VTK_USE_GNU_R)
+
+-
++IF(VTK_USE_BOOST)
++ if (VTK_USE_PARALLEL_BGL)
++ FIND_PACKAGE(Boost 1.39.0 REQUIRED
++ COMPONENTS mpi serialization filesystem system graph_parallel)
++ else (VTK_USE_PARALLEL_BGL)
++ FIND_PACKAGE(Boost REQUIRED)
++ endif (VTK_USE_PARALLEL_BGL)
++ENDIF(VTK_USE_BOOST)
+ #-----------------------------------------------------------------------------
+ # The entire VTK tree should use the same include path.
+
+diff --git a/Graphics/vtkRInterface.cxx b/Graphics/vtkRInterface.cxx
+index 324e845..56a4869 100644
+--- a/Graphics/vtkRInterface.cxx
++++ b/Graphics/vtkRInterface.cxx
+@@ -23,6 +23,7 @@
+ #undef HAVE_UINTPTR_T
+ #ifdef HAVE_VTK_UINTPTR_T
+ #define HAVE_UINTPTR_T HAVE_VTK_UINTPTR_T
++#include <stdint.h>
+ #endif
+
+ #include "vtkInformation.h"
diff --git a/sci-libs/vtk/files/vtk-5.6.0-boost-property_map.patch b/sci-libs/vtk/files/vtk-5.6.0-boost-property_map.patch
new file mode 100644
index 000000000000..9319378acb1a
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.0-boost-property_map.patch
@@ -0,0 +1,13 @@
+diff --git a/Infovis/vtkTreeLayoutStrategy.cxx b/Infovis/vtkTreeLayoutStrategy.cxx
+index 4a764ea..74d0b53 100644
+--- a/Infovis/vtkTreeLayoutStrategy.cxx
++++ b/Infovis/vtkTreeLayoutStrategy.cxx
+@@ -388,7 +388,7 @@ void vtkTreeLayoutStrategy::PrintSelf(ostream& os, vtkIndent indent)
+ #include "vtkTreeToBoostAdapter.h"
+ #include <boost/graph/visitors.hpp>
+ #include <boost/graph/depth_first_search.hpp>
+-#include <boost/property_map.hpp>
++#include <boost/property_map/property_map.hpp>
+ #include <boost/pending/queue.hpp>
+
+ using namespace boost;
diff --git a/sci-libs/vtk/files/vtk-5.6.0-cg-path.patch b/sci-libs/vtk/files/vtk-5.6.0-cg-path.patch
new file mode 100644
index 000000000000..984bf5008497
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.0-cg-path.patch
@@ -0,0 +1,36 @@
+diff --git a/CMake/FindCg.cmake b/CMake/FindCg.cmake
+index ceb41de..5eb6003 100644
+--- a/CMake/FindCg.cmake
++++ b/CMake/FindCg.cmake
+@@ -82,6 +82,7 @@ ELSE (APPLE)
+ FIND_PROGRAM( CG_COMPILER cgc
+ /usr/bin
+ /usr/local/bin
++ /opt/nvidia-cg-toolkit/bin
+ DOC "The Cg Compiler"
+ )
+ GET_FILENAME_COMPONENT(CG_COMPILER_DIR "${CG_COMPILER}" PATH)
+@@ -89,6 +90,7 @@ ELSE (APPLE)
+ FIND_PATH( CG_INCLUDE_PATH Cg/cg.h
+ /usr/include
+ /usr/local/include
++ /opt/nvidia-cg-toolkit/include
+ ${CG_COMPILER_SUPER_DIR}/include
+ DOC "The directory where Cg/cg.h resides"
+ )
+@@ -98,6 +100,7 @@ ELSE (APPLE)
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
++ /opt/nvidia-cg-toolkit/lib
+ ${CG_COMPILER_SUPER_DIR}/lib64
+ ${CG_COMPILER_SUPER_DIR}/lib
+ DOC "The Cg runtime library"
+@@ -108,6 +111,7 @@ ELSE (APPLE)
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
++ /opt/nvidia-cg-toolkit/lib
+ ${CG_COMPILER_SUPER_DIR}/lib64
+ ${CG_COMPILER_SUPER_DIR}/lib
+ DOC "The Cg runtime library"
diff --git a/sci-libs/vtk/files/vtk-5.6.0-ffmpeg.patch b/sci-libs/vtk/files/vtk-5.6.0-ffmpeg.patch
new file mode 100644
index 000000000000..2b600c067bc9
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.0-ffmpeg.patch
@@ -0,0 +1,42 @@
+ CMake/vtkFFMPEGTestAvAlloc.cxx | 2 +-
+ CMake/vtkFFMPEGTestURLFClose.cxx | 2 +-
+ IO/vtkFFMPEGWriter.cxx | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMake/vtkFFMPEGTestAvAlloc.cxx b/CMake/vtkFFMPEGTestAvAlloc.cxx
+index ad691e3..1025c22 100644
+--- a/CMake/vtkFFMPEGTestAvAlloc.cxx
++++ b/CMake/vtkFFMPEGTestAvAlloc.cxx
+@@ -1,6 +1,6 @@
+ extern "C" {
+ #ifdef HAS_OLD_HEADER
+-# include <ffmpeg/avformat.h>
++# include <libavformat/avformat.h>
+ #else
+ # include <libavformat/avformat.h>
+ #endif
+diff --git a/CMake/vtkFFMPEGTestURLFClose.cxx b/CMake/vtkFFMPEGTestURLFClose.cxx
+index 0bf4314..8c1df58 100644
+--- a/CMake/vtkFFMPEGTestURLFClose.cxx
++++ b/CMake/vtkFFMPEGTestURLFClose.cxx
+@@ -1,6 +1,6 @@
+ extern "C" {
+ #ifdef HAS_OLD_HEADER
+-# include <ffmpeg/avformat.h>
++# include <libavformat/avformat.h>
+ #else
+ # include <libavformat/avformat.h>
+ #endif
+diff --git a/IO/vtkFFMPEGWriter.cxx b/IO/vtkFFMPEGWriter.cxx
+index b109c08..e056418 100644
+--- a/IO/vtkFFMPEGWriter.cxx
++++ b/IO/vtkFFMPEGWriter.cxx
+@@ -22,7 +22,7 @@
+
+ extern "C" {
+ #ifdef VTK_FFMPEG_HAS_OLD_HEADER
+-# include <ffmpeg/avformat.h>
++# include <libavformat/avformat.h>
+ #else
+ # include <libavformat/avformat.h>
+ #endif
diff --git a/sci-libs/vtk/files/vtk-5.6.0-libpng14.patch b/sci-libs/vtk/files/vtk-5.6.0-libpng14.patch
new file mode 100644
index 000000000000..db1f87d3afb2
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.0-libpng14.patch
@@ -0,0 +1,22 @@
+diff --git a/IO/vtkPNGReader.cxx b/IO/vtkPNGReader.cxx
+index d1f5c2f..0bf00e4 100644
+--- a/IO/vtkPNGReader.cxx
++++ b/IO/vtkPNGReader.cxx
+@@ -116,7 +116,7 @@ void vtkPNGReader::ExecuteInformation()
+ // minimum of a byte per pixel
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
+ {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ // add alpha if any alpha found
+@@ -225,7 +225,7 @@ void vtkPNGReaderUpdate2(vtkPNGReader *self, OT *outPtr,
+ // minimum of a byte per pixel
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
+ {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ // add alpha if any alpha found
diff --git a/sci-libs/vtk/files/vtk-5.6.0-odbc.patch b/sci-libs/vtk/files/vtk-5.6.0-odbc.patch
new file mode 100644
index 000000000000..be24af11ac33
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.0-odbc.patch
@@ -0,0 +1,12 @@
+diff -Naur CMake/FindODBC.cmake.orig CMake/FindODBC.cmake
+--- CMake/FindODBC.cmake.orig 2008-10-08 13:51:36.000000000 -0400
++++ CMake/FindODBC.cmake 2010-01-21 22:11:26.000000000 -0500
+@@ -30,7 +30,7 @@
+ )
+
+ FIND_LIBRARY( ODBC_LIBRARY
+- NAMES iodbc unixodbc
++ NAMES iodbc unixodbc odbc
+ PATHS
+ /usr/lib
+ /usr/lib/odbc
diff --git a/sci-libs/vtk/files/vtk-5.6.1-ffmpeg.patch b/sci-libs/vtk/files/vtk-5.6.1-ffmpeg.patch
new file mode 100644
index 000000000000..34ec528854a7
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.1-ffmpeg.patch
@@ -0,0 +1,42 @@
+ CMake/vtkFFMPEGTestAvAlloc.cxx | 2 +-
+ CMake/vtkFFMPEGTestURLFClose.cxx | 2 +-
+ IO/vtkFFMPEGWriter.cxx | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMake/vtkFFMPEGTestAvAlloc.cxx b/CMake/vtkFFMPEGTestAvAlloc.cxx
+index ad691e3..32489d5 100644
+--- a/CMake/vtkFFMPEGTestAvAlloc.cxx
++++ b/CMake/vtkFFMPEGTestAvAlloc.cxx
+@@ -1,6 +1,6 @@
+ extern "C" {
+ #ifdef HAS_OLD_HEADER
+-# include <ffmpeg/avformat.h>
++# include <libavformat/avformat.h>
+ #else
+ # include <libavformat/avformat.h>
+ #endif
+diff --git a/CMake/vtkFFMPEGTestURLFClose.cxx b/CMake/vtkFFMPEGTestURLFClose.cxx
+index 0bf4314..1c10a93 100644
+--- a/CMake/vtkFFMPEGTestURLFClose.cxx
++++ b/CMake/vtkFFMPEGTestURLFClose.cxx
+@@ -1,6 +1,6 @@
+ extern "C" {
+ #ifdef HAS_OLD_HEADER
+-# include <ffmpeg/avformat.h>
++# include <libavformat/avformat.h>
+ #else
+ # include <libavformat/avformat.h>
+ #endif
+diff --git a/IO/vtkFFMPEGWriter.cxx b/IO/vtkFFMPEGWriter.cxx
+index 52673ef..ffbb78f 100644
+--- a/IO/vtkFFMPEGWriter.cxx
++++ b/IO/vtkFFMPEGWriter.cxx
+@@ -22,7 +22,7 @@
+
+ extern "C" {
+ #ifdef VTK_FFMPEG_HAS_OLD_HEADER
+-# include <ffmpeg/avformat.h>
++# include <libavformat/avformat.h>
+ #else
+ # include <libavformat/avformat.h>
+ #endif
diff --git a/sci-libs/vtk/files/vtk-5.6.1-gcc-46.patch b/sci-libs/vtk/files/vtk-5.6.1-gcc-46.patch
new file mode 100644
index 000000000000..263e24f69b3d
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.1-gcc-46.patch
@@ -0,0 +1,29 @@
+ Common/vtkPythonUtil.cxx | 2 ++
+ Utilities/vtkmetaio/metaUtils.cxx | 1 +
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/Common/vtkPythonUtil.cxx b/Common/vtkPythonUtil.cxx
+index 7bc7660..d218e0d 100644
+--- a/Common/vtkPythonUtil.cxx
++++ b/Common/vtkPythonUtil.cxx
+@@ -31,6 +31,8 @@
+ #include <vtkstd/map>
+ #include <vtkstd/string>
+
++#include <cstddef>
++
+ // Silent warning like
+ // "dereferencing type-punned pointer will break strict-aliasing rules"
+ // it happens because this kind of expression: (long *)&ptr
+diff --git a/Utilities/vtkmetaio/metaUtils.cxx b/Utilities/vtkmetaio/metaUtils.cxx
+index 08d3e8d..bbcc9ec 100644
+--- a/Utilities/vtkmetaio/metaUtils.cxx
++++ b/Utilities/vtkmetaio/metaUtils.cxx
+@@ -37,6 +37,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <string>
++#include <cstddef>
+
+ #if defined (__BORLANDC__) && (__BORLANDC__ >= 0x0580)
+ #include <mem.h>
diff --git a/sci-libs/vtk/files/vtk-5.6.1-libav-0.8.patch b/sci-libs/vtk/files/vtk-5.6.1-libav-0.8.patch
new file mode 100644
index 000000000000..523919d6f676
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.1-libav-0.8.patch
@@ -0,0 +1,66 @@
+Description: Upstream changes introduced in version 5.6.1-6.1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ vtk (5.6.1-6.1) unstable; urgency=low
+ .
+ [ Michael Schutte ]
+ * Non-maintainer upload.
+ * Remove absolute paths to required libraries from
+ /usr/lib/vtk-5.6/VTKLibraryDepends.cmake after building, closes:
+ #506992. Due to the multiarch transition, the original behavior
+ frequently causes reverse build-deps to FTBFS. This change should
+ probably be reverted once all required libraries are multiarched.
+ .
+ [ Steve M. Robbins ]
+ * Override lintian diagnostic about embedded libraries ftgl and sqlite.
+ * IO/vtkFFMPEGWriter.cxx: Applied fix from #638246 to build with libav
+ 0.7.
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Steve M. Robbins <smr@debian.org>
+Bug-Debian: http://bugs.debian.org/506992
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- vtk-5.6.1.orig/IO/vtkFFMPEGWriter.cxx
++++ vtk-5.6.1/IO/vtkFFMPEGWriter.cxx
+@@ -123,7 +123,7 @@ int vtkFFMPEGWriterInternal::Start()
+ }
+
+ //choose avi media file format
+- this->avOutputFormat = guess_format("avi", NULL, NULL);
++ this->avOutputFormat = av_guess_format("avi", NULL, NULL);
+ if (!this->avOutputFormat)
+ {
+ vtkGenericWarningMacro (<< "Could not open the avi media file format.");
+@@ -150,7 +150,7 @@ int vtkFFMPEGWriterInternal::Start()
+ //Set up the codec.
+ AVCodecContext *c = this->avStream->codec;
+ c->codec_id = (CodecID)this->avOutputFormat->video_codec;
+- c->codec_type = CODEC_TYPE_VIDEO;
++ c->codec_type = AVMEDIA_TYPE_VIDEO;
+ c->width = this->Dim[0];
+ c->height = this->Dim[1];
+ c->pix_fmt = PIX_FMT_YUVJ420P;
+@@ -329,7 +329,7 @@ int vtkFFMPEGWriterInternal::Write(vtkIm
+ pkt.stream_index = this->avStream->index;
+ if (cc->coded_frame->key_frame) //treat keyframes well
+ {
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ }
+ pkt.duration = 0; //presentation duration in time_base units or 0 if NA
+ pkt.pos = -1; //byte position in stream or -1 if NA
diff --git a/sci-libs/vtk/files/vtk-5.6.1-libpng15.patch b/sci-libs/vtk/files/vtk-5.6.1-libpng15.patch
new file mode 100644
index 000000000000..5bb5cbfb8cd6
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.6.1-libpng15.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/378393
+
+--- VTK/IO/vtkPNGWriter.cxx
++++ VTK/IO/vtkPNGWriter.cxx
+@@ -147,7 +147,7 @@
+ void vtkPNGWriteErrorFunction(png_structp png_ptr,
+ png_const_charp vtkNotUsed(error_msg))
+ {
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+ }
+
+@@ -223,7 +223,7 @@
+ png_init_io(png_ptr, this->TempFP);
+ png_set_error_fn(png_ptr, png_ptr,
+ vtkPNGWriteErrorFunction, vtkPNGWriteWarningFunction);
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ fclose(this->TempFP);
+ this->SetErrorCode(vtkErrorCode::OutOfDiskSpaceError);
diff --git a/sci-libs/vtk/files/vtk-5.8.0-R.patch b/sci-libs/vtk/files/vtk-5.8.0-R.patch
new file mode 100644
index 000000000000..ce6dcde59e9d
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.8.0-R.patch
@@ -0,0 +1,45 @@
+diff --git a/CMake/FindR.cmake b/CMake/FindR.cmake
+index ee49570..c830db0 100644
+--- a/CMake/FindR.cmake
++++ b/CMake/FindR.cmake
+@@ -18,13 +18,12 @@ IF (R_COMMAND)
+ ENDIF (R_COMMAND)
+ SET(CMAKE_FIND_APPBUNDLE ${TEMP_CMAKE_FIND_APPBUNDLE})
+
+-FIND_PATH(R_INCLUDE_DIR R.h PATHS /usr/local/lib /usr/local/lib64 PATH_SUFFIXES R/include DOC "Path to file R.h")
++FIND_PATH(R_INCLUDE_DIR R.h PATHS /usr/lib /usr/lib64 PATH_SUFFIXES R/include DOC "Path to file R.h")
+ FIND_LIBRARY(R_LIBRARY_BASE R PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "R library (example libR.a, libR.dylib, etc.).")
+-FIND_LIBRARY(R_LIBRARY_BLAS Rblas PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rblas library (example libRblas.a, libRblas.dylib, etc.).")
+-FIND_LIBRARY(R_LIBRARY_LAPACK Rlapack PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rlapack library (example libRlapack.a, libRlapack.dylib, etc.).")
++FIND_LIBRARY(R_LIBRARY_MATH Rmath PATHS ${R_BASE_DIR} PATH_SUFFIXES /lib DOC "Rmath library (example libRmath.a, libRmath.dylib, etc.).")
+ FIND_LIBRARY(R_LIBRARY_READLINE readline DOC "(Optional) system readline library. Only required if the R libraries were build with readline support.")
+
+-SET(R_LIBRARIES ${R_LIBRARY_BASE} ${R_LIBRARY_BLAS} ${R_LIBRARY_LAPACK} ${R_LIBRARY_BASE})
++SET(R_LIBRARIES ${R_LIBRARY_BASE} ${R_LIBRARY_MATH} ${R_LIBRARY_BASE})
+ IF (R_LIBRARY_READLINE)
+ SET(R_LIBRARIES ${R_LIBRARIES} ${R_LIBRARY_READLINE})
+ ENDIF (R_LIBRARY_READLINE)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9d4e881..1a828a4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1054,8 +1054,18 @@ IF(VTK_WRAP_JAVA)
+ ENDIF(JAVA_AWT_LIBRARY)
+ ENDIF(VTK_WRAP_JAVA)
+
++IF(VTK_USE_GNU_R)
++ FIND_PACKAGE(R)
++ENDIF(VTK_USE_GNU_R)
+
+-
++IF(VTK_USE_BOOST)
++ if (VTK_USE_PARALLEL_BGL)
++ FIND_PACKAGE(Boost 1.39.0 REQUIRED
++ COMPONENTS mpi serialization filesystem system graph_parallel)
++ else (VTK_USE_PARALLEL_BGL)
++ FIND_PACKAGE(Boost REQUIRED)
++ endif (VTK_USE_PARALLEL_BGL)
++ENDIF(VTK_USE_BOOST)
+ #-----------------------------------------------------------------------------
+ # The entire VTK tree should use the same include path.
+
diff --git a/sci-libs/vtk/files/vtk-5.8.0-boost.patch b/sci-libs/vtk/files/vtk-5.8.0-boost.patch
new file mode 100644
index 000000000000..30a0e9a4c606
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.8.0-boost.patch
@@ -0,0 +1,39 @@
+diff --git a/Infovis/vtkBoostBreadthFirstSearchTree.cxx b/Infovis/vtkBoostBreadthFirstSearchTree.cxx
+index c789f6b..13e7cb6 100644
+--- a/Infovis/vtkBoostBreadthFirstSearchTree.cxx
++++ b/Infovis/vtkBoostBreadthFirstSearchTree.cxx
+@@ -47,6 +47,21 @@ using namespace boost;
+ vtkStandardNewMacro(vtkBoostBreadthFirstSearchTree);
+
+
++#if BOOST_VERSION >= 104800 // Boost 1.48.x
++namespace {
++ vtkIdType unwrap_edge_id(vtkEdgeType const &e) {
++ return e.Id;
++ }
++ vtkIdType unwrap_edge_id(boost::detail::reverse_graph_edge_descriptor<vtkEdgeType> const &e) {
++# if BOOST_VERSION == 104800
++ return e.underlying_desc.Id;
++# else
++ return e.underlying_descx.Id;
++# endif
++ }
++}
++#endif
++
+ // Redefine the bfs visitor, the only visitor we
+ // are using is the tree_edge visitor.
+ template <typename IdMap>
+@@ -95,7 +106,12 @@ public:
+
+ // Copy the vertex and edge data from the graph to the tree.
+ tree->GetVertexData()->CopyData(graph->GetVertexData(), v, tree_v);
++#if BOOST_VERSION < 104800 // Boost 1.48.x
+ tree->GetEdgeData()->CopyData(graph->GetEdgeData(), e.Id, tree_e.Id);
++#else
++ tree->GetEdgeData()->CopyData(graph->GetEdgeData(),
++ unwrap_edge_id(e), tree_e.Id);
++#endif
+ }
+
+ private:
diff --git a/sci-libs/vtk/files/vtk-6.0.0-cg-path.patch b/sci-libs/vtk/files/vtk-6.0.0-cg-path.patch
new file mode 100644
index 000000000000..c83a06b2f3e9
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.0.0-cg-path.patch
@@ -0,0 +1,16 @@
+ Utilities/MaterialLibrary/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Utilities/MaterialLibrary/CMakeLists.txt b/Utilities/MaterialLibrary/CMakeLists.txt
+index 330a189..ede97be 100644
+--- a/Utilities/MaterialLibrary/CMakeLists.txt
++++ b/Utilities/MaterialLibrary/CMakeLists.txt
+@@ -116,7 +116,7 @@ MACRO(get_modules modules prefix files )
+ ENDMACRO(get_modules)
+
+ SET(CMD_DEP ProcessShader)
+-SET(CMD ProcessShader)
++SET(CMD ./ProcessShader.sh)
+
+ IF (VTK_USE_CG_SHADERS)
+ # Create the Cg library.
diff --git a/sci-libs/vtk/files/vtk-6.0.0-install.patch b/sci-libs/vtk/files/vtk-6.0.0-install.patch
new file mode 100644
index 000000000000..a97755ab69ff
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.0.0-install.patch
@@ -0,0 +1,19 @@
+diff -up VTK6.0.0/CMake/vtkModuleTop.cmake.install VTK6.0.0/CMake/vtkModuleTop.cmake
+--- VTK6.0.0/CMake/vtkModuleTop.cmake.install 2013-06-12 13:47:10.000000000 -0600
++++ VTK6.0.0/CMake/vtkModuleTop.cmake 2013-07-12 16:15:15.706008475 -0600
+@@ -330,10 +330,15 @@ if (NOT VTK_INSTALL_NO_DEVELOPMENT)
+ CMake/pythonmodules.h.in
+ CMake/UseVTK.cmake
+ CMake/FindTCL.cmake
++ CMake/TopologicalSort.cmake
+ CMake/vtkTclTkMacros.cmake
+ CMake/vtk-forward.c.in
+ CMake/vtkForwardingExecutable.cmake
++ CMake/vtkGroups.cmake
+ CMake/vtkJavaWrapping.cmake
++ CMake/vtkMakeInstantiator.cmake
++ CMake/vtkMakeInstantiator.cxx.in
++ CMake/vtkMakeInstantiator.h.in
+ CMake/vtkModuleAPI.cmake
+ CMake/vtkModuleHeaders.cmake.in
+ CMake/vtkModuleInfo.cmake.in
diff --git a/sci-libs/vtk/files/vtk-6.0.0-netcdf.patch b/sci-libs/vtk/files/vtk-6.0.0-netcdf.patch
new file mode 100644
index 000000000000..df0ef94890f7
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.0.0-netcdf.patch
@@ -0,0 +1,75 @@
+diff -up VTK/IO/NetCDF/CMakeLists.txt.netcdf VTK/IO/NetCDF/CMakeLists.txt
+--- VTK/IO/NetCDF/CMakeLists.txt.netcdf 2013-01-28 14:44:35.000000000 -0700
++++ VTK/IO/NetCDF/CMakeLists.txt 2013-01-28 15:40:00.825176295 -0700
+@@ -10,5 +10,5 @@ set(Module_SRCS
+
+ vtk_module_library(vtkIONetCDF ${Module_SRCS})
+
+-target_link_libraries(vtkIONetCDF vtkNetCDF_cxx)
++target_link_libraries(vtkIONetCDF netcdf_c++ netcdf)
+ set_target_properties(vtkIONetCDF PROPERTIES LINK_INTERFACE_LIBRARIES "")
+diff -up VTK/IO/ParallelNetCDF/CMakeLists.txt.netcdf VTK/IO/ParallelNetCDF/CMakeLists.txt
+--- VTK/IO/ParallelNetCDF/CMakeLists.txt.netcdf 2013-01-28 14:44:35.000000000 -0700
++++ VTK/IO/ParallelNetCDF/CMakeLists.txt 2013-01-28 15:40:00.825176295 -0700
+@@ -8,4 +8,4 @@ set(Module_SRCS
+
+ vtk_module_library(vtkIOParallelNetCDF ${Module_SRCS})
+
+-target_link_libraries(vtkIOParallelNetCDF vtkNetCDF_cxx)
++target_link_libraries(vtkIOParallelNetCDF netcdf)
+diff -up VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt.netcdf VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt
+--- VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt.netcdf 2013-01-28 14:44:36.000000000 -0700
++++ VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt 2013-01-28 15:40:27.534030910 -0700
+@@ -241,7 +241,7 @@ ENDIF(APPLE)
+
+
+ VTK_ADD_LIBRARY(vtkexoIIc ${cbind_SRCS})
+-TARGET_LINK_LIBRARIES(vtkexoIIc vtkNetCDF)
++TARGET_LINK_LIBRARIES(vtkexoIIc netcdf)
+
+ #INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
+
+diff -up VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf VTK/ThirdParty/netcdf/CMakeLists.txt
+--- VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf 2013-01-28 14:44:36.000000000 -0700
++++ VTK/ThirdParty/netcdf/CMakeLists.txt 2013-01-28 15:40:00.825176295 -0700
+@@ -1,8 +1,12 @@
+ set(vtknetcdf_THIRD_PARTY 1)
+-set(vtknetcdf_LIBRARIES vtkNetCDF vtkNetCDF_cxx)
+-set(vtknetcdf_INCLUDE_DIRS
+- ${vtknetcdf_SOURCE_DIR}/vtknetcdf/include
+- ${vtknetcdf_BINARY_DIR}/vtknetcdf
+- )
++if(NOT VTK_USE_SYSTEM_NETCDF)
++ set(vtknetcdf_LIBRARIES vtkNetCDF vtkNetCDF_cxx)
++ set(vtknetcdf_INCLUDE_DIRS
++ ${vtknetcdf_SOURCE_DIR}/vtknetcdf/include
++ ${vtknetcdf_BINARY_DIR}/vtknetcdf
++ )
++ add_subdirectory(vtknetcdf)
++else(NOT VTK_USE_SYSTEM_NETCDF)
++ set(vtknetcdf_LIBRARIES netcdf)
++endif()
+ vtk_module_export_info()
+-add_subdirectory(vtknetcdf)
+diff -up VTK/ThirdParty/netcdf/vtk_netcdfcpp.h.netcdf VTK/ThirdParty/netcdf/vtk_netcdfcpp.h
+--- VTK/ThirdParty/netcdf/vtk_netcdfcpp.h.netcdf 2013-01-28 14:44:36.000000000 -0700
++++ VTK/ThirdParty/netcdf/vtk_netcdfcpp.h 2013-01-28 15:40:00.826176289 -0700
+@@ -16,6 +16,6 @@
+ #define __vtk_netcdfcpp_h
+
+ /* Use the netcdf library configured for VTK. */
+-#include <vtknetcdf/cxx/netcdfcpp.h>
++#include <netcdfcpp.h>
+
+ #endif
+diff -up VTK/ThirdParty/netcdf/vtk_netcdf.h.netcdf VTK/ThirdParty/netcdf/vtk_netcdf.h
+--- VTK/ThirdParty/netcdf/vtk_netcdf.h.netcdf 2013-01-28 14:44:36.000000000 -0700
++++ VTK/ThirdParty/netcdf/vtk_netcdf.h 2013-01-28 15:40:00.826176289 -0700
+@@ -16,6 +16,6 @@
+ #define __vtk_netcdf_h
+
+ /* Use the netcdf library configured for VTK. */
+-#include <vtknetcdf/include/netcdf.h>
++#include <netcdf.h>
+
+ #endif
diff --git a/sci-libs/vtk/files/vtk-6.0.0-system.patch b/sci-libs/vtk/files/vtk-6.0.0-system.patch
new file mode 100644
index 000000000000..3e5762fe5d46
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.0.0-system.patch
@@ -0,0 +1,27 @@
+diff -up VTK6.0.0/CMake/vtkModuleMacros.cmake.system VTK6.0.0/CMake/vtkModuleMacros.cmake
+--- VTK6.0.0/CMake/vtkModuleMacros.cmake.system 2013-06-12 13:47:10.000000000 -0600
++++ VTK6.0.0/CMake/vtkModuleMacros.cmake 2013-12-27 20:59:39.548152746 -0700
+@@ -613,7 +613,7 @@ macro(vtk_module_third_party _pkg)
+ message(FATAL_ERROR "Cannot specify both LIBRARIES and NO_LIBRARIES")
+ endif()
+
+- option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" OFF)
++ option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" ${VTK_USE_SYSTEM_LIBRARIES})
+ mark_as_advanced(VTK_USE_SYSTEM_${_upper})
+
+ if(VTK_USE_SYSTEM_${_upper})
+diff -up VTK6.0.0/CMakeLists.txt.system VTK6.0.0/CMakeLists.txt
+--- VTK6.0.0/CMakeLists.txt.system 2013-06-12 13:47:10.000000000 -0600
++++ VTK6.0.0/CMakeLists.txt 2013-12-27 20:59:39.548152746 -0700
+@@ -107,6 +107,11 @@ set(VTK_INSTALL_INCLUDE_DIR_CM24 ${VTK_I
+ set(VTK_INSTALL_DOXYGEN_DIR_CM24 ${VTK_INSTALL_DATA_DIR}/doxygen)
+
+ #-----------------------------------------------------------------------------
++# Do we try to use system libraries by default?
++OPTION(VTK_USE_SYSTEM_LIBRARIES "Use the system's libraries by default." OFF)
++MARK_AS_ADVANCED(VTK_USE_SYSTEM_LIBRARIES)
++
++#-----------------------------------------------------------------------------
+ # The third party macros are still used in one or two third party builds.
+ include(vtkThirdParty)
+
diff --git a/sci-libs/vtk/files/vtk-6.0.0-vtkpython.patch b/sci-libs/vtk/files/vtk-6.0.0-vtkpython.patch
new file mode 100644
index 000000000000..f310479e8ab8
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.0.0-vtkpython.patch
@@ -0,0 +1,12 @@
+diff -up VTK6.0.0/Wrapping/Python/CMakeLists.txt.vtkpython VTK6.0.0/Wrapping/Python/CMakeLists.txt
+--- VTK6.0.0/Wrapping/Python/CMakeLists.txt.vtkpython 2013-06-12 13:47:10.000000000 -0600
++++ VTK6.0.0/Wrapping/Python/CMakeLists.txt 2013-07-26 16:44:19.954295281 -0600
+@@ -371,3 +371,8 @@ endif()
+
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
+ ${CMAKE_CURRENT_BINARY_DIR}/setup.py @ONLY IMMEDIATE)
++
++if(NOT VTK_INSTALL_NO_RUNTIME AND NOT VTK_INSTALL_NO_PYTHON)
++ install(TARGETS vtkpython ${VTKPYTHON_EXECUTABLE}
++ DESTINATION ${VTK_INSTALL_RUNTIME_DIR})
++endif()
diff --git a/sci-libs/vtk/files/vtk-6.1.0-freetype.patch b/sci-libs/vtk/files/vtk-6.1.0-freetype.patch
new file mode 100644
index 000000000000..b7d3e409cde1
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-freetype.patch
@@ -0,0 +1,22 @@
+--- a/ParaView-v4.2.0-source/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx_orig 2014-12-23 09:25:35.000000000 +0100
++++ b/ParaView-v4.2.0-source/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx 2014-12-24 09:40:31.886953389 +0100
+@@ -1185,7 +1185,7 @@
+ if (bitmap)
+ {
+ metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent);
+- metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)),
++ metaData.descent = std::min(-(static_cast<int>(bitmap->rows) - (bitmapGlyph->top - 1)),
+ metaData.descent);
+ }
+ ++heightString;
+@@ -1952,8 +1952,8 @@
+ if (bitmap)
+ {
+ bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left);
+- bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width);
+- bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows);
++ bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + static_cast<int>(bitmap->width));
++ bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast<int>(bitmap->rows));
+ bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1);
+ }
+ else
diff --git a/sci-libs/vtk/files/vtk-6.1.0-glext.patch b/sci-libs/vtk/files/vtk-6.1.0-glext.patch
new file mode 100644
index 000000000000..b5529a5fc3d5
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-glext.patch
@@ -0,0 +1,13 @@
+diff -up VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h.glext VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h
+--- VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h.glext 2014-01-22 08:55:41.000000000 -0700
++++ VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h 2014-11-19 10:27:12.349345199 -0700
+@@ -19,7 +19,8 @@
+ #include "vtkConfigure.h"
+
+ // To prevent gl.h to include glext.h provided by the system
+-#define GL_GLEXT_LEGACY
++// https://bugzilla.redhat.com/show_bug.cgi?id=1138466
++// #define GL_GLEXT_LEGACY
+ #if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined(VTK_USE_COCOA))
+ # include <OpenGL/gl.h> // Include OpenGL API.
+ #else
diff --git a/sci-libs/vtk/files/vtk-6.1.0-install.patch b/sci-libs/vtk/files/vtk-6.1.0-install.patch
new file mode 100644
index 000000000000..27c6c3adfee9
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-install.patch
@@ -0,0 +1,19 @@
+diff -up VTK-6.1.0/CMake/vtkModuleTop.cmake.install VTK-6.1.0/CMake/vtkModuleTop.cmake
+--- VTK-6.1.0/CMake/vtkModuleTop.cmake.install 2014-01-23 19:12:04.922871103 -0700
++++ VTK-6.1.0/CMake/vtkModuleTop.cmake 2014-01-23 19:14:33.002645155 -0700
+@@ -330,11 +330,15 @@ if (NOT VTK_INSTALL_NO_DEVELOPMENT)
+ CMake/pythonmodules.h.in
+ CMake/UseVTK.cmake
+ CMake/FindTCL.cmake
++ CMake/TopologicalSort.cmake
+ CMake/vtkTclTkMacros.cmake
+ CMake/vtk-forward.c.in
++ CMake/vtkGroups.cmake
+ CMake/vtkForwardingExecutable.cmake
+ CMake/vtkJavaWrapping.cmake
+ CMake/vtkMakeInstantiator.cmake
++ CMake/vtkMakeInstantiator.cxx.in
++ CMake/vtkMakeInstantiator.h.in
+ CMake/vtkModuleAPI.cmake
+ CMake/vtkModuleHeaders.cmake.in
+ CMake/vtkModuleInfo.cmake.in
diff --git a/sci-libs/vtk/files/vtk-6.1.0-memset.patch b/sci-libs/vtk/files/vtk-6.1.0-memset.patch
new file mode 100644
index 000000000000..362022edf16d
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-memset.patch
@@ -0,0 +1,147 @@
+From ef22d3d69421581b33bc0cd94b647da73b61ba96 Mon Sep 17 00:00:00 2001
+From: Anton Gladky <gladk@debian.org>
+Date: Fri, 30 May 2014 23:16:26 +0200
+Subject: [PATCH] Fix compilation by gcc-4.9
+
+VTK fails to build during compilation by gcc-4.9 with the
+following message:
+
+CMakeFiles/vtkFiltersParallelMPI.dir/vtkDistributedDataFilter.cxx.o: In
+function `memset':
+/usr/include/x86_64-linux-gnu/bits/string3.h:81: warning: memset used
+with constant zero length parameter; this could be due to transposed
+parameters
+collect2: error: ld returned 1 exit status
+
+This patch sets if-condition before all "memsets" in
+vtkDistributedDataFilter and checkes, whether the number
+of bytes to be set by memset is more than 0 to escape this
+error.
+---
+ Filters/ParallelMPI/vtkDistributedDataFilter.cxx | 48 ++++++++++++++++++------
+ 1 file changed, 37 insertions(+), 11 deletions(-)
+
+diff --git a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx
+index 3c1ff30..df4b5d3 100644
+--- a/Filters/ParallelMPI/vtkDistributedDataFilter.cxx
++++ b/Filters/ParallelMPI/vtkDistributedDataFilter.cxx
+@@ -1091,7 +1091,10 @@ vtkDataSet *vtkDistributedDataFilter::TestFixTooFewInputFiles(vtkDataSet *input)
+ vtkIdType cellsPerNode = numTotalCells / nprocs;
+
+ vtkIdList **sendCells = new vtkIdList * [ nprocs ];
+- memset(sendCells, 0, sizeof(vtkIdList *) * nprocs);
++
++ if (sizeof(vtkIdList *) * nprocs > 0) {
++ memset(sendCells, 0, sizeof(vtkIdList *) * nprocs);
++ }
+
+ if (numConsumers == nprocs - 1)
+ {
+@@ -1582,7 +1585,9 @@ vtkFloatArray **
+ // Exchange int arrays
+
+ float **recvArrays = new float * [nprocs];
+- memset(recvArrays, 0, sizeof(float *) * nprocs);
++ if (sizeof(float *) * nprocs > 0) {
++ memset(recvArrays, 0, sizeof(float *) * nprocs);
++ }
+
+ if (sendSize[me] > 0) // sent myself an array
+ {
+@@ -1703,7 +1708,9 @@ vtkIdTypeArray **
+ // Exchange int arrays
+
+ vtkIdType **recvArrays = new vtkIdType * [nprocs];
+- memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs);
++ if (sizeof(vtkIdType *) * nprocs > 0) {
++ memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs);
++ }
+
+ if (sendSize[me] > 0) // sent myself an array
+ {
+@@ -2807,7 +2814,9 @@ void vtkDistributedDataFilter::AddConstantUnsignedCharPointArray(
+
+ unsigned char *vals = new unsigned char [npoints];
+
+- memset(vals, val, npoints);
++ if (npoints > 0) {
++ memset(vals, val, npoints);
++ }
+
+ vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New();
+ Array->SetName(arrayName);
+@@ -2827,7 +2836,9 @@ void vtkDistributedDataFilter::AddConstantUnsignedCharCellArray(
+
+ unsigned char *vals = new unsigned char [ncells];
+
+- memset(vals, val, ncells);
++ if (ncells > 0) {
++ memset(vals, val, ncells);
++ }
+
+ vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New();
+ Array->SetName(arrayName);
+@@ -3026,7 +3037,9 @@ int vtkDistributedDataFilter::AssignGlobalNodeIds(vtkUnstructuredGrid *grid)
+ vtkIdType nGridPoints = grid->GetNumberOfPoints();
+
+ vtkIdType *numPointsOutside = new vtkIdType [nprocs];
+- memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs);
++ if (sizeof(vtkIdType) * nprocs > 0) {
++ memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs);
++ }
+
+ vtkIdTypeArray *globalIds = vtkIdTypeArray::New();
+ globalIds->SetNumberOfValues(nGridPoints);
+@@ -3108,10 +3121,16 @@ int vtkDistributedDataFilter::AssignGlobalNodeIds(vtkUnstructuredGrid *grid)
+ // global ID back?
+
+ vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs];
+- memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs);
++
++ if (sizeof(vtkFloatArray *) * nprocs > 0) {
++ memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs);
++ }
+
+ vtkIdTypeArray **localIds = new vtkIdTypeArray * [nprocs];
+- memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs);
++
++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) {
++ memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs);
++ }
+
+ vtkIdType *next = new vtkIdType [nprocs];
+ vtkIdType *next3 = new vtkIdType [nprocs];
+@@ -3286,7 +3305,9 @@ vtkIdTypeArray **vtkDistributedDataFilter::FindGlobalPointIds(
+ {
+ // There are no cells in my assigned region
+
+- memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs);
++ if (sizeof(vtkIdTypeArray *) * nprocs > 0) {
++ memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs);
++ }
+
+ return gids;
+ }
+@@ -3491,7 +3512,10 @@ vtkIdTypeArray **vtkDistributedDataFilter::MakeProcessLists(
+ std::multimap<int, int>::iterator mapIt;
+
+ vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs];
+- memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs);
++
++ if (sizeof (vtkIdTypeArray *) * nprocs > 0) {
++ memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs);
++ }
+
+ for (int i=0; i<nprocs; i++)
+ {
+@@ -3581,7 +3605,9 @@ vtkIdTypeArray **vtkDistributedDataFilter::GetGhostPointIds(
+ vtkIdType numPoints = grid->GetNumberOfPoints();
+
+ vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs];
+- memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs);
++ if (sizeof(vtkIdTypeArray *) * nprocs) {
++ memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs);
++ }
+
+ if (numPoints < 1)
+ {
diff --git a/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch b/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch
new file mode 100644
index 000000000000..e6f8b6431720
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch
@@ -0,0 +1,29 @@
+diff -up VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf VTK/ThirdParty/netcdf/CMakeLists.txt
+--- VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf 2013-12-27 20:29:11.644289659 -0700
++++ VTK/ThirdParty/netcdf/CMakeLists.txt 2013-12-27 20:33:48.071895769 -0700
+@@ -1,10 +1,18 @@
+-vtk_module_third_party(NetCDF
+- LIBRARIES vtkNetCDF vtkNetCDF_cxx
+- INCLUDE_DIRS
+- ${CMAKE_CURRENT_SOURCE_DIR}/vtknetcdf/include
+- ${CMAKE_CURRENT_BINARY_DIR}/vtknetcdf
+- COMPONENTS C CXX
+- )
++if(NOT VTK_USE_SYSTEM_NETCDF)
++ vtk_module_third_party(NetCDF
++ LIBRARIES vtkNetCDF vtkNetCDF_cxx
++ INCLUDE_DIRS
++ ${CMAKE_CURRENT_SOURCE_DIR}/vtknetcdf/include
++ ${CMAKE_CURRENT_BINARY_DIR}/vtknetcdf
++ COMPONENTS C CXX
++ )
++else(NOT VTK_USE_SYSTEM_NETCDF)
++ vtk_module_third_party(NetCDF
++ LIBRARIES vtkNetCDF netcdf
++ COMPONENTS C CXX
++ )
++endif()
++
+
+ #Configure the top cpp header to switch between system and internal
+ #netcdf just like vtk_module_third_party does for the c header.
diff --git a/sci-libs/vtk/files/vtk-6.1.0-system.patch b/sci-libs/vtk/files/vtk-6.1.0-system.patch
new file mode 100644
index 000000000000..c75d544447ea
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-system.patch
@@ -0,0 +1,27 @@
+diff -up VTK/CMake/vtkModuleMacros.cmake.system VTK/CMake/vtkModuleMacros.cmake
+--- VTK/CMake/vtkModuleMacros.cmake.system 2013-12-24 19:17:43.000000000 -0700
++++ VTK/CMake/vtkModuleMacros.cmake 2013-12-27 20:28:22.375573277 -0700
+@@ -682,7 +682,7 @@ macro(vtk_module_third_party _pkg)
+ message(FATAL_ERROR "Cannot specify both LIBRARIES and NO_LIBRARIES")
+ endif()
+
+- option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" OFF)
++ option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" ${VTK_USE_SYSTEM_LIBRARIES})
+ mark_as_advanced(VTK_USE_SYSTEM_${_upper})
+
+ if(VTK_USE_SYSTEM_${_upper})
+diff -up VTK/CMakeLists.txt.system VTK/CMakeLists.txt
+--- VTK/CMakeLists.txt.system 2013-12-27 20:28:22.374573241 -0700
++++ VTK/CMakeLists.txt 2013-12-27 20:28:48.118669708 -0700
+@@ -132,6 +132,11 @@ if (CMAKE_CROSSCOMPILING AND NOT COMPILE
+ endif()
+
+ #-----------------------------------------------------------------------------
++# Do we try to use system libraries by default?
++OPTION(VTK_USE_SYSTEM_LIBRARIES "Use the system's libraries by default." OFF)
++MARK_AS_ADVANCED(VTK_USE_SYSTEM_LIBRARIES)
++
++#-----------------------------------------------------------------------------
+ # The third party macros are still used in one or two third party builds.
+ include(vtkThirdParty)
+
diff --git a/sci-libs/vtk/files/vtk-6.1.0-web.patch b/sci-libs/vtk/files/vtk-6.1.0-web.patch
new file mode 100644
index 000000000000..a85f2cd99640
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-web.patch
@@ -0,0 +1,25 @@
+From 58373b120db6d51c6d5eace38447cdb45ff858d1 Mon Sep 17 00:00:00 2001
+From: Patric Schmitz <patric.schmitz@rwth-aachen.de>
+Date: Tue, 28 Oct 2014 16:24:22 +0100
+Subject: [PATCH] Include vtkPythonPackages in Web/JavaScript/CMakeLists.txt
+
+Change-Id: Ie7bffa19bdaa78c5b090c886e50c1af76e2aadee
+---
+ Web/Applications/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Web/Applications/CMakeLists.txt b/Web/Applications/CMakeLists.txt
+index c9e7ad3..b4c9a60 100644
+--- a/Web/Applications/CMakeLists.txt
++++ b/Web/Applications/CMakeLists.txt
+@@ -12,6 +12,7 @@ set(WEB_APPLICATIONS
+
+ set(WEB_APPS_DEPENDS)
+
++include(vtkPythonPackages) # for copy_files_recursive
+ foreach(_app ${WEB_APPLICATIONS})
+ file(MAKE_DIRECTORY "${VTK_WWW_DIR}/apps/${_app}")
+
+--
+2.2.1
+
diff --git a/sci-libs/vtk/metadata.xml b/sci-libs/vtk/metadata.xml
new file mode 100644
index 000000000000..50ec9f78c323
--- /dev/null
+++ b/sci-libs/vtk/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <herd>java</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ <name>Justin Lecher</name>
+ </maintainer>
+ <use>
+ <flag name="all-modules">Build all modules</flag>
+ <flag name="boost">Add support for boost</flag>
+ <flag name="cg">Use nvidia's cg shaders</flag>
+ <flag name="gdal">Support for gdal formated data</flag>
+ <flag name="imaging">Building Imaging modules</flag>
+ <flag name="json">Support for json formated data</flag>
+ <flag name="kaapi">Use <pkg>sci-libs/xkaapi</pkg> to handle smp support</flag>
+ <flag name="offscreen">Offscreen rendering through OSMesa</flag>
+ <flag name="rendering">Building Redering modules</flag>
+ <flag name="tbb">Use <pkg>dev-cpp/tbb</pkg> to handle smp support</flag>
+ <flag name="views">Building Views modules</flag>
+ <flag name="web">Install web component</flag>
+ <flag name="xdmf2">Support for xdmf2 formated data</flag>
+ <flag name="R">Enable support for dev-lang/R</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-libs/vtk/vtk-6.0.0.ebuild b/sci-libs/vtk/vtk-6.0.0.ebuild
new file mode 100644
index 000000000000..4ad7b2863cac
--- /dev/null
+++ b/sci-libs/vtk/vtk-6.0.0.ebuild
@@ -0,0 +1,323 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR=ninja
+
+inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx
+
+# Short package version
+SPV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="http://www.vtk.org/"
+SRC_URI="
+ http://www.${PN}.org/files/release/${SPV}/${P/_rc/.rc}.tar.gz
+ doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )"
+
+LICENSE="BSD LGPL-2"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="
+ aqua boost cg doc examples imaging ffmpeg java mpi mysql odbc
+ offscreen postgres python qt4 rendering test theora tk tcl
+ video_cards_nvidia views R +X"
+
+REQUIRED_USE="
+ java? ( qt4 )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ tcl? ( rendering )
+ test? ( python )
+ tk? ( tcl )
+ ^^ ( X aqua offscreen )"
+
+RDEPEND="
+ dev-libs/expat
+ dev-libs/libxml2:2
+ media-libs/freetype
+ media-libs/libpng:0
+ media-libs/mesa
+ media-libs/libtheora
+ media-libs/tiff:0
+ sci-libs/exodusii
+ sci-libs/hdf5:=
+ sci-libs/netcdf-cxx:3
+ sys-libs/zlib
+ virtual/jpeg:0
+ virtual/opengl
+ >=x11-libs/gl2ps-1.3.8
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXt
+ boost? ( >=dev-libs/boost-1.40.0[mpi?] )
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ examples? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ sci-libs/vtkdata
+ )
+ ffmpeg? ( virtual/ffmpeg )
+ java? ( >=virtual/jre-1.5:* )
+ mpi? ( virtual/mpi[cxx,romio] )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ offscreen? ( media-libs/mesa[osmesa] )
+ postgres? ( dev-db/postgresql:= )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/sip[${PYTHON_USEDEP}]
+ )
+ qt4? (
+ dev-qt/designer:4
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ python? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+ )
+ tcl? ( dev-lang/tcl:0= )
+ tk? ( dev-lang/tk:0= )
+ video_cards_nvidia? ( media-video/nvidia-settings )
+ R? ( dev-lang/R )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ java? ( >=virtual/jdk-1.5 )
+ test? ( sci-libs/vtkdata )"
+
+S="${WORKDIR}"/VTK${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cg-path.patch
+ "${FILESDIR}"/${P}-install.patch
+ "${FILESDIR}"/${P}-system.patch
+ "${FILESDIR}"/${P}-netcdf.patch
+ "${FILESDIR}"/${P}-vtkpython.patch
+ )
+
+RESTRICT=test
+
+pkg_setup() {
+ use java && java-pkg-opt-2_pkg_setup
+ use python && python-single-r1_pkg_setup
+
+ append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
+}
+
+src_prepare() {
+ sed \
+ -e 's:libproj4:libproj:g' \
+ -e 's:lib_proj.h:lib_abi.h:g' \
+ -i CMake/FindLIBPROJ4.cmake || die
+
+ local x
+ for x in expat freetype gl2ps hdf5 jpeg libxml2 netcdf oggtheora png tiff zlib; do
+ rm -r ThirdParty/${x}/vtk${x} || die
+ done
+
+ if use examples || use test; then
+ # Replace relative path ../../../VTKData with
+ # otherwise it will break on symlinks.
+ grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \
+ sed \
+ -e "s|\.\./\.\./\.\./\.\./VTKData|${EPREFIX}/usr/share/vtk/data|g" \
+ -e "s|\.\./\.\./\.\./\.\./\.\./VTKData|${EPREFIX}/usr/share/vtk/data|g" \
+ -i || die
+ fi
+
+ use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ # general configuration
+ local mycmakeargs=(
+ -Wno-dev
+# -DCMAKE_SKIP_RPATH=YES
+ -DVTK_DIR="${S}"
+ -DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
+ -DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DVTK_CUSTOM_LIBRARY_SUFFIX=""
+ -DBUILD_SHARED_LIBS=ON
+ -DVTK_USE_SYSTEM_EXPAT=ON
+ -DVTK_USE_SYSTEM_FREETYPE=ON
+ -DVTK_USE_SYSTEM_FreeType=ON
+ -DVTK_USE_SYSTEM_GL2PS=ON
+ -DVTK_USE_SYSTEM_HDF5=ON
+ -DVTK_USE_SYSTEM_JPEG=ON
+ -DVTK_USE_SYSTEM_LIBPROJ4=OFF
+# -DLIBPROJ4_DIR="${EPREFIX}/usr"
+ -DVTK_USE_SYSTEM_LIBXML2=ON
+ -DVTK_USE_SYSTEM_LibXml2=ON
+ -DVTK_USE_SYSTEM_NETCDF=ON
+ -DVTK_USE_SYSTEM_OGGTHEORA=ON
+ -DVTK_USE_SYSTEM_PNG=ON
+ -DVTK_USE_SYSTEM_TIFF=ON
+# -DVTK_USE_SYSTEM_XDMF2=ON
+ -DVTK_USE_SYSTEM_ZLIB=ON
+ -DVTK_USE_SYSTEM_LIBRARIES=ON
+ -DVTK_USE_GL2PS=ON
+ -DVTK_USE_PARALLEL=ON
+ )
+
+ mycmakeargs+=(
+ -DVTK_EXTRA_COMPILER_WARNINGS=ON
+ -DVTK_Group_StandAlone=ON
+ )
+
+ mycmakeargs+=(
+ $(cmake-utils_use_build doc DOCUMENTATION)
+ $(cmake-utils_use_build examples EXAMPLES)
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS)
+ $(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
+ $(cmake-utils_use imaging VTK_Group_Imaging)
+ $(cmake-utils_use mpi VTK_Group_MPI)
+ $(cmake-utils_use qt4 VTK_Group_Qt)
+ $(cmake-utils_use rendering VTK_Group_Rendering)
+ $(cmake-utils_use tk VTK_Group_Tk)
+ $(cmake-utils_use views VTK_Group_Views)
+ $(cmake-utils_use java VTK_WRAP_JAVA)
+ $(cmake-utils_use python VTK_WRAP_PYTHON)
+ $(cmake-utils_use python VTK_WRAP_PYTHON_SIP)
+ $(cmake-utils_use tcl VTK_WRAP_TCL)
+# -DVTK_BUILD_ALL_MODULES=ON
+ )
+
+ mycmakeargs+=(
+ $(cmake-utils_use boost VTK_USE_BOOST)
+ $(cmake-utils_use cg VTK_USE_CG_SHADERS)
+ $(cmake-utils_use odbc VTK_USE_ODBC)
+ $(cmake-utils_use offscreen VTK_USE_OFFSCREEN)
+ $(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA)
+ $(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER)
+ $(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
+ $(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL)
+ $(cmake-utils_use R Module_vtkFiltersStatisticsGnuR)
+ $(cmake-utils_use X VTK_USE_X)
+ )
+
+ # Apple stuff, does it really work?
+ mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) )
+
+ if use java; then
+# local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm
+#
+# mycmakeargs+=(
+# -DJAVAC=${EPREFIX}/usr/bin/javac
+# -DJAVAC=$(java-config -c)
+# -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
+# -DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include
+# -DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux
+# )
+#
+ if [ "${ARCH}" == "amd64" ]; then
+ mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" )
+ else
+ mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" )
+ fi
+ fi
+ if use python; then
+ mycmakeargs+=(
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
+ -DSIP_INCLUDE_DIR="$(python_get_includedir)"
+ -DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
+ -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${PREFIX} --root=${D}"
+ )
+ fi
+
+ if use qt4; then
+ mycmakeargs+=(
+ -DVTK_USE_QVTK=ON
+ -DVTK_USE_QVTK_OPENGL=ON
+ -DVTK_USE_QVTK_QTOPENGL=ON
+ -DQT_WRAP_CPP=ON
+ -DQT_WRAP_UI=ON
+ -DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt4/plugins/designer
+ -DDESIRED_QT_VERSION=4
+ -DQT_MOC_EXECUTABLE="$(qt4_get_bindir)/moc"
+ -DQT_UIC_EXECUTABLE="$(qt4_get_bindir)/uic"
+ -DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt4"
+ -DQT_QMAKE_EXECUTABLE="$(qt4_get_bindir)/qmake"
+ )
+ fi
+
+ if use R; then
+ mycmakeargs+=(
+# -DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas)
+# -DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+ -DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
+ -DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
+ )
+ fi
+
+ cmake-utils_src_configure
+
+ cat >> "${BUILD_DIR}"/Utilities/MaterialLibrary/ProcessShader.sh <<- EOF
+ #!${EPREFIX}/bin/bash
+
+ export LD_LIBRARY_PATH="${BUILD_DIR}"/lib
+ "${BUILD_DIR}"/bin/vtkProcessShader \$@
+ EOF
+ chmod 750 "${BUILD_DIR}"/Utilities/MaterialLibrary/ProcessShader.sh || die
+}
+
+src_test() {
+ local tcllib
+ ln -sf "${BUILD_DIR}"/lib "${BUILD_DIR}"/lib/Release || die
+ for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
+ ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die
+ done
+ export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
+ local VIRTUALX_COMMAND="cmake-utils_src_test"
+# local VIRTUALX_COMMAND="cmake-utils_src_test -R Java"
+# local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365"
+ virtualmake
+}
+
+src_install() {
+ # install docs
+ HTML_DOCS=( "${S}"/README.html )
+
+ cmake-utils_src_install
+
+ use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
+
+ if use tcl; then
+ # install Tcl docs
+ docinto vtk_tcl
+ dodoc "${S}"/Wrapping/Tcl/README
+ fi
+
+ # install examples
+ if use examples; then
+ insinto /usr/share/${PN}
+ mv -v Examples examples || die
+ doins -r examples
+ fi
+
+ #install big docs
+ if use doc; then
+ cd "${WORKDIR}"/html || die
+ rm -f *.md5 || die "Failed to remove superfluous hashes"
+ einfo "Installing API docs. This may take some time."
+ insinto "/usr/share/doc/${PF}/api-docs"
+ doins -r ./*
+ fi
+
+ # environment
+ cat >> "${T}"/40${PN} <<- EOF
+ VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+ VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
+ VTKHOME=${EPREFIX}/usr
+ EOF
+ doenvd "${T}"/40${PN}
+}
diff --git a/sci-libs/vtk/vtk-6.1.0-r1.ebuild b/sci-libs/vtk/vtk-6.1.0-r1.ebuild
new file mode 100644
index 000000000000..ba8425895d4f
--- /dev/null
+++ b/sci-libs/vtk/vtk-6.1.0-r1.ebuild
@@ -0,0 +1,389 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR=ninja
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
+
+# Short package version
+SPV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="http://www.vtk.org/"
+SRC_URI="
+ http://www.${PN}.org/files/release/${SPV}/VTK-${PV}.tar.gz
+ doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )
+ test? (
+ http://www.${PN}.org/files/release/${SPV}/VTKData-${PV}.tar.gz
+ http://www.${PN}.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
+ )
+ "
+
+LICENSE="BSD LGPL-2"
+KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="
+ all-modules aqua boost cg doc examples imaging ffmpeg gdal java json kaapi mpi
+ mysql odbc offscreen postgres python qt4 rendering smp tbb test theora tk tcl
+ video_cards_nvidia views web xdmf2 R +X"
+
+REQUIRED_USE="
+ all-modules? ( python xdmf2 )
+ java? ( qt4 )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ tcl? ( rendering )
+ smp? ( ^^ ( kaapi tbb ) )
+ test? ( python )
+ tk? ( tcl )
+ web? ( python )
+ ^^ ( X aqua offscreen )
+ "
+
+RDEPEND="
+ dev-libs/expat
+ dev-libs/jsoncpp
+ dev-libs/libxml2:2
+ >=media-libs/freetype-2.5.4
+ media-libs/libpng:0
+ media-libs/mesa
+ media-libs/libtheora
+ media-libs/tiff:0
+ sci-libs/exodusii
+ sci-libs/hdf5:=
+ sci-libs/netcdf-cxx:3
+ sys-libs/zlib
+ virtual/jpeg:0
+ virtual/opengl
+ >=x11-libs/gl2ps-1.3.8
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXt
+ boost? ( >=dev-libs/boost-1.40.0[mpi?] )
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ examples? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ sci-libs/vtkdata
+ )
+ ffmpeg? ( virtual/ffmpeg )
+ gdal? ( sci-libs/gdal )
+ java? ( >=virtual/jre-1.5:* )
+ kaapi? ( <sci-libs/xkaapi-3 )
+ mpi? (
+ virtual/mpi[cxx,romio]
+ python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ offscreen? ( media-libs/mesa[osmesa] )
+ postgres? ( dev-db/postgresql:= )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/sip[${PYTHON_USEDEP}]
+ )
+ )
+ qt4? (
+ dev-qt/designer:4
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ python? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+ )
+ tbb? ( dev-cpp/tbb )
+ tcl? ( dev-lang/tcl:0= )
+ tk? ( dev-lang/tk:0= )
+ video_cards_nvidia? ( media-video/nvidia-settings )
+ web? (
+ ${WEBAPP_DEPEND}
+ python? (
+ dev-python/autobahn[${PYTHON_USEDEP}]
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+ )
+ )
+ xdmf2? ( sci-libs/xdmf2 )
+ R? ( dev-lang/R )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ java? ( >=virtual/jdk-1.5 )"
+
+S="${WORKDIR}"/VTK-${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-freetype.patch
+ "${FILESDIR}"/${P}-install.patch
+ "${FILESDIR}"/${P}-system.patch
+ "${FILESDIR}"/${P}-netcdf.patch
+ "${FILESDIR}"/${P}-web.patch
+ "${FILESDIR}"/${P}-glext.patch
+ "${FILESDIR}"/${P}-memset.patch
+ )
+
+RESTRICT=test
+
+pkg_setup() {
+ use java && java-pkg-opt-2_pkg_setup
+ use python && python-single-r1_pkg_setup
+ use web && webapp_pkg_setup
+
+ append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
+}
+
+src_prepare() {
+ sed \
+ -e 's:libproj4:libproj:g' \
+ -e 's:lib_proj.h:lib_abi.h:g' \
+ -i CMake/FindLIBPROJ4.cmake || die
+
+ local x
+ # missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
+ for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
+ ebegin "Dropping bundled ${x}"
+ rm -r ThirdParty/${x}/vtk${x} || die
+ eend $?
+ done
+ rm -r \
+ ThirdParty/AutobahnPython/autobahn \
+ ThirdParty/Twisted/twisted \
+ ThirdParty/ZopeInterface/zope \
+ || die
+
+ use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+ if use mpi; then
+ export CC=mpicc
+ export CXX=mpicxx
+ export FC=mpif90
+ export F90=mpif90
+ export F77=mpif77
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ # general configuration
+ local mycmakeargs=(
+ -Wno-dev
+# -DCMAKE_SKIP_RPATH=YES
+ -DVTK_DIR="${S}"
+ -DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
+ -DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DVTK_CUSTOM_LIBRARY_SUFFIX=""
+ -DBUILD_SHARED_LIBS=ON
+ -DVTK_USE_SYSTEM_AUTOBAHN=ON
+ -DVTK_USE_SYSTEM_EXPAT=ON
+ -DVTK_USE_SYSTEM_FREETYPE=ON
+ -DVTK_USE_SYSTEM_FreeType=ON
+ -DVTK_USE_SYSTEM_GL2PS=ON
+ -DVTK_USE_SYSTEM_HDF5=ON
+ -DVTK_USE_SYSTEM_JPEG=ON
+ -DVTK_USE_SYSTEM_LIBPROJ4=OFF
+# -DLIBPROJ4_DIR="${EPREFIX}/usr"
+ -DVTK_USE_SYSTEM_LIBXML2=ON
+ -DVTK_USE_SYSTEM_LibXml2=ON
+ -DVTK_USE_SYSTEM_NETCDF=ON
+ -DVTK_USE_SYSTEM_OGGTHEORA=ON
+ -DVTK_USE_SYSTEM_PNG=ON
+ -DVTK_USE_SYSTEM_TIFF=ON
+ -DVTK_USE_SYSTEM_TWISTED=ON
+ -DVTK_USE_SYSTEM_XDMF2=OFF
+ -DVTK_USE_SYSTEM_XDMF3=OFF
+ -DVTK_USE_SYSTEM_ZLIB=ON
+ -DVTK_USE_SYSTEM_ZOPE=ON
+ -DVTK_USE_SYSTEM_LIBRARIES=ON
+ -DVTK_USE_GL2PS=ON
+ -DVTK_USE_LARGE_DATA=ON
+ -DVTK_USE_PARALLEL=ON
+ )
+
+ mycmakeargs+=(
+ -DVTK_EXTRA_COMPILER_WARNINGS=ON
+ -DVTK_Group_StandAlone=ON
+ )
+
+ mycmakeargs+=(
+ $(cmake-utils_use_build doc DOCUMENTATION)
+ $(cmake-utils_use_build examples EXAMPLES)
+ $(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS)
+ $(cmake-utils_use all-modules VTK_BUILD_ALL_MODULES)
+ $(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
+ $(cmake-utils_use imaging VTK_Group_Imaging)
+ $(cmake-utils_use mpi VTK_Group_MPI)
+ $(cmake-utils_use qt4 VTK_Group_Qt)
+ $(cmake-utils_use rendering VTK_Group_Rendering)
+ $(cmake-utils_use tk VTK_Group_Tk)
+ $(cmake-utils_use views VTK_Group_Views)
+ $(cmake-utils_use web VTK_Group_Web)
+ $(cmake-utils_use web VTK_WWW_DIR="${ED}/${MY_HTDOCSDIR}")
+ $(cmake-utils_use java VTK_WRAP_JAVA)
+ $(cmake-utils_use python VTK_WRAP_PYTHON)
+ $(cmake-utils_use python VTK_WRAP_PYTHON_SIP)
+ $(cmake-utils_use tcl VTK_WRAP_TCL)
+ )
+
+ mycmakeargs+=(
+ $(cmake-utils_use boost VTK_USE_BOOST)
+ $(cmake-utils_use cg VTK_USE_CG_SHADERS)
+ $(cmake-utils_use odbc VTK_USE_ODBC)
+ $(cmake-utils_use offscreen VTK_USE_OFFSCREEN)
+ $(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA)
+ $(cmake-utils_use smp vtkFiltersSMP)
+ $(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER)
+ $(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL)
+ $(cmake-utils_use R Module_vtkFiltersStatisticsGnuR)
+ $(cmake-utils_use X VTK_USE_X)
+ )
+
+ # IO
+ mycmakeargs+=(
+ $(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
+ $(cmake-utils_use gdal Module_vtkIOGDAL)
+ $(cmake-utils_use json Module_vtkIOGeoJSON)
+ $(cmake-utils_use xdmf2 Module_vtkIOXdmf2)
+ )
+ # Apple stuff, does it really work?
+ mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) )
+
+ if use examples || use test; then
+ mycmakeargs+=( -DBUILD_TESTING=ON )
+ fi
+
+ if use kaapi; then
+ mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
+ elif use tbb; then
+ mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
+ else
+ mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
+ fi
+
+ if use java; then
+# local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm
+#
+# mycmakeargs+=(
+# -DJAVAC=${EPREFIX}/usr/bin/javac
+# -DJAVAC=$(java-config -c)
+# -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
+# -DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include
+# -DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux
+# )
+#
+ if [ "${ARCH}" == "amd64" ]; then
+ mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" )
+ else
+ mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" )
+ fi
+ fi
+ if use python; then
+ mycmakeargs+=(
+ -DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
+ -DSIP_INCLUDE_DIR="$(python_get_includedir)"
+ -DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
+ -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${PREFIX} --root=${D}"
+ )
+ fi
+
+ if use qt4; then
+ mycmakeargs+=(
+ -DVTK_USE_QVTK=ON
+ -DVTK_USE_QVTK_OPENGL=ON
+ -DVTK_USE_QVTK_QTOPENGL=ON
+ -DQT_WRAP_CPP=ON
+ -DQT_WRAP_UI=ON
+ -DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt4/plugins/designer
+ -DDESIRED_QT_VERSION=4
+ -DVTK_QT_VERSION=4
+ -DQT_MOC_EXECUTABLE="$(qt4_get_bindir)/moc"
+ -DQT_UIC_EXECUTABLE="$(qt4_get_bindir)/uic"
+ -DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt4"
+ -DQT_QMAKE_EXECUTABLE="$(qt4_get_bindir)/qmake"
+ )
+ fi
+
+ if use R; then
+ mycmakeargs+=(
+# -DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas)
+# -DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+ -DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
+ -DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ local tcllib
+ ln -sf "${BUILD_DIR}"/lib "${BUILD_DIR}"/lib/Release || die
+ for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
+ ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die
+ done
+ export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
+ local VIRTUALX_COMMAND="cmake-utils_src_test"
+# local VIRTUALX_COMMAND="cmake-utils_src_test -R Java"
+# local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365"
+ virtualmake
+}
+
+src_install() {
+ use web && webapp_src_preinst
+ # install docs
+ HTML_DOCS=( "${S}"/README.html )
+
+ cmake-utils_src_install
+
+ use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
+
+ if use tcl; then
+ # install Tcl docs
+ docinto vtk_tcl
+ dodoc "${S}"/Wrapping/Tcl/README
+ fi
+
+ # install examples
+ if use examples; then
+ insinto /usr/share/${PN}
+ mv -v Examples examples || die
+ doins -r examples
+ fi
+
+ #install big docs
+ if use doc; then
+ cd "${WORKDIR}"/html || die
+ rm -f *.md5 || die "Failed to remove superfluous hashes"
+ einfo "Installing API docs. This may take some time."
+ docinto html
+ dodoc -r ./*
+ fi
+
+ # environment
+ cat >> "${T}"/40${PN} <<- EOF
+ VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+ VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
+ VTKHOME=${EPREFIX}/usr
+ EOF
+ doenvd "${T}"/40${PN}
+
+ use web && webapp_src_install
+}
+
+# webapp.eclass exports these but we want it optional #534036
+pkg_postinst() {
+ use web && webapp_pkg_postinst
+}
+
+pkg_prerm() {
+ use web && webapp_pkg_prerm
+}
diff --git a/sci-libs/vtk/vtk-6.1.0.ebuild b/sci-libs/vtk/vtk-6.1.0.ebuild
new file mode 100644
index 000000000000..d6e71e1eb2b9
--- /dev/null
+++ b/sci-libs/vtk/vtk-6.1.0.ebuild
@@ -0,0 +1,379 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR=ninja
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
+
+# Short package version
+SPV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="http://www.vtk.org/"
+SRC_URI="
+ http://www.${PN}.org/files/release/${SPV}/VTK-${PV}.tar.gz
+ doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )
+ test? (
+ http://www.${PN}.org/files/release/${SPV}/VTKData-${PV}.tar.gz
+ http://www.${PN}.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
+ )
+ "
+
+LICENSE="BSD LGPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="
+ all-modules aqua boost cg doc examples imaging ffmpeg gdal java json kaapi mpi
+ mysql odbc offscreen postgres python qt4 rendering smp tbb test theora tk tcl
+ video_cards_nvidia views web xdmf2 R +X"
+
+REQUIRED_USE="
+ all-modules? ( python xdmf2 )
+ java? ( qt4 )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ tcl? ( rendering )
+ smp? ( ^^ ( kaapi tbb ) )
+ test? ( python )
+ tk? ( tcl )
+ web? ( python )
+ ^^ ( X aqua offscreen )
+ "
+
+RDEPEND="
+ dev-libs/expat
+ dev-libs/libxml2:2
+ >=media-libs/freetype-2.5.4
+ media-libs/libpng:0
+ media-libs/mesa
+ media-libs/libtheora
+ media-libs/tiff:0
+ sci-libs/exodusii
+ sci-libs/hdf5:=
+ sci-libs/netcdf-cxx:3
+ sys-libs/zlib
+ virtual/jpeg:0
+ virtual/opengl
+ >=x11-libs/gl2ps-1.3.8
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXt
+ boost? ( >=dev-libs/boost-1.40.0[mpi?] )
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ examples? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ sci-libs/vtkdata
+ )
+ ffmpeg? ( virtual/ffmpeg )
+ gdal? ( sci-libs/gdal )
+ java? ( >=virtual/jre-1.5:* )
+ kaapi? ( <sci-libs/xkaapi-3 )
+ mpi? (
+ virtual/mpi[cxx,romio]
+ python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ offscreen? ( media-libs/mesa[osmesa] )
+ postgres? ( dev-db/postgresql:= )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/sip[${PYTHON_USEDEP}]
+ )
+ )
+ qt4? (
+ dev-qt/designer:4
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ python? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+ )
+ tbb? ( dev-cpp/tbb )
+ tcl? ( dev-lang/tcl:0= )
+ tk? ( dev-lang/tk:0= )
+ video_cards_nvidia? ( media-video/nvidia-settings )
+ web? (
+ ${WEBAPP_DEPEND}
+ python? (
+ dev-python/autobahn[${PYTHON_USEDEP}]
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+ )
+ )
+ xdmf2? ( sci-libs/xdmf2 )
+ R? ( dev-lang/R )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ java? ( >=virtual/jdk-1.5 )"
+
+S="${WORKDIR}"/VTK-${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-freetype.patch
+ "${FILESDIR}"/${P}-install.patch
+ "${FILESDIR}"/${P}-system.patch
+ "${FILESDIR}"/${P}-netcdf.patch
+ "${FILESDIR}"/${P}-web.patch
+ "${FILESDIR}"/${P}-glext.patch
+ )
+
+RESTRICT=test
+
+pkg_setup() {
+ use java && java-pkg-opt-2_pkg_setup
+ use python && python-single-r1_pkg_setup
+ use web && webapp_pkg_setup
+
+ append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
+}
+
+src_prepare() {
+ sed \
+ -e 's:libproj4:libproj:g' \
+ -e 's:lib_proj.h:lib_abi.h:g' \
+ -i CMake/FindLIBPROJ4.cmake || die
+
+ local x
+ # missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
+ for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
+ ebegin "Dropping bundled ${x}"
+ rm -r ThirdParty/${x}/vtk${x} || die
+ eend $?
+ done
+ rm -r \
+ ThirdParty/AutobahnPython/autobahn \
+ ThirdParty/Twisted/twisted \
+ ThirdParty/ZopeInterface/zope \
+ || die
+
+ use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+ if use mpi; then
+ export CC=mpicc
+ export CXX=mpicxx
+ export FC=mpif90
+ export F90=mpif90
+ export F77=mpif77
+ fi
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ # general configuration
+ local mycmakeargs=(
+ -Wno-dev
+# -DCMAKE_SKIP_RPATH=YES
+ -DVTK_DIR="${S}"
+ -DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
+ -DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DVTK_CUSTOM_LIBRARY_SUFFIX=""
+ -DBUILD_SHARED_LIBS=ON
+ -DVTK_USE_SYSTEM_AUTOBAHN=ON
+ -DVTK_USE_SYSTEM_EXPAT=ON
+ -DVTK_USE_SYSTEM_FREETYPE=ON
+ -DVTK_USE_SYSTEM_FreeType=ON
+ -DVTK_USE_SYSTEM_GL2PS=ON
+ -DVTK_USE_SYSTEM_HDF5=ON
+ -DVTK_USE_SYSTEM_JPEG=ON
+ -DVTK_USE_SYSTEM_LIBPROJ4=OFF
+# -DLIBPROJ4_DIR="${EPREFIX}/usr"
+ -DVTK_USE_SYSTEM_LIBXML2=ON
+ -DVTK_USE_SYSTEM_LibXml2=ON
+ -DVTK_USE_SYSTEM_NETCDF=ON
+ -DVTK_USE_SYSTEM_OGGTHEORA=ON
+ -DVTK_USE_SYSTEM_PNG=ON
+ -DVTK_USE_SYSTEM_TIFF=ON
+ -DVTK_USE_SYSTEM_TWISTED=ON
+ -DVTK_USE_SYSTEM_XDMF2=OFF
+ -DVTK_USE_SYSTEM_XDMF3=OFF
+ -DVTK_USE_SYSTEM_ZLIB=ON
+ -DVTK_USE_SYSTEM_ZOPE=ON
+ -DVTK_USE_SYSTEM_LIBRARIES=ON
+ -DVTK_USE_GL2PS=ON
+ -DVTK_USE_LARGE_DATA=ON
+ -DVTK_USE_PARALLEL=ON
+ -DVTK_INSTALL_NO_DEVELOPMENT=ON
+ )
+
+ mycmakeargs+=(
+ -DVTK_EXTRA_COMPILER_WARNINGS=ON
+ -DVTK_Group_StandAlone=ON
+ )
+
+ mycmakeargs+=(
+ $(cmake-utils_use_build doc DOCUMENTATION)
+ $(cmake-utils_use_build examples EXAMPLES)
+ $(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS)
+ $(cmake-utils_use all-modules VTK_BUILD_ALL_MODULES)
+ $(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
+ $(cmake-utils_use imaging VTK_Group_Imaging)
+ $(cmake-utils_use mpi VTK_Group_MPI)
+ $(cmake-utils_use qt4 VTK_Group_Qt)
+ $(cmake-utils_use rendering VTK_Group_Rendering)
+ $(cmake-utils_use tk VTK_Group_Tk)
+ $(cmake-utils_use views VTK_Group_Views)
+ $(cmake-utils_use web VTK_Group_Web)
+ $(cmake-utils_use web VTK_WWW_DIR="${ED}/${MY_HTDOCSDIR}")
+ $(cmake-utils_use java VTK_WRAP_JAVA)
+ $(cmake-utils_use python VTK_WRAP_PYTHON)
+ $(cmake-utils_use python VTK_WRAP_PYTHON_SIP)
+ $(cmake-utils_use tcl VTK_WRAP_TCL)
+ )
+
+ mycmakeargs+=(
+ $(cmake-utils_use boost VTK_USE_BOOST)
+ $(cmake-utils_use cg VTK_USE_CG_SHADERS)
+ $(cmake-utils_use odbc VTK_USE_ODBC)
+ $(cmake-utils_use offscreen VTK_USE_OFFSCREEN)
+ $(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA)
+ $(cmake-utils_use smp vtkFiltersSMP)
+ $(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER)
+ $(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL)
+ $(cmake-utils_use R Module_vtkFiltersStatisticsGnuR)
+ $(cmake-utils_use X VTK_USE_X)
+ )
+
+ # IO
+ mycmakeargs+=(
+ $(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
+ $(cmake-utils_use gdal Module_vtkIOGDAL)
+ $(cmake-utils_use json Module_vtkIOGeoJSON)
+ $(cmake-utils_use xdmf2 Module_vtkIOXdmf2)
+ )
+ # Apple stuff, does it really work?
+ mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) )
+
+ if use examples || use test; then
+ mycmakeargs+=( -DBUILD_TESTING=ON )
+ fi
+
+ if use kaapi; then
+ mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
+ elif use tbb; then
+ mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
+ else
+ mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
+ fi
+
+ if use java; then
+# local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm
+#
+# mycmakeargs+=(
+# -DJAVAC=${EPREFIX}/usr/bin/javac
+# -DJAVAC=$(java-config -c)
+# -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
+# -DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include
+# -DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux
+# )
+#
+ if [ "${ARCH}" == "amd64" ]; then
+ mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" )
+ else
+ mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" )
+ fi
+ fi
+ if use python; then
+ mycmakeargs+=(
+ -DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
+ -DSIP_INCLUDE_DIR="$(python_get_includedir)"
+ -DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
+ -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${PREFIX} --root=${D}"
+ )
+ fi
+
+ if use qt4; then
+ mycmakeargs+=(
+ -DVTK_USE_QVTK=ON
+ -DVTK_USE_QVTK_OPENGL=ON
+ -DVTK_USE_QVTK_QTOPENGL=ON
+ -DQT_WRAP_CPP=ON
+ -DQT_WRAP_UI=ON
+ -DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt4/plugins/designer
+ -DDESIRED_QT_VERSION=4
+ -DVTK_QT_VERSION=4
+ -DQT_MOC_EXECUTABLE="$(qt4_get_bindir)/moc"
+ -DQT_UIC_EXECUTABLE="$(qt4_get_bindir)/uic"
+ -DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt4"
+ -DQT_QMAKE_EXECUTABLE="$(qt4_get_bindir)/qmake"
+ )
+ fi
+
+ if use R; then
+ mycmakeargs+=(
+# -DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas)
+# -DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+ -DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
+ -DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ local tcllib
+ ln -sf "${BUILD_DIR}"/lib "${BUILD_DIR}"/lib/Release || die
+ for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
+ ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die
+ done
+ export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
+ local VIRTUALX_COMMAND="cmake-utils_src_test"
+# local VIRTUALX_COMMAND="cmake-utils_src_test -R Java"
+# local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365"
+ virtualmake
+}
+
+src_install() {
+ use web && webapp_src_preinst
+ # install docs
+ HTML_DOCS=( "${S}"/README.html )
+
+ cmake-utils_src_install
+
+ use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
+
+ if use tcl; then
+ # install Tcl docs
+ docinto vtk_tcl
+ dodoc "${S}"/Wrapping/Tcl/README
+ fi
+
+ # install examples
+ if use examples; then
+ insinto /usr/share/${PN}
+ mv -v Examples examples || die
+ doins -r examples
+ fi
+
+ #install big docs
+ if use doc; then
+ cd "${WORKDIR}"/html || die
+ rm -f *.md5 || die "Failed to remove superfluous hashes"
+ einfo "Installing API docs. This may take some time."
+ docinto html
+ dodoc -r ./*
+ fi
+
+ # environment
+ cat >> "${T}"/40${PN} <<- EOF
+ VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+ VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
+ VTKHOME=${EPREFIX}/usr
+ EOF
+ doenvd "${T}"/40${PN}
+
+ use web && webapp_src_install
+}