summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2010-11-09 07:57:14 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2010-11-09 07:57:14 +0000
commitdd03e355ee87e6cc9a328b6559ec350e3d1e2001 (patch)
treeaa5e93d66d22c35b41d12d9a1addd831e6cd45e8 /sci-libs/vtk
parentMask dev-perl/NetAddr-IP-4.035 (#343059) (diff)
downloadgentoo-2-dd03e355ee87e6cc9a328b6559ec350e3d1e2001.tar.gz
gentoo-2-dd03e355ee87e6cc9a328b6559ec350e3d1e2001.tar.bz2
gentoo-2-dd03e355ee87e6cc9a328b6559ec350e3d1e2001.zip
Bring back vtk-5.4.x as sci-visualization/mayavi:1 depends on it. media-libs/jpeg -> virtual/jpeg
(Portage version: 2.1.9.24/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/vtk')
-rw-r--r--sci-libs/vtk/ChangeLog8
-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/vtk-5.4.2-r1.ebuild231
5 files changed, 487 insertions, 1 deletions
diff --git a/sci-libs/vtk/ChangeLog b/sci-libs/vtk/ChangeLog
index 18a646a62ba7..c790a6d321cf 100644
--- a/sci-libs/vtk/ChangeLog
+++ b/sci-libs/vtk/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/vtk
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/vtk/ChangeLog,v 1.79 2010/11/08 17:48:45 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/vtk/ChangeLog,v 1.80 2010/11/09 07:57:14 xarthisius Exp $
+
+ 09 Nov 2010; Kacper Kowalik <xarthisius@gentoo.org> +vtk-5.4.2-r1.ebuild,
+ +files/vtk-5.4.2-boost-property_map.patch, +files/vtk-5.4.2-cg-path.patch,
+ +files/vtk-5.4.2-libpng14.patch:
+ Bring back vtk-5.4.x as sci-visualization/mayavi:1 depends on it.
+ media-libs/jpeg -> virtual/jpeg
08 Nov 2010; Kacper Kowalik <xarthisius@gentoo.org>
-files/vtk-5.0.3-mpi.patch, -files/vtk-5.0.4-gcc4.3.patch,
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/vtk-5.4.2-r1.ebuild b/sci-libs/vtk/vtk-5.4.2-r1.ebuild
new file mode 100644
index 000000000000..5d9e6308be72
--- /dev/null
+++ b/sci-libs/vtk/vtk-5.4.2-r1.ebuild
@@ -0,0 +1,231 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/vtk/vtk-5.4.2-r1.ebuild,v 1.14 2010/11/09 07:57:14 xarthisius Exp $
+
+EAPI="3"
+PYTHON_DEPEND="python? 2"
+
+inherit cmake-utils eutils flag-o-matic java-pkg-opt-2 python qt4 versionator toolchain-funcs
+
+# 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}.tar.gz
+ examples? ( http://www.${PN}.org/files/release/${SPV}/${PN}data-${PV}.tar.gz )
+ doc? ( http://www.${PN}.org/doc/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )"
+
+LICENSE="BSD LGPL-2"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="boost cg doc examples mpi patented python qt4 tcl tk threads"
+RDEPEND="mpi? ( || (
+ sys-cluster/openmpi
+ sys-cluster/mpich2[cxx] ) )
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ tcl? ( >=dev-lang/tcl-8.2.3 )
+ tk? ( >=dev-lang/tk-8.2.3 )
+ java? ( >=virtual/jre-1.5 )
+ qt4? ( x11-libs/qt-core:4
+ x11-libs/qt-opengl:4
+ x11-libs/qt-gui:4
+ x11-libs/qt-sql )
+ examples? ( x11-libs/qt-core:4[qt3support]
+ x11-libs/qt-gui:4[qt3support] )
+ dev-libs/expat
+ dev-libs/libxml2
+ media-libs/freetype
+ virtual/jpeg
+ media-libs/libpng
+ media-libs/tiff
+ virtual/opengl
+ x11-libs/libXmu"
+
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.5 )
+ boost? ( >=dev-libs/boost-1.40.0 )
+ >=dev-util/cmake-2.6"
+
+S="${WORKDIR}"/VTK
+
+pkg_setup() {
+ echo
+ einfo "Please note that the VTK build occasionally fails when"
+ einfo "using parallel make. Hence, if you experience a build"
+ einfo "failure please try re-emerging with MAKEOPTS=\"-j1\" first."
+ echo
+
+ java-pkg-opt-2_pkg_setup
+
+ use python && python_set_active_version 2
+ use qt4 && qt4_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-cg-path.patch
+ epatch "${FILESDIR}"/${PN}-5.2.0-tcl-install.patch
+ epatch "${FILESDIR}"/${P}-boost-property_map.patch
+ epatch "${FILESDIR}"/${P}-libpng14.patch
+ sed -e "s:@VTK_TCL_LIBRARY_DIR@:/usr/$(get_libdir):" \
+ -i Wrapping/Tcl/pkgIndex.tcl.in \
+ || die "Failed to fix tcl pkgIndex file"
+}
+
+src_configure() {
+ # general configuration
+ local mycmakeargs=(
+ -Wno-dev
+ -DVTK_INSTALL_PACKAGE_DIR=/$(get_libdir)/${PN}-${SPV}
+ -DCMAKE_SKIP_RPATH=YES
+ -DVTK_DIR="${S}"
+ -DVTK_INSTALL_LIB_DIR=/$(get_libdir)/
+ -DVTK_DATA_ROOT:PATH=/usr/share/${PN}/data
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DBUILD_SHARED_LIBS=ON
+ -DVTK_USE_SYSTEM_FREETYPE=ON
+ -DVTK_USE_SYSTEM_JPEG=ON
+ -DVTK_USE_SYSTEM_PNG=ON
+ -DVTK_USE_SYSTEM_TIFF=ON
+ -DVTK_USE_SYSTEM_ZLIB=ON
+ -DVTK_USE_SYSTEM_EXPAT=ON
+ -DVTK_USE_SYSTEM_LIBXML2=ON
+ -DBUILD_TESTING=OFF
+ -DBUILD_EXAMPLES=OFF
+ -DVTK_USE_HYBRID=ON
+ -DVTK_USE_GL2PS=ON
+ -DVTK_USE_RENDERING=ON)
+
+ # use flag triggered options
+ mycmakeargs+=(
+ $(cmake-utils_use boost VTK_USE_BOOST)
+ $(cmake-utils_use cg VTK_USE_CG_SHADERS)
+ $(cmake-utils_use tcl VTK_WRAP_TCL)
+ $(cmake-utils_use tk VTK_USE_TK)
+ $(cmake-utils_use threads VTK_USE_PARALLEL)
+ $(cmake-utils_use patented VTK_USE_PATENTED)
+ $(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
+ $(cmake-utils_use_build doc DOCUMENTATION)
+ $(cmake-utils_use mpi VTK_USE_MPI))
+
+ # mpi needs the parallel framework
+ if use mpi && use !threads; then
+ mycmakeargs+=(-DVTK_USE_PARALLEL=ON)
+ fi
+
+ if use java; then
+ mycmakeargs+=(
+ -DVTK_WRAP_JAVA=ON
+ -DJAVA_AWT_INCLUDE_PATH=`java-config -O`/include
+ -DJAVA_INCLUDE_PATH:PATH=`java-config -O`/include
+ -DJAVA_INCLUDE_PATH2:PATH=`java-config -O`/include/linux)
+
+ if [ "${ARCH}" == "amd64" ]; then
+ mycmakeargs+=(-DJAVA_AWT_LIBRARY=`java-config -O`/jre/lib/${ARCH}/libjawt.so)
+ else
+ mycmakeargs+=(-DJAVA_AWT_LIBRARY:PATH=`java-config -O`/jre/lib/i386/libjawt.so)
+ fi
+ fi
+
+ if use python; then
+ mycmakeargs+=(
+ -DVTK_WRAP_PYTHON=ON
+ -DPYTHON_INCLUDE_PATH=$(python_get_includedir)
+ -DPYTHON_LIBRARY=$(python_get_library)
+ -DVTK_PYTHON_SETUP_ARGS:STRING=--root="${D}")
+ fi
+
+ if use qt4 ; then
+ mycmakeargs+=(
+ -DVTK_USE_GUISUPPORT=ON
+ -DVTK_USE_QVTK=ON
+ -DVTK_USE_QVTK_QTOPENGL=ON
+ -DQT_WRAP_CPP=ON
+ -DQT_WRAP_UI=ON)
+ fi
+
+ if use qt4; then
+ mycmakeargs+=(
+ -DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt4/plugins/${PN}
+ -DDESIRED_QT_VERSION=4
+ -DQT_MOC_EXECUTABLE=/usr/bin/moc
+ -DQT_UIC_EXECUTABLE=/usr/bin/uic
+ -DQT_INCLUDE_DIR=/usr/include/qt4
+ -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake)
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # install docs
+ dohtml "${S}"/README.html || die "Failed to install docs"
+
+ # install Tcl docs
+ docinto vtk_tcl
+ dodoc "${S}"/Wrapping/Tcl/README || \
+ die "Failed to install Tcl docs"
+
+ # install examples
+ if use examples; then
+ dodir /usr/share/${PN} || \
+ die "Failed to create data/examples directory"
+
+ cp -pPR "${S}"/Examples "${D}"/usr/share/${PN}/examples || \
+ die "Failed to copy example files"
+
+ # fix example's permissions
+ find "${D}"/usr/share/${PN}/examples -type d -exec \
+ chmod 0755 {} \; || \
+ die "Failed to fix example directories permissions"
+ find "${D}"/usr/share/${PN}/examples -type f -exec \
+ chmod 0644 {} \; || \
+ die "Failed to fix example files permissions"
+
+ cp -pPR "${WORKDIR}"/VTKData "${D}"/usr/share/${PN}/data || \
+ die "Failed to copy data files"
+
+ # fix data's permissions
+ find "${D}"/usr/share/${PN}/data -type d -exec \
+ chmod 0755 {} \; || \
+ die "Failed to fix data directories permissions"
+ find "${D}"/usr/share/${PN}/data -type f -exec \
+ chmod 0644 {} \; || \
+ die "Failed to fix data files permissions"
+ fi
+
+ #install big docs
+ if use doc; then
+ cd "${WORKDIR}"/html
+ 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 ./* || die "Failed to install docs"
+ fi
+
+ # environment
+ echo "VTK_DATA_ROOT=/usr/share/${PN}/data" >> "${T}"/40${PN}
+ echo "VTK_DIR=/usr/$(get_libdir)/${PN}-${SPV}" >> "${T}"/40${PN}
+ echo "VTKHOME=/usr" >> "${T}"/40${PN}
+ doenvd "${T}"/40${PN}
+}
+
+pkg_postinst() {
+ if use patented; then
+ ewarn "Using patented code in VTK may require a license."
+ ewarn "For more information, please read:"
+ ewarn "http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq07.005.htp"
+ fi
+
+ if use python; then
+ python_mod_optimize vtk
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ python_mod_cleanup vtk
+ fi
+}