summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-visualization')
-rw-r--r--sci-visualization/paraview/ChangeLog12
-rw-r--r--sci-visualization/paraview/Manifest21
-rw-r--r--sci-visualization/paraview/files/paraview-4.0.1-gcc-4.7.patch28
-rw-r--r--sci-visualization/paraview/files/paraview-4.0.1-removesqlite.patch517
-rw-r--r--sci-visualization/paraview/files/paraview-4.0.1-vtk-cg-path.patch36
-rw-r--r--sci-visualization/paraview/files/paraview-4.0.1-vtknetcd.patch79
-rw-r--r--sci-visualization/paraview/files/paraview-4.0.1-xdmf-cstring.patch12
-rw-r--r--sci-visualization/paraview/paraview-4.0.1.ebuild271
8 files changed, 970 insertions, 6 deletions
diff --git a/sci-visualization/paraview/ChangeLog b/sci-visualization/paraview/ChangeLog
index 6feba211d16e..dd81cf8bb87e 100644
--- a/sci-visualization/paraview/ChangeLog
+++ b/sci-visualization/paraview/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sci-visualization/paraview
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-visualization/paraview/ChangeLog,v 1.69 2013/05/29 16:37:35 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-visualization/paraview/ChangeLog,v 1.70 2013/07/01 23:33:28 hasufell Exp $
+
+*paraview-4.0.1 (01 Jul 2013)
+
+ 01 Jul 2013; Julian Ospald <hasufell@gentoo.org> +paraview-4.0.1.ebuild,
+ +files/paraview-4.0.1-gcc-4.7.patch,
+ +files/paraview-4.0.1-removesqlite.patch,
+ +files/paraview-4.0.1-vtk-cg-path.patch,
+ +files/paraview-4.0.1-vtknetcd.patch,
+ +files/paraview-4.0.1-xdmf-cstring.patch:
+ version bump
29 May 2013; Justin Lecher <jlec@gentoo.org> paraview-3.98.0.ebuild,
paraview-3.98.0-r1.ebuild, metadata.xml:
diff --git a/sci-visualization/paraview/Manifest b/sci-visualization/paraview/Manifest
index 5705aaa2732d..d44f6b07f25f 100644
--- a/sci-visualization/paraview/Manifest
+++ b/sci-visualization/paraview/Manifest
@@ -1,5 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA256
AUX paraview-3.98.0-gcc-4.7.patch 759 SHA256 5f3b7b2cd25fb09004b5820ffb554a5fec21100f8048db257a67708d8abf04e0 SHA512 85164dc2931d960114d23b697022b2e1939513ccb32a0c5af588d980f919a112653b170f076265bea692f6aae0d2efd89ed08597cf13dbfc5c3b8a2292980e02 WHIRLPOOL e4fd9d14ae2065be600f6ed3b00ced9bb1273f5a32fc4eb46d6ccf160d4003abb805a81d06080339c1dba255ac9d702e0c94d8596c6fc1de07d35161b62cc1a9
AUX paraview-3.98.0-mpi4py.patch 395 SHA256 070e1d79e2a22f971950d8f08f4bfab28cb07b450060f8dd2c4bfc28f4d6fd96 SHA512 2bd09384bc88c5182466465c2b513ec0461d792b36b7d0be608693c557c3fc2a2b7d401c1453c14149748343ac9f7f5d57c26c92f6e7eff240efcc50811e4ed9 WHIRLPOOL 86ecbc391883e7b5b4908fffc800811dcac148833bbe6202d8b8141ea7f1ed06e72ec7f03ca43e8585eaeebe6f9680493d0f0501cffcef89b056fcb61dc78ad3
@@ -8,15 +8,26 @@ AUX paraview-3.98.0-removesqlite.patch 16403 SHA256 e7fee0cd7e0cd08a4de35451add1
AUX paraview-3.98.0-vtk-cg-path.patch 1087 SHA256 291e1dd64351dcac5c1595a10f9c83080b073ce91f0bc8e2f463b855d6920645 SHA512 e1a9bb371af3c57e02de4c22c8cad6c0564bc7a85e9fbb2c0784bc610b81216f183983c70d1c7a5c8cbbe35a84577c9987878876b8b78df3bfbc75fef07614a3 WHIRLPOOL e83e0f5e99004b52ff5a0bac0c1446aabcc77f30653a8b26c0c18a78baea99d81ee84d65f88f1b890c457418cc3b234f99cd35d42286a050fd2d9b35f2396d70
AUX paraview-3.98.0-vtknetcd.patch 2775 SHA256 b972d38d99c43db18c92b5423d06f542eae843028e1f37dff102ea10979dfea1 SHA512 3da1cd798307059e3e4dd3da876da5579384c7fe8c41301b73540f8bc653457186f956505272bb20fafb12d5f756c79ae7c31d8e5b361e0f7f86de2f480ed61b WHIRLPOOL bbf8bba64eeb0d1830f5da7285ea3c848dccf7dbef6e2663bbadea37059d10f89af676e0b44b42f8283193ccbf36895a83981206767d401094dca3113396b544
AUX paraview-3.98.0-xdmf-cstring.patch 360 SHA256 4505a480b3775d20cde98f724a20c8b0dbf4f3baf6068013bf69b0e54c1f8473 SHA512 5577b7bae26959546795721d712c4e4f6a5403b35c0871040f6c74c07cd3aecd5b03e9f7a07ef49714b8adb4c7cc880385215b8742895006d2ad3dfeccc50472 WHIRLPOOL e0d0c1603ba4ca66fc05dd5049215f2c988f3452763772df35c7fd6a8cb6fa779fd4efbccd20a01f19778f7c0b1db78e0af12716137976ae7bf54923a6bc0642
+AUX paraview-4.0.1-gcc-4.7.patch 759 SHA256 5f3b7b2cd25fb09004b5820ffb554a5fec21100f8048db257a67708d8abf04e0 SHA512 85164dc2931d960114d23b697022b2e1939513ccb32a0c5af588d980f919a112653b170f076265bea692f6aae0d2efd89ed08597cf13dbfc5c3b8a2292980e02 WHIRLPOOL e4fd9d14ae2065be600f6ed3b00ced9bb1273f5a32fc4eb46d6ccf160d4003abb805a81d06080339c1dba255ac9d702e0c94d8596c6fc1de07d35161b62cc1a9
+AUX paraview-4.0.1-removesqlite.patch 16403 SHA256 e7fee0cd7e0cd08a4de35451add15fceae1775dd8a6898744917e7d9c76006d7 SHA512 d869d00f0060c48c4675ca831855b0d1813b2b96dd5f216db634495096c2f51aa9a82986a8cb6eb8e31030bc85af643d364bf89c50d22568332afdef7a6144a9 WHIRLPOOL bc9f104a9dc726039f368e7b808e828c9a11e7fbcc1509748da2b0565d924305045a1d7f130018437f18f103ad25154695df3dff2b9d3928dc20b866d9145a97
+AUX paraview-4.0.1-vtk-cg-path.patch 1087 SHA256 291e1dd64351dcac5c1595a10f9c83080b073ce91f0bc8e2f463b855d6920645 SHA512 e1a9bb371af3c57e02de4c22c8cad6c0564bc7a85e9fbb2c0784bc610b81216f183983c70d1c7a5c8cbbe35a84577c9987878876b8b78df3bfbc75fef07614a3 WHIRLPOOL e83e0f5e99004b52ff5a0bac0c1446aabcc77f30653a8b26c0c18a78baea99d81ee84d65f88f1b890c457418cc3b234f99cd35d42286a050fd2d9b35f2396d70
+AUX paraview-4.0.1-vtknetcd.patch 2775 SHA256 b972d38d99c43db18c92b5423d06f542eae843028e1f37dff102ea10979dfea1 SHA512 3da1cd798307059e3e4dd3da876da5579384c7fe8c41301b73540f8bc653457186f956505272bb20fafb12d5f756c79ae7c31d8e5b361e0f7f86de2f480ed61b WHIRLPOOL bbf8bba64eeb0d1830f5da7285ea3c848dccf7dbef6e2663bbadea37059d10f89af676e0b44b42f8283193ccbf36895a83981206767d401094dca3113396b544
+AUX paraview-4.0.1-xdmf-cstring.patch 360 SHA256 4505a480b3775d20cde98f724a20c8b0dbf4f3baf6068013bf69b0e54c1f8473 SHA512 5577b7bae26959546795721d712c4e4f6a5403b35c0871040f6c74c07cd3aecd5b03e9f7a07ef49714b8adb4c7cc880385215b8742895006d2ad3dfeccc50472 WHIRLPOOL e0d0c1603ba4ca66fc05dd5049215f2c988f3452763772df35c7fd6a8cb6fa779fd4efbccd20a01f19778f7c0b1db78e0af12716137976ae7bf54923a6bc0642
DIST ParaView-3.98.0-src.tgz 42160789 SHA256 582ac0d87360a05c471164c718d95f718388edf8b9349cf544c09f8a87660d2a SHA512 6fb31ce501f252b0e7f72c25a7e5e0b2f663819d44d6abf71b8aa3f78215e2bb5bfebc5fe336747f1cd35a2a42aa608d36c301025b9d761ad43be648a8a8abd5 WHIRLPOOL 4de683db37d6ed3f93cd6199b5e6e362bb43576b91d8567144602e88c424f7a87e2f6e53781f3958446bf6b0f025a0f0ecb61cc0bef945afb974fa4a1d625e3d
+DIST ParaView-v4.0.1-source.tgz 47827831 SHA256 1e04fcc085ee0305a163d9b6a66904fbb21e6a3fac69b275395c5ffc106e48e2 SHA512 be27b4c10f4881bcd85bfd81b0671f74358022809837620a0baf59f3c3090a5eb3afc1f78a561a3fcf9d4154875fb393c062c1b428579bc254ac7c1ff7214505 WHIRLPOOL ddac32f4be7d46b43f8f66f51ec7877442fd502fcc19b9864e284762b2cc0f3162f16766ca5c566b7f8201745ed6535cf95651f152a4d4476c2682a6432835c0
EBUILD paraview-3.98.0-r1.ebuild 8426 SHA256 c2271756660522f569d6b727ce9faab4faf0e1b2ad184b6804b3d400a7a1000a SHA512 2d73ad72b58d0e2472243aa9e7c59bd8eaaa66a4fe0800c586a0e8224524cfb5b9f53e2cf39bf5852d7db25f45c6557e01ac83cec6e2cf3f383aa9d8e713f56e WHIRLPOOL fa9ff25a2289a1b82c795ca20197ea3394fd6d5baf3a1db3165a772472502cd96f24a61fd144a1a06441d60e35af96844b5383d2eb664f710c94e230492318f4
EBUILD paraview-3.98.0.ebuild 8239 SHA256 989dc20e149ef14db82bcd05c3408f2c8c806fe84de859d0c4f946a04bef9877 SHA512 c6f373f36df543b46e29e1d215429fe092058c826423281bd1650ca9e9764ab0f52bc199a9710a459c1c8a9c204e7c2dea6c21eb72b24503c770570f5e92921c WHIRLPOOL d501d54e397367bcef0f87ef710b16b43f483f0c06ac214c796f3b5c18a978ddf76464133f8305df98ef1f6711a7fb42c856d58c4b94915939babc2710fa5903
-MISC ChangeLog 14537 SHA256 d7f154834d0864ddff1b440a6f144e312bd9b70ba1ea720a058e7fb632f56cf7 SHA512 073cca0ef31ba4f69f74513617885f392aa1cb36ed1f81107acd9e7c95b219e20758e024bc54c873f844ddc94463ae58cbb6d66297dfcd73c0d6872c34b300ae WHIRLPOOL acdfa3ec61e9419979e95fe2d11a29b571eadac1c0d34681a11ad15c32a8caf32419b079113102e54bfdb001c49ca5f6bbdfd84897684cc4a28ac0d638200a5c
+EBUILD paraview-4.0.1.ebuild 9112 SHA256 4fc7d8adb031365575fb383fe967ca932d5a8f6acb0d92619543d7e6805ff2f0 SHA512 2043bb880e5e0f65c81a8e2250f4bbdda56bfb2c78588f9682c99ffe9febc00420b6081868c4a812daf1fa801fd49182c249d3d1d4ffa6e4a51db16fc7c337c5 WHIRLPOOL 8756eddef601312a6b27a69cc78c3212d0bfa90d6fff553c72159d2f7ed6f9cf47195f1f0be22683c8509f7780caea21a4b3a022f99d80b764eda7a29f24a453
+MISC ChangeLog 14873 SHA256 247095fbdecfbc97bc112d0ea72e4cd4f570713465c5e9cd6764361681716c51 SHA512 88eb6f8e56198f1952a4bcf2b03360a3c9ba9fdcdf46413bcb90def790140c83f7ba39a336f3f3cc654666b97a8be285b13630205254c2ab735fd77616dcf173 WHIRLPOOL 93ecb56effb4d4bf216ea374b0e65d6b63e299242434a86182c0a91e680abbc2ec6f89b0bbedd6788366184a3e0cac4dbda4f0bd9f15b711ce6d8a709e21991a
MISC metadata.xml 735 SHA256 648a5e42e36e2e9134525d349b71c6addf1986934fb8510a60e304143eeecc9e SHA512 377cfa79808b2e75eadf5563fef1a0474f67eb6da4f5a6c47ed4f1f188af22979fe06be2b67bdf0b427cf77595ea9f507dd4c570137d38438dc74ef70d431156 WHIRLPOOL 573a07256245eabec115fb910b990a06386e582f37adebba4e135299cced7102cd8524fb655c162e1702fb0f5fe2008f7d463d855965d797ea4b136340ed506e
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
-iEYEAREKAAYFAlGmLtAACgkQgAnW8HDreRZhNQCfTSXxF8UzG1Z11Yk/KXYgn3b1
-5fYAn2GptJH7EqSg7FU0EfVPmpchhzTr
-=GnX5
+iQEcBAEBCAAGBQJR0hHLAAoJEFpvPKfnPDWze70H/2/5Cqxh1OIaB3SaYmPre/RA
+NNll6OgVBLN8hub6fkU5DCsiBs64tWEbp4tQ9WgCkibJ5bBoGAgWyNAuE1qMS0HE
+ZCxqM1YVd+wa9B5ArTsEtNg7DUAKMDt3eMzxpR/phig/gTSs/sLIOngeATnhUByc
+vFZ4t9LDOjgw+EJ7yh0diIFw/zMaN4fqSgjCOB15Rev6PwUEWtzPPdtUUakYZei9
+YI3weTgEc3e5MkSugNjNN6qxJIl9eoKQkp+LbX/SPzerSuMi4Pi13wa/kc1aDX1N
+Sa1eMIRvKchTdqW6TwuHVfb3lUcs8LIkAcVW2HF2Hf1NHo9kn+DW8P7IJ97V3tY=
+=K17E
-----END PGP SIGNATURE-----
diff --git a/sci-visualization/paraview/files/paraview-4.0.1-gcc-4.7.patch b/sci-visualization/paraview/files/paraview-4.0.1-gcc-4.7.patch
new file mode 100644
index 000000000000..1b941cfa9431
--- /dev/null
+++ b/sci-visualization/paraview/files/paraview-4.0.1-gcc-4.7.patch
@@ -0,0 +1,28 @@
+Description: fix FTBFS with gcc-4.7
+Author: Mathieu Malaterre <malat@debian.org>
+Origin: http://anonscm.debian.org/gitweb/?p=collab-maint/vtk.git;a=commitdiff;h=428e763c995bb303805e07da70c1a34fc103d208
+Reviewed-by: Anton Gladky <gladky.anton@gmail.com>
+Last-Update: 2012-05-08
+
+--- a/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx
++++ b/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx
+@@ -35,6 +35,8 @@
+ using namespace ftgl;
+ #endif
+
++#include <stdint.h>
++
+ // Print debug info
+ #define VTK_FTFC_DEBUG 0
+ #define VTK_FTFC_DEBUG_CD 0
+--- a/VTK/Rendering/FreeType/vtkFreeTypeUtilities.cxx
++++ b/VTK/Rendering/FreeType/vtkFreeTypeUtilities.cxx
+@@ -36,6 +36,8 @@
+ using namespace ftgl;
+ #endif
+
++#include <stdint.h>
++
+ // Print debug info
+
+ #define VTK_FTFC_DEBUG 0
diff --git a/sci-visualization/paraview/files/paraview-4.0.1-removesqlite.patch b/sci-visualization/paraview/files/paraview-4.0.1-removesqlite.patch
new file mode 100644
index 000000000000..be495b4fbb3a
--- /dev/null
+++ b/sci-visualization/paraview/files/paraview-4.0.1-removesqlite.patch
@@ -0,0 +1,517 @@
+Description: Import patch from VTK to remove sqlite
+Author: Mathieu Malaterre <mathieu.malaterre@gmail.com>
+Last-Update: Mon Feb 11 14:58:03 UTC 2013
+
+remove the internal copy of sqlite (vtksqlite)
+http://patch-tracker.debian.org/patch/series/view/paraview/3.14.1-7/removesqlite.patch
+
+--- VTK/IO/SQL/vtkSQLiteDatabase.cxx
++++ VTK/IO/SQL/vtkSQLiteDatabase.cxx
+@@ -29,7 +29,7 @@
+ #include <vtksys/ios/fstream>
+ #include <vtksys/ios/sstream>
+
+-#include <vtksqlite/vtk_sqlite3.h>
++#include <sqlite3.h>
+
+ vtkStandardNewMacro(vtkSQLiteDatabase);
+
+@@ -307,15 +307,15 @@
+ }
+ }
+
+- int result = vtk_sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance));
++ int result = sqlite3_open(this->DatabaseFileName, & (this->SQLiteInstance));
+
+- if (result != VTK_SQLITE_OK)
++ if (result != SQLITE_OK)
+ {
+ vtkDebugMacro(<<"SQLite open() failed. Error code is "
+ << result << " and message is "
+- << vtk_sqlite3_errmsg(this->SQLiteInstance) );
++ << sqlite3_errmsg(this->SQLiteInstance) );
+
+- vtk_sqlite3_close(this->SQLiteInstance);
++ sqlite3_close(this->SQLiteInstance);
+ return false;
+ }
+ else
+@@ -334,8 +334,8 @@
+ }
+ else
+ {
+- int result = vtk_sqlite3_close(this->SQLiteInstance);
+- if (result != VTK_SQLITE_OK)
++ int result = sqlite3_close(this->SQLiteInstance);
++ if (result != SQLITE_OK)
+ {
+ vtkWarningMacro(<< "Close(): SQLite returned result code " << result);
+ }
+@@ -374,7 +374,7 @@
+ if (!status)
+ {
+ vtkErrorMacro(<< "GetTables(): Database returned error: "
+- << vtk_sqlite3_errmsg(this->SQLiteInstance) );
++ << sqlite3_errmsg(this->SQLiteInstance) );
+ query->Delete();
+ return this->Tables;
+ }
+@@ -403,7 +403,7 @@
+ if (!status)
+ {
+ vtkErrorMacro(<< "GetRecord(" << table << "): Database returned error: "
+- << vtk_sqlite3_errmsg(this->SQLiteInstance) );
++ << sqlite3_errmsg(this->SQLiteInstance) );
+ query->Delete();
+ return NULL;
+ }
+@@ -467,10 +467,10 @@
+ // ----------------------------------------------------------------------
+ bool vtkSQLiteDatabase::HasError()
+ {
+- return (vtk_sqlite3_errcode(this->SQLiteInstance)!=VTK_SQLITE_OK);
++ return (sqlite3_errcode(this->SQLiteInstance)!=SQLITE_OK);
+ }
+
+ const char* vtkSQLiteDatabase::GetLastErrorText()
+ {
+- return vtk_sqlite3_errmsg(this->SQLiteInstance);
++ return sqlite3_errmsg(this->SQLiteInstance);
+ }
+--- VTK/IO/SQL/vtkSQLiteQuery.cxx
++++ VTK/IO/SQL/vtkSQLiteQuery.cxx
+@@ -25,7 +25,7 @@
+ #include "vtkVariant.h"
+ #include "vtkVariantArray.h"
+
+-#include <vtksqlite/vtk_sqlite3.h>
++#include <sqlite3.h>
+
+ #include <assert.h>
+
+@@ -43,7 +43,7 @@
+ {
+ this->Statement = NULL;
+ this->InitialFetch = true;
+- this->InitialFetchResult=VTK_SQLITE_DONE;
++ this->InitialFetchResult=SQLITE_DONE;
+ this->LastErrorText = NULL;
+ this->TransactionInProgress = false;
+ }
+@@ -61,7 +61,7 @@
+ {
+ if (this->Database != NULL)
+ {
+- vtk_sqlite3_finalize(this->Statement);
++ sqlite3_finalize(this->Statement);
+ this->Statement = NULL;
+ }
+ }
+@@ -131,8 +131,8 @@
+ if (this->Statement)
+ {
+ vtkDebugMacro(<<"Finalizing old statement");
+- int finalizeStatus = vtk_sqlite3_finalize(this->Statement);
+- if (finalizeStatus != VTK_SQLITE_OK)
++ int finalizeStatus = sqlite3_finalize(this->Statement);
++ if (finalizeStatus != SQLITE_OK)
+ {
+ vtkWarningMacro(<<"SetQuery(): Finalize returned unexpected code "
+ << finalizeStatus);
+@@ -151,19 +151,19 @@
+ return false;
+ }
+
+- vtk_sqlite3 *db = dbContainer->SQLiteInstance;
++ sqlite3 *db = dbContainer->SQLiteInstance;
+ const char *unused_statement;
+
+- int prepareStatus = vtk_sqlite3_prepare_v2(db,
++ int prepareStatus = sqlite3_prepare_v2(db,
+ this->Query,
+ static_cast<int>(strlen(this->Query)),
+ &this->Statement,
+ &unused_statement);
+
+- if (prepareStatus != VTK_SQLITE_OK)
++ if (prepareStatus != SQLITE_OK)
+ {
+- this->SetLastErrorText(vtk_sqlite3_errmsg(db));
+- vtkWarningMacro(<<"SetQuery(): vtk_sqlite3_prepare_v2() failed with error message "
++ this->SetLastErrorText(sqlite3_errmsg(db));
++ vtkWarningMacro(<<"SetQuery(): sqlite3_prepare_v2() failed with error message "
+ << this->GetLastErrorText()
+ << " on statement: '"
+ << this->Query << "'");
+@@ -194,31 +194,31 @@
+ }
+ else
+ {
+- vtk_sqlite3_reset(this->Statement);
++ sqlite3_reset(this->Statement);
+ }
+
+ vtkDebugMacro(<<"Execute(): Query ready to execute.");
+
+ this->InitialFetch = true;
+- int result = vtk_sqlite3_step(this->Statement);
++ int result = sqlite3_step(this->Statement);
+ this->InitialFetchResult = result;
+
+- if (result == VTK_SQLITE_DONE)
++ if (result == SQLITE_DONE)
+ {
+ this->SetLastErrorText(NULL);
+ this->Active = true;
+ return true;
+ }
+- else if (result != VTK_SQLITE_ROW)
++ else if (result != SQLITE_ROW)
+ {
+ vtkSQLiteDatabase *dbContainer =
+ vtkSQLiteDatabase::SafeDownCast(this->Database);
+ assert(dbContainer != NULL);
+
+- vtk_sqlite3 *db = dbContainer->SQLiteInstance;
++ sqlite3 *db = dbContainer->SQLiteInstance;
+
+- this->SetLastErrorText(vtk_sqlite3_errmsg(db));
+- vtkDebugMacro(<< "Execute(): vtk_sqlite3_step() returned error message "
++ this->SetLastErrorText(sqlite3_errmsg(db));
++ vtkDebugMacro(<< "Execute(): sqlite3_step() returned error message "
+ << this->GetLastErrorText());
+ this->Active = false;
+ return false;
+@@ -239,7 +239,7 @@
+ }
+ else
+ {
+- return vtk_sqlite3_column_count(this->Statement);
++ return sqlite3_column_count(this->Statement);
+ }
+ }
+
+@@ -259,7 +259,7 @@
+ }
+ else
+ {
+- return vtk_sqlite3_column_name(this->Statement, column);
++ return sqlite3_column_name(this->Statement, column);
+ }
+ }
+
+@@ -279,22 +279,22 @@
+ }
+ else
+ {
+- switch (vtk_sqlite3_column_type(this->Statement, column))
++ switch (sqlite3_column_type(this->Statement, column))
+ {
+- case VTK_SQLITE_INTEGER:
++ case SQLITE_INTEGER:
+ return VTK_INT;
+- case VTK_SQLITE_FLOAT:
++ case SQLITE_FLOAT:
+ return VTK_FLOAT;
+- case VTK_SQLITE_TEXT:
++ case SQLITE_TEXT:
+ return VTK_STRING;
+- case VTK_SQLITE_BLOB:
++ case SQLITE_BLOB:
+ return VTK_STRING; // until we have a BLOB type of our own
+- case VTK_SQLITE_NULL:
++ case SQLITE_NULL:
+ return VTK_VOID; // ??? what makes sense here?
+ default:
+ {
+ vtkErrorMacro(<<"GetFieldType(): Unknown data type "
+- << vtk_sqlite3_column_type(this->Statement, column)
++ << sqlite3_column_type(this->Statement, column)
+ <<" from SQLite.");
+ return VTK_VOID;
+ }
+@@ -315,7 +315,7 @@
+ {
+ vtkDebugMacro(<<"NextRow(): Initial fetch being handled.");
+ this->InitialFetch = false;
+- if (this->InitialFetchResult == VTK_SQLITE_DONE)
++ if (this->InitialFetchResult == SQLITE_DONE)
+ {
+ return false;
+ }
+@@ -326,12 +326,12 @@
+ }
+ else
+ {
+- int result = vtk_sqlite3_step(this->Statement);
+- if (result == VTK_SQLITE_DONE)
++ int result = sqlite3_step(this->Statement);
++ if (result == SQLITE_DONE)
+ {
+ return false;
+ }
+- else if (result == VTK_SQLITE_ROW)
++ else if (result == SQLITE_ROW)
+ {
+ return true;
+ }
+@@ -339,8 +339,8 @@
+ {
+ vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database );
+ assert(dbContainer != NULL);
+- vtk_sqlite3 *db = dbContainer->SQLiteInstance;
+- this->SetLastErrorText(vtk_sqlite3_errmsg(db));
++ sqlite3 *db = dbContainer->SQLiteInstance;
++ this->SetLastErrorText(sqlite3_errmsg(db));
+ vtkErrorMacro(<<"NextRow(): Database returned error code "
+ << result << " with the following message: "
+ << this->GetLastErrorText());
+@@ -366,33 +366,33 @@
+ }
+ else
+ {
+- switch (vtk_sqlite3_column_type(this->Statement, column))
++ switch (sqlite3_column_type(this->Statement, column))
+ {
+- case VTK_SQLITE_INTEGER:
+- return vtkVariant(vtk_sqlite3_column_int(this->Statement, column));
++ case SQLITE_INTEGER:
++ return vtkVariant(sqlite3_column_int(this->Statement, column));
+
+- case VTK_SQLITE_FLOAT:
+- return vtkVariant(vtk_sqlite3_column_double(this->Statement, column));
++ case SQLITE_FLOAT:
++ return vtkVariant(sqlite3_column_double(this->Statement, column));
+
+- case VTK_SQLITE_TEXT:
++ case SQLITE_TEXT:
+ {
+ vtksys_ios::ostringstream str;
+- str << vtk_sqlite3_column_text(this->Statement, column);
++ str << sqlite3_column_text(this->Statement, column);
+ return vtkVariant(vtkStdString(str.str()));
+ }
+
+- case VTK_SQLITE_BLOB:
++ case SQLITE_BLOB:
+ {
+ // This is a hack ... by passing the BLOB to vtkStdString with an explicit
+ // byte count, we ensure that the string will store all of the BLOB's bytes,
+ // even if there are NULL values.
+
+ return vtkVariant(vtkStdString(
+- static_cast<const char*>(vtk_sqlite3_column_blob(this->Statement, column)),
+- vtk_sqlite3_column_bytes(this->Statement, column)));
++ static_cast<const char*>(sqlite3_column_blob(this->Statement, column)),
++ sqlite3_column_bytes(this->Statement, column)));
+ }
+
+- case VTK_SQLITE_NULL:
++ case SQLITE_NULL:
+ default:
+ return vtkVariant();
+ }
+@@ -423,11 +423,11 @@
+ vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database );
+ assert(dbContainer != NULL);
+
+- vtk_sqlite3 *db = dbContainer->SQLiteInstance;
++ sqlite3 *db = dbContainer->SQLiteInstance;
+ char *errorMessage = NULL;
+- int result = vtk_sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage);
++ int result = sqlite3_exec(db, BEGIN_TRANSACTION, NULL, NULL, &errorMessage);
+
+- if (result == VTK_SQLITE_OK)
++ if (result == SQLITE_OK)
+ {
+ this->TransactionInProgress = true;
+ this->SetLastErrorText(NULL);
+@@ -451,7 +451,7 @@
+ {
+ if (this->Statement)
+ {
+- vtk_sqlite3_finalize(this->Statement);
++ sqlite3_finalize(this->Statement);
+ this->Statement = NULL;
+ }
+
+@@ -463,11 +463,11 @@
+
+ vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database );
+ assert(dbContainer != NULL);
+- vtk_sqlite3 *db = dbContainer->SQLiteInstance;
++ sqlite3 *db = dbContainer->SQLiteInstance;
+ char *errorMessage = NULL;
+- int result = vtk_sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage);
++ int result = sqlite3_exec(db, COMMIT_TRANSACTION, NULL, NULL, &errorMessage);
+
+- if (result == VTK_SQLITE_OK)
++ if (result == SQLITE_OK)
+ {
+ this->TransactionInProgress = false;
+ this->SetLastErrorText(NULL);
+@@ -499,11 +499,11 @@
+
+ vtkSQLiteDatabase *dbContainer = vtkSQLiteDatabase::SafeDownCast( this->Database );
+ assert(dbContainer != NULL);
+- vtk_sqlite3 *db = dbContainer->SQLiteInstance;
++ sqlite3 *db = dbContainer->SQLiteInstance;
+ char *errorMessage = NULL;
+- int result = vtk_sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage);
++ int result = sqlite3_exec(db, ROLLBACK_TRANSACTION, NULL, NULL, &errorMessage);
+
+- if (result == VTK_SQLITE_OK)
++ if (result == SQLITE_OK)
+ {
+ this->TransactionInProgress = false;
+ this->SetLastErrorText(NULL);
+@@ -647,11 +647,11 @@
+ if (this->Active)
+ {
+ this->Active = false;
+- vtk_sqlite3_reset(this->Statement);
++ sqlite3_reset(this->Statement);
+ }
+- int status = vtk_sqlite3_bind_int(this->Statement, index+1, value);
++ int status = sqlite3_bind_int(this->Statement, index+1, value);
+
+- if (status != VTK_SQLITE_OK)
++ if (status != SQLITE_OK)
+ {
+ vtksys_ios::ostringstream errormessage;
+ errormessage << "sqlite_bind_int returned error: " << status;
+@@ -676,11 +676,11 @@
+ if (this->Active)
+ {
+ this->Active = false;
+- vtk_sqlite3_reset(this->Statement);
++ sqlite3_reset(this->Statement);
+ }
+- int status = vtk_sqlite3_bind_int(this->Statement, index+1, static_cast<vtk_sqlite_int64>(value));
++ int status = sqlite3_bind_int(this->Statement, index+1, static_cast<sqlite_int64>(value));
+
+- if (status != VTK_SQLITE_OK)
++ if (status != SQLITE_OK)
+ {
+ vtksys_ios::ostringstream errormessage;
+ errormessage << "sqlite_bind_int64 returned error: " << status;
+@@ -705,12 +705,12 @@
+ if (this->Active)
+ {
+ this->Active = false;
+- vtk_sqlite3_reset(this->Statement);
++ sqlite3_reset(this->Statement);
+ }
+
+- int status = vtk_sqlite3_bind_double(this->Statement, index+1, value);
++ int status = sqlite3_bind_double(this->Statement, index+1, value);
+
+- if (status != VTK_SQLITE_OK)
++ if (status != SQLITE_OK)
+ {
+ vtksys_ios::ostringstream errormessage;
+ errormessage << "sqlite_bind_double returned error: " << status;
+@@ -734,12 +734,12 @@
+ if (this->Active)
+ {
+ this->Active = false;
+- vtk_sqlite3_reset(this->Statement);
++ sqlite3_reset(this->Statement);
+ }
+
+- int status = vtk_sqlite3_bind_text(this->Statement, index+1, value, length, VTK_SQLITE_TRANSIENT);
++ int status = sqlite3_bind_text(this->Statement, index+1, value, length, SQLITE_TRANSIENT);
+
+- if (status != VTK_SQLITE_OK)
++ if (status != SQLITE_OK)
+ {
+ vtksys_ios::ostringstream errormessage;
+ errormessage << "sqlite_bind_text returned error: " << status;
+@@ -763,17 +763,17 @@
+ if (this->Active)
+ {
+ this->Active = false;
+- vtk_sqlite3_reset(this->Statement);
++ sqlite3_reset(this->Statement);
+ }
+
+ int status =
+- vtk_sqlite3_bind_blob(this->Statement,
++ sqlite3_bind_blob(this->Statement,
+ index+1,
+ data,
+ length,
+- VTK_SQLITE_TRANSIENT);
++ SQLITE_TRANSIENT);
+
+- if (status != VTK_SQLITE_OK)
++ if (status != SQLITE_OK)
+ {
+ vtksys_ios::ostringstream errormessage;
+ errormessage << "sqlite_bind_blob returned error: " << status;
+@@ -797,12 +797,12 @@
+ if (this->Active)
+ {
+ this->Active = false;
+- vtk_sqlite3_reset(this->Statement);
++ sqlite3_reset(this->Statement);
+ }
+
+- int status = vtk_sqlite3_clear_bindings(this->Statement);
++ int status = sqlite3_clear_bindings(this->Statement);
+
+- if (status != VTK_SQLITE_OK)
++ if (status != SQLITE_OK)
+ {
+ vtksys_ios::ostringstream errormessage;
+ errormessage << "sqlite_clear_bindings returned error: " << status;
+--- VTK/IO/SQL/vtkSQLiteDatabase.h
++++ VTK/IO/SQL/vtkSQLiteDatabase.h
+@@ -49,7 +49,7 @@
+ class vtkSQLQuery;
+ class vtkSQLiteQuery;
+ class vtkStringArray;
+-struct vtk_sqlite3;
++struct sqlite3;
+
+ class VTKIOSQL_EXPORT vtkSQLiteDatabase : public vtkSQLDatabase
+ {
+@@ -147,7 +147,7 @@
+ virtual bool ParseURL(const char* url);
+
+ private:
+- vtk_sqlite3 *SQLiteInstance;
++ sqlite3 *SQLiteInstance;
+
+ // We want this to be private, a user of this class
+ // should not be setting this for any reason
+--- VTK/IO/SQL/vtkSQLiteQuery.h
++++ VTK/IO/SQL/vtkSQLiteQuery.h
+@@ -47,7 +47,7 @@
+ class vtkSQLiteDatabase;
+ class vtkVariant;
+ class vtkVariantArray;
+-struct vtk_sqlite3_stmt;
++struct sqlite3_stmt;
+
+ class VTKIOSQL_EXPORT vtkSQLiteQuery : public vtkSQLQuery
+ {
+@@ -155,7 +155,7 @@
+ vtkSQLiteQuery(const vtkSQLiteQuery &); // Not implemented.
+ void operator=(const vtkSQLiteQuery &); // Not implemented.
+
+- vtk_sqlite3_stmt *Statement;
++ sqlite3_stmt *Statement;
+ bool InitialFetch;
+ int InitialFetchResult;
+ char *LastErrorText;
+--- VTK/ThirdParty/sqlite/CMakeLists.txt
++++ VTK/ThirdParty/sqlite/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-set(vtksqlite_THIRD_PARTY 1)
+-set(vtksqlite_LIBRARIES vtksqlite)
++#set(vtksqlite_THIRD_PARTY 1)
++set(vtksqlite_LIBRARIES sqlite3)
+ vtk_module_export_info()
+-add_subdirectory(vtksqlite)
++#add_subdirectory(vtksqlite)
diff --git a/sci-visualization/paraview/files/paraview-4.0.1-vtk-cg-path.patch b/sci-visualization/paraview/files/paraview-4.0.1-vtk-cg-path.patch
new file mode 100644
index 000000000000..58ddde97d4fb
--- /dev/null
+++ b/sci-visualization/paraview/files/paraview-4.0.1-vtk-cg-path.patch
@@ -0,0 +1,36 @@
+--- ParaView-3.98.0-src/VTK/CMake/FindCg.cmake
++++ ParaView-3.98.0-src/VTK/CMake/FindCg.cmake
+@@ -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,8 @@
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
++ /opt/nvidia-cg-toolkit/lib64
++ /opt/nvidia-cg-toolkit/lib
+ ${CG_COMPILER_SUPER_DIR}/lib64
+ ${CG_COMPILER_SUPER_DIR}/lib
+ DOC "The Cg runtime library"
+@@ -108,6 +112,8 @@
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
++ /opt/nvidia-cg-toolkit/lib64
++ /opt/nvidia-cg-toolkit/lib
+ ${CG_COMPILER_SUPER_DIR}/lib64
+ ${CG_COMPILER_SUPER_DIR}/lib
+ DOC "The Cg runtime library"
diff --git a/sci-visualization/paraview/files/paraview-4.0.1-vtknetcd.patch b/sci-visualization/paraview/files/paraview-4.0.1-vtknetcd.patch
new file mode 100644
index 000000000000..a478b7dfc2d4
--- /dev/null
+++ b/sci-visualization/paraview/files/paraview-4.0.1-vtknetcd.patch
@@ -0,0 +1,79 @@
+adapted from debian patch need to be applied after paraview-3.14.1-removesqlite.patch
+
+--- ParaView-3.98.0-src/VTK/ThirdParty/netcdf/CMakeLists.txt
++++ ParaView-3.98.0-src/VTK/ThirdParty/netcdf/CMakeLists.txt
+@@ -1,8 +1,8 @@
+-set(vtknetcdf_THIRD_PARTY 1)
+-set(vtknetcdf_LIBRARIES vtkNetCDF vtkNetCDF_cxx)
+-set(vtknetcdf_INCLUDE_DIRS
+- ${vtknetcdf_SOURCE_DIR}/vtknetcdf/include
+- ${vtknetcdf_BINARY_DIR}/vtknetcdf
+- )
++#set(vtknetcdf_THIRD_PARTY 1)
++set(vtknetcdf_LIBRARIES netcdf netcdf_c++)
++#set(vtknetcdf_INCLUDE_DIRS
++# ${vtknetcdf_SOURCE_DIR}/vtknetcdf/include
++# ${vtknetcdf_BINARY_DIR}/vtknetcdf
++# )
+ vtk_module_export_info()
+-add_subdirectory(vtknetcdf)
++#add_subdirectory(vtknetcdf)
+--- ParaView-3.98.0-src/VTK/ThirdParty/netcdf/vtk_netcdf.h
++++ ParaView-3.98.0-src/VTK/ThirdParty/netcdf/vtk_netcdf.h
+@@ -16,6 +16,6 @@
+ #define __vtk_netcdf_h
+
+ /* Use the netcdf library configured for VTK. */
+-#include <vtknetcdf/include/netcdf.h>
++#include <netcdf.h>
+
+ #endif
+--- ParaView-3.98.0-src/VTK/ThirdParty/netcdf/vtk_netcdfcpp.h
++++ ParaView-3.98.0-src/VTK/ThirdParty/netcdf/vtk_netcdfcpp.h
+@@ -16,6 +16,6 @@
+ #define __vtk_netcdfcpp_h
+
+ /* Use the netcdf library configured for VTK. */
+-#include <vtknetcdf/cxx/netcdfcpp.h>
++#include <netcdfcpp.h>
+
+ #endif
+--- ParaView-3.98.0-src/VTK/ThirdParty/exodusII/vtkexodusII/test/CMakeLists.txt
++++ ParaView-3.98.0-src/VTK/ThirdParty/exodusII/vtkexodusII/test/CMakeLists.txt
+@@ -21,7 +21,7 @@
+ )
+
+ add_executable(ExoIICTests ${ExoIICTests})
+-target_link_libraries(ExoIICTests vtkCommon vtkexoIIc vtkNetCDF)
++target_link_libraries(ExoIICTests vtkCommon vtkexoIIc netcdf)
+
+ set(TestsToRun ${ExoIICTests})
+ remove(TestsToRun ExoIICTests.cxx)
+--- ParaView-3.98.0-src/VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt
++++ ParaView-3.98.0-src/VTK/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt
+@@ -241,7 +241,7 @@
+
+
+ VTK_ADD_LIBRARY(vtkexoIIc ${cbind_SRCS})
+-TARGET_LINK_LIBRARIES(vtkexoIIc vtkNetCDF)
++TARGET_LINK_LIBRARIES(vtkexoIIc netcdf)
+
+ IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
+ # INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR}/vtkexodus2 .h
+--- ParaView-3.98.0-src/VTK/IO/NetCDF/CMakeLists.txt
++++ ParaView-3.98.0-src/VTK/IO/NetCDF/CMakeLists.txt
+@@ -10,5 +10,5 @@
+
+ vtk_module_library(vtkIONetCDF ${Module_SRCS})
+
+-target_link_libraries(vtkIONetCDF vtkNetCDF_cxx)
++target_link_libraries(vtkIONetCDF netcdf netcdf_c++)
+ set_target_properties(vtkIONetCDF PROPERTIES LINK_INTERFACE_LIBRARIES "")
+--- ParaView-3.98.0-src/VTK/IO/ParallelNetCDF/CMakeLists.txt
++++ ParaView-3.98.0-src/VTK/IO/ParallelNetCDF/CMakeLists.txt
+@@ -8,4 +8,4 @@
+
+ vtk_module_library(vtkIOParallelNetCDF ${Module_SRCS})
+
+-target_link_libraries(vtkIOParallelNetCDF vtkNetCDF_cxx)
++target_link_libraries(vtkIOParallelNetCDF netcdf netcdf_c++)
diff --git a/sci-visualization/paraview/files/paraview-4.0.1-xdmf-cstring.patch b/sci-visualization/paraview/files/paraview-4.0.1-xdmf-cstring.patch
new file mode 100644
index 000000000000..665f40ad4fa7
--- /dev/null
+++ b/sci-visualization/paraview/files/paraview-4.0.1-xdmf-cstring.patch
@@ -0,0 +1,12 @@
+gcc header fix
+
+--- ParaView-3.98.0-src/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfObject.h
++++ ParaView-3.98.0-src/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfObject.h
+@@ -82,6 +82,7 @@
+ # ifdef UNIX
+ # include "sys/file.h"
+ # include "strings.h"
++# include <cstring>
+ # define STRCASECMP strcasecmp
+ # define STRNCASECMP strncasecmp
+ # define STRCMP strcmp
diff --git a/sci-visualization/paraview/paraview-4.0.1.ebuild b/sci-visualization/paraview/paraview-4.0.1.ebuild
new file mode 100644
index 000000000000..a5df7de36a74
--- /dev/null
+++ b/sci-visualization/paraview/paraview-4.0.1.ebuild
@@ -0,0 +1,271 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-visualization/paraview/paraview-4.0.1.ebuild,v 1.1 2013/07/01 23:33:28 hasufell Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_6 python2_7 )
+inherit eutils multilib versionator python-single-r1 cmake-utils
+
+MAIN_PV=$(get_major_version)
+MAJOR_PV=$(get_version_component_range 1-2)
+MY_P="ParaView-v${PV}-source"
+
+DESCRIPTION="ParaView is a powerful scientific data visualization application"
+HOMEPAGE="http://www.paraview.org"
+SRC_URI="http://www.paraview.org/files/v${MAJOR_PV}/${MY_P}.tgz"
+RESTRICT="mirror"
+
+LICENSE="paraview GPL-2"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="boost cg coprocessing development doc examples ffmpeg mpi mysql nvcontrol plugins python qt4 sqlite tcl test tk"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/expat
+ dev-libs/libxml2:2
+ dev-libs/protobuf
+ media-libs/freetype
+ media-libs/libpng:0
+ media-libs/libtheora
+ media-libs/tiff
+ sci-libs/hdf5[mpi=]
+ ~sci-libs/netcdf-4.1.3[cxx,hdf5]
+ sys-libs/zlib
+ virtual/jpeg
+ virtual/opengl
+ >=x11-libs/gl2ps-1.3.8
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ coprocessing? (
+ plugins? (
+ dev-python/PyQt4
+ dev-qt/qtgui:4
+ )
+ )
+ ffmpeg? ( virtual/ffmpeg )
+ mpi? ( virtual/mpi[cxx,romio] )
+ mysql? ( virtual/mysql )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/mpi4py
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/sip[${PYTHON_USEDEP}]
+ dev-python/twisted
+ net-zope/zope-interface[${PYTHON_USEDEP}]
+ mpi? ( dev-python/mpi4py )
+ qt4? ( dev-python/PyQt4[opengl,webkit,${PYTHON_USEDEP}] )
+ )
+ qt4? (
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qthelp:4[compat]
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ )
+ sqlite? ( dev-db/sqlite )
+ tcl? ( dev-lang/tcl )
+ tk? ( dev-lang/tk )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ boost? ( >=dev-libs/boost-1.40.0[mpi?,${PYTHON_USEDEP}] )
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ PVLIBDIR=$(get_libdir)/${PN}-${MAJOR_PV}
+}
+
+src_prepare() {
+ # see patch headers for description
+ epatch "${FILESDIR}"/${P}-xdmf-cstring.patch \
+ "${FILESDIR}"/${P}-removesqlite.patch \
+ "${FILESDIR}"/${P}-gcc-4.7.patch \
+ "${FILESDIR}"/${P}-vtknetcd.patch \
+ "${FILESDIR}"/${P}-vtk-cg-path.patch
+
+ # lib64 fixes
+ sed -i \
+ -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):g" \
+ VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeLists.txt || die
+ sed -i \
+ -e "s:\/lib\/python:\/$(get_libdir)\/python:g" \
+ VTK/ThirdParty/xdmf2/vtkxdmf2/CMake/setup_install_paths.py || die
+ sed -i \
+ -e "s:lib/paraview-:$(get_libdir)/paraview-:g" \
+ CMakeLists.txt \
+ Plugins/SciberQuestToolKit/CMakeLists.txt \
+ ParaViewConfig.cmake.in \
+ CoProcessing/PythonCatalyst/vtkCPPythonScriptPipeline.cxx \
+ ParaViewCore/ClientServerCore/Core/vtkProcessModuleInitializePython.h || die
+
+ # no proper switch
+ use nvcontrol || {
+ sed -i \
+ -e '/VTK_USE_NVCONTROL/s#1#0#' \
+ VTK/Rendering/OpenGL/CMakeLists.txt || die
+ }
+}
+
+src_configure() {
+ # TODO: use system protobuf, jsoncpp
+ # VTK_USE_SYSTEM_QTTESTING
+ # PARAVIEW_USE_SYSTEM_AUTOBAHN
+ local mycmakeargs=(
+ -DPV_INSTALL_LIB_DIR="${PVLIBDIR}"
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
+ -DEXPAT_INCLUDE_DIR="${EPREFIX}"/usr/include
+ -DEXPAT_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libexpat.so
+ -DOPENGL_gl_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libGL.so
+ -DOPENGL_glu_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libGLU.so
+ -DBUILD_SHARED_LIBS=ON
+ -DVTK_USE_SYSTEM_EXPAT=ON
+ -DVTK_USE_SYSTEM_FREETYPE=ON
+ -DVTK_USE_SYSTEM_GL2PS=ON
+ -DVTK_USE_SYSTEM_HDF5=ON
+ -DVTK_USE_SYSTEM_JPEG=ON
+ -DVTK_USE_SYSTEM_LIBXML2=ON
+ -DVTK_USE_SYSTEM_OGGTHEORA=ON
+ -DVTK_USE_SYSTEM_PNG=ON
+ -DVTK_USE_SYSTEM_PROTOBUF=OFF
+ -DVTK_USE_SYSTEM_TIFF=ON
+ -DVTK_USE_SYSTEM_XDMF2=OFF
+ -DVTK_USE_SYSTEM_ZLIB=ON
+ -DPARAVIEW_USE_SYSTEM_MPI4PY=ON
+ -DPARAVIEW_USE_SYSTEM_ZOPE=ON
+ -DPARAVIEW_USE_SYSTEM_TWISTED=ON
+ -DCMAKE_VERBOSE_MAKEFILE=ON
+ -DCMAKE_COLOR_MAKEFILE=TRUE
+ -DVTK_USE_OFFSCREEN=TRUE
+ -DCMAKE_USE_PTHREADS=ON
+ -DVTK_USE_FFMPEG_ENCODER=OFF
+ -DPROTOC_LOCATION=$(type -P protoc)
+ -DVTK_Group_StandAlone=ON
+ # force this module due to incorrect build system deps
+ # wrt bug 460528
+ -DModule_vtkUtilitiesProcessXML=ON
+ )
+
+ # TODO: XDMF_USE_MYSQL?
+ # VTK_WRAP_JAVA
+ mycmakeargs+=(
+ $(cmake-utils_use development PARAVIEW_INSTALL_DEVELOPMENT_FILES)
+ $(cmake-utils_use qt4 PARAVIEW_BUILD_QT_GUI)
+ $(cmake-utils_use qt4 Module_vtkGUISupportQtOpenGL)
+ $(cmake-utils_use qt4 Module_vtkGUISupportQtSQL)
+ $(cmake-utils_use qt4 Module_vtkGUISupportQtWebkit)
+ $(cmake-utils_use qt4 Module_vtkRenderingQt)
+ $(cmake-utils_use qt4 Module_vtkViewsQt)
+ $(cmake-utils_use qt4 VTK_Group_ParaViewQt)
+ $(cmake-utils_use qt4 VTK_Group_Qt)
+ $(cmake-utils_use !qt4 PQWIDGETS_DISABLE_QTWEBKIT)
+ $(cmake-utils_use boost Module_vtkInfovisBoost)
+ $(cmake-utils_use boost Module_vtkInfovisBoostGraphAlg)
+ $(cmake-utils_use mpi PARAVIEW_USE_MPI)
+ $(cmake-utils_use mpi PARAVIEW_USE_MPI_SSEND)
+ $(cmake-utils_use mpi PARAVIEW_USE_ICE_T)
+ $(cmake-utils_use mpi VTK_Group_MPI)
+ $(cmake-utils_use mpi VTK_XDMF_USE_MPI)
+ $(cmake-utils_use mpi XDMF_BUILD_MPI)
+ $(cmake-utils_use python PARAVIEW_ENABLE_PYTHON)
+ $(cmake-utils_use python VTK_Group_ParaViewPython)
+ $(cmake-utils_use python XDMF_WRAP_PYTHON)
+ $(cmake-utils_use python Module_vtkPython)
+ $(cmake-utils_use python Module_pqPython)
+ $(cmake-utils_use python Module_vtkWrappingPythonCore)
+ $(cmake-utils_use python Module_vtkPVPythonSupport)
+ $(cmake-utils_use python Module_AutobahnPython)
+ $(cmake-utils_use python Module_Twisted)
+ $(cmake-utils_use python Module_ZopeInterface)
+ $(cmake-utils_use python Module_vtkmpi4py)
+ $(cmake-utils_use python Module_pqPython)
+ $(cmake-utils_use doc BUILD_DOCUMENTATION)
+ $(cmake-utils_use doc PARAVIEW_BUILD_WEB_DOCUMENTATION)
+ $(cmake-utils_use examples BUILD_EXAMPLES)
+ $(cmake-utils_use cg VTK_USE_CG_SHADERS)
+ $(cmake-utils_use mysql Module_vtkIOMySQL)
+ $(cmake-utils_use sqlite Module_vtksqlite)
+ $(cmake-utils_use coprocessing PARAVIEW_ENABLE_CATALYST)
+ $(cmake-utils_use ffmpeg PARAVIEW_ENABLE_FFMPEG)
+ $(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
+ $(cmake-utils_use ffmpeg Module_vtkIOFFMPEG)
+ $(cmake-utils_use tk VTK_Group_Tk)
+ $(cmake-utils_use tk VTK_USE_TK)
+ $(cmake-utils_use tk Module_vtkRenderingTk)
+ $(cmake-utils_use tcl Module_vtkTclTk)
+ $(cmake-utils_use tcl Module_vtkWrappingTcl)
+ $(cmake-utils_use test BUILD_TESTING)
+ )
+
+ if use qt4 ; then
+ mycmakeargs+=( -DVTK_INSTALL_QT_DIR=/${PVLIBDIR}/plugins/designer )
+ if use python ; then
+ # paraview cannot guess sip directory properly
+ mycmakeargs+=( -DSIP_INCLUDE_DIR="${EPREFIX}$(python_get_includedir)" )
+ fi
+ fi
+
+ # TODO: MantaView VaporPlugin VRPlugin
+ mycmakeargs+=(
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_AdiosReader)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_AnalyzeNIfTIIO)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ArrowGlyph)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_EyeDomeLighting)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_ForceTime)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_GMVReader)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_H5PartReader)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_Moments)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_NonOrthogonalSource)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_PacMan)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_PointSprite)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_PrismPlugin)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_QuadView)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SLACTools)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SciberQuestToolKit)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SierraPlotTools)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_SurfaceLIC)
+ $(cmake-utils_use plugins PARAVIEW_BUILD_PLUGIN_UncertaintyRendering)
+ # these are always needed for plugins
+ $(cmake-utils_use plugins Module_vtkFiltersFlowPaths)
+ $(cmake-utils_use plugins Module_vtkPVServerManagerApplication)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # set up the environment
+ echo "LDPATH=${EPREFIX}/usr/${PVLIBDIR}" > "${T}"/40${PN}
+ echo "PYTHONPATH="${EPREFIX}"/usr/${PVLIBDIR}:/usr/${PVLIBDIR}/site-packages" >> "${T}"/40${PN}
+ doenvd "${T}"/40${PN}
+
+ newicon "${S}"/Applications/ParaView/pvIcon.png paraview.png
+ make_desktop_entry paraview "Paraview" paraview
+
+ use python && python_optimize "${D}"/usr/$(get_libdir)/${PN}-${MAJOR_PV}
+}
+
+pkg_postinst() {
+ # with Qt4.5 there seem to be issues reading data files
+ # under certain locales. Setting LC_ALL=C should fix these.
+ echo
+ elog "If you experience data corruption during parsing of"
+ elog "data files with paraview please try setting your"
+ elog "locale to LC_ALL=C."
+ elog "If you plan to use paraview component from an existing shell"
+ elog "you should run env-update and . /etc/profile first"
+ echo
+}