Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/files/, sci-libs/vtk/
Date: Thu, 10 Jun 2021 03:38:06
Message-Id: 1623296264.2728a6a5f2c0a39f44ceee464a764bec6da2c320.sam@gentoo
1 commit: 2728a6a5f2c0a39f44ceee464a764bec6da2c320
2 Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
3 AuthorDate: Thu Jun 3 16:52:37 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 10 03:37:44 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2728a6a5
7
8 sci-libs/vtk: improve all-modules USE flag
9
10 - add missing flags to REQUIRED_USE
11 - add new mysql USE flag - needed by all-modules, adds new dependency on
12 dev-db/mysql-connector-c. Dev-db/mariadb-connector-c isn't supported
13 by this version. Fix an issue with using of deprecated my_bool when
14 using mysql-connector-c.
15 - remove xdmf2 USE flag, block sci-libs/xdmf2 with all-modules:
16 sci-libs/xdmf2 doesn't ship any cmake configuration files, which leads
17 to configuration errors when trying to build against external xdmf2
18 - block sci-libs/xdmf2: when built against internal xdmf2, there are header
19 file collisions with the header files installed by sci-libs/xdmf2
20 - add dependency on sci-libs/kissfft, bug #754684) and drop bundled
21 - fix an issue with xdmf3 library being installed in both library locations,
22 lib and lib64
23 - fix QA issues with RPATH
24 - byte compile python files
25 - disable searching for zfp (no package in tree)
26 - addresses some QA issues with defined but unused cmake variables: fixing all
27 of them would need a thorough testing of each single USE flag and checking
28 where these belong to, in this over-complex build system (bug #660582)
29
30 Closes: https://bugs.gentoo.org/793839
31 Closes: https://bugs.gentoo.org/754684
32 Closes: https://bugs.gentoo.org/646846
33 Bug: https://bugs.gentoo.org/660582
34 Package-Manager: Portage-3.0.19, Repoman-3.0.3
35 Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
36 Signed-off-by: Sam James <sam <AT> gentoo.org>
37
38 ...01-fix-library-installation-dir-for-xdmf3.patch | 57 +++
39 sci-libs/vtk/vtk-8.2.0-r2.ebuild | 382 +++++++++++++++++++++
40 2 files changed, 439 insertions(+)
41
42 diff --git a/sci-libs/vtk/files/vtk-8.2.0-0001-fix-library-installation-dir-for-xdmf3.patch b/sci-libs/vtk/files/vtk-8.2.0-0001-fix-library-installation-dir-for-xdmf3.patch
43 new file mode 100644
44 index 00000000000..d03cab326f4
45 --- /dev/null
46 +++ b/sci-libs/vtk/files/vtk-8.2.0-0001-fix-library-installation-dir-for-xdmf3.patch
47 @@ -0,0 +1,57 @@
48 +From 3aad9ec6004b7e3a82817f2f1e2840fc5f07c050 Mon Sep 17 00:00:00 2001
49 +From: Bernd Waibel <waebbl-gentoo@××××××.net>
50 +Date: Thu, 3 Jun 2021 13:13:38 +0200
51 +Subject: [PATCH] fix library installation dir for xdmf3
52 +
53 +Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net>
54 +---
55 + ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt | 14 +++++++-------
56 + 1 file changed, 7 insertions(+), 7 deletions(-)
57 +
58 +diff --git a/ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt b/ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt
59 +index 86d688f8..7d009dfe 100644
60 +--- a/ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt
61 ++++ b/ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt
62 +@@ -269,10 +269,10 @@ endif()
63 +
64 + if(UNIX)
65 + if (BUILD_SHARED_LIBS)
66 +- set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libXdmfCore.so
67 ++ set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/libXdmfCore.so
68 + PARENT_SCOPE)
69 + else()
70 +- set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libXdmfCore.a
71 ++ set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/libXdmfCore.a
72 + PARENT_SCOPE)
73 + endif()
74 + endif()
75 +@@ -297,13 +297,13 @@ if (NOT XDMF_INSTALL_NO_DEVELOPMENT)
76 + endif()
77 + install(TARGETS XdmfCore
78 + RUNTIME DESTINATION bin
79 +- LIBRARY DESTINATION lib
80 +- ARCHIVE DESTINATION lib)
81 ++ LIBRARY DESTINATION lib${LIB_SUFFIX}
82 ++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
83 + if (XDMF_STATIC_AND_SHARED AND BUILD_SHARED_LIBS)
84 + install(TARGETS XdmfCore_Static
85 + RUNTIME DESTINATION bin
86 +- LIBRARY DESTINATION lib
87 +- ARCHIVE DESTINATION lib)
88 ++ LIBRARY DESTINATION lib${LIB_SUFFIX}
89 ++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
90 + endif ()
91 +
92 + if (Boost_FOUND)
93 +@@ -329,7 +329,7 @@ set(XdmfCore_INCLUDE_DIRS
94 + CACHE INTERNAL "")
95 +
96 + set(XDMF_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include PARENT_SCOPE)
97 +-set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib)
98 ++set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
99 + set(XDMF_DIR ${CMAKE_INSTALL_PREFIX} PARENT_SCOPE)
100 + set(XDMF_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin)
101 +
102 +--
103 +2.31.1
104 +
105
106 diff --git a/sci-libs/vtk/vtk-8.2.0-r2.ebuild b/sci-libs/vtk/vtk-8.2.0-r2.ebuild
107 new file mode 100644
108 index 00000000000..4335d1c44a2
109 --- /dev/null
110 +++ b/sci-libs/vtk/vtk-8.2.0-r2.ebuild
111 @@ -0,0 +1,382 @@
112 +# Copyright 1999-2021 Gentoo Authors
113 +# Distributed under the terms of the GNU General Public License v2
114 +
115 +EAPI=7
116 +
117 +PYTHON_COMPAT=( python3_{7,8,9} )
118 +WEBAPP_OPTIONAL=yes
119 +WEBAPP_MANUAL_SLOT=yes
120 +
121 +# Short package version
122 +SPV="$(ver_cut 1-2)"
123 +inherit flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils toolchain-funcs cmake virtualx webapp
124 +
125 +DESCRIPTION="The Visualization Toolkit"
126 +HOMEPAGE="https://www.vtk.org/"
127 +SRC_URI="
128 + https://www.vtk.org/files/release/${SPV}/VTK-${PV}.tar.gz
129 + doc? ( https://www.vtk.org/files/release/${SPV}/vtkDocHtml-${PV}.tar.gz )
130 + examples? (
131 + https://www.vtk.org/files/release/${SPV}/VTKData-${PV}.tar.gz
132 + https://www.vtk.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
133 + )"
134 +
135 +LICENSE="BSD LGPL-2"
136 +SLOT="0"
137 +KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
138 +IUSE="all-modules aqua boost doc examples ffmpeg gdal imaging java json mpi
139 + mysql odbc offscreen postgres python qt5 R rendering tbb tcl theora tk
140 + video_cards_nvidia views web +X"
141 +
142 +REQUIRED_USE="
143 + all-modules? ( boost ffmpeg gdal mpi mysql odbc postgres python qt5 )
144 + java? ( qt5 )
145 + python? ( ${PYTHON_REQUIRED_USE} )
146 + tcl? ( rendering )
147 + examples? ( python )
148 + tk? ( tcl )
149 + web? ( python )
150 + ^^ ( X aqua offscreen )"
151 +
152 +RDEPEND="
153 + app-arch/lz4
154 + dev-cpp/eigen
155 + dev-db/sqlite
156 + dev-libs/double-conversion:0=
157 + dev-libs/expat
158 + dev-libs/jsoncpp:=
159 + dev-libs/libxml2:2
160 + >=dev-libs/pugixml-1.11
161 + >=media-libs/freetype-2.5.4
162 + media-libs/glew:0=
163 + >=media-libs/libharu-2.3.0-r2
164 + media-libs/libpng:0=
165 + media-libs/libtheora
166 + media-libs/mesa
167 + media-libs/tiff:0
168 + sci-libs/exodusii
169 + sci-libs/hdf5:=
170 + sci-libs/netcdf:0=
171 + sci-libs/netcdf-cxx:3
172 + sys-libs/zlib
173 + virtual/jpeg:0
174 + virtual/opengl
175 + x11-libs/libX11
176 + x11-libs/libXmu
177 + x11-libs/libXt
178 + all-modules? (
179 + !sci-libs/xdmf2
180 + <dev-libs/pegtl-3
181 + sci-libs/kissfft
182 + )
183 + boost? ( dev-libs/boost:=[mpi?] )
184 + examples? (
185 + dev-qt/qtcore:5
186 + dev-qt/qtgui:5
187 + )
188 + ffmpeg? ( media-video/ffmpeg )
189 + gdal? ( sci-libs/gdal )
190 + java? ( >=virtual/jdk-1.8:* )
191 + mpi? (
192 + virtual/mpi[cxx,romio]
193 + $(python_gen_cond_dep '
194 + python? ( dev-python/mpi4py[${PYTHON_MULTI_USEDEP}] )
195 + ')
196 + )
197 + mysql? ( dev-db/mysql-connector-c )
198 + odbc? ( dev-db/unixODBC )
199 + offscreen? ( media-libs/mesa[osmesa] )
200 + postgres? ( dev-db/postgresql:= )
201 + python? (
202 + ${PYTHON_DEPS}
203 + $(python_gen_cond_dep '
204 + dev-python/sip[${PYTHON_MULTI_USEDEP}]
205 + ')
206 + )
207 + qt5? (
208 + dev-qt/designer:5
209 + dev-qt/qtcore:5
210 + dev-qt/qtgui:5
211 + dev-qt/qtopengl:5
212 + dev-qt/qtsql:5
213 + dev-qt/qtx11extras:5
214 + $(python_gen_cond_dep '
215 + python? ( dev-python/PyQt5[${PYTHON_MULTI_USEDEP}] )
216 + ')
217 + )
218 + R? ( dev-lang/R )
219 + tbb? ( dev-cpp/tbb )
220 + tcl? ( dev-lang/tcl:0= )
221 + tk? ( dev-lang/tk:0= )
222 + video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
223 + web? (
224 + ${WEBAPP_DEPEND}
225 + $(python_gen_cond_dep '
226 + dev-python/autobahn[${PYTHON_MULTI_USEDEP}]
227 + dev-python/constantly[${PYTHON_MULTI_USEDEP}]
228 + dev-python/hyperlink[${PYTHON_MULTI_USEDEP}]
229 + dev-python/incremental[${PYTHON_MULTI_USEDEP}]
230 + dev-python/six[${PYTHON_MULTI_USEDEP}]
231 + dev-python/twisted[${PYTHON_MULTI_USEDEP}]
232 + dev-python/txaio[${PYTHON_MULTI_USEDEP}]
233 + dev-python/zope-interface[${PYTHON_MULTI_USEDEP}]
234 + ')
235 + )
236 +"
237 +DEPEND="${RDEPEND}"
238 +BDEPEND="
239 + doc? ( app-doc/doxygen )
240 + mpi? ( app-admin/chrpath )
241 +"
242 +
243 +S="${WORKDIR}"/VTK-${PV}
244 +
245 +PATCHES=(
246 + "${FILESDIR}"/${PN}-8.1.0-openmpi-4-compatibility.patch
247 + "${FILESDIR}"/${P}-qt-5.15.patch # bug 726960
248 + "${FILESDIR}"/${P}-gcc-10.patch # bug 723374
249 + "${FILESDIR}"/${P}-fno-common.patch # bug 721048
250 + "${FILESDIR}"/${P}-py38.patch
251 + "${FILESDIR}"/${P}-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch # bug #751088
252 + "${FILESDIR}"/${P}-pugixml.patch
253 + "${FILESDIR}"/${P}-0001-fix-library-installation-dir-for-xdmf3.patch
254 +)
255 +
256 +RESTRICT="test"
257 +
258 +pkg_setup() {
259 + use java && java-pkg-opt-2_pkg_setup
260 + use python && python-single-r1_pkg_setup
261 + use web && webapp_pkg_setup
262 +}
263 +
264 +src_prepare() {
265 + cmake_src_prepare
266 +
267 + local x
268 + # missing: VPIC freerange libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3 zfp
269 + for x in expat freetype hdf5 jpeg jsoncpp kissfft libharu libxml2 lz4 netcdf pugixml png tiff zlib; do
270 + ebegin "Dropping bundled ${x}"
271 + rm -r ThirdParty/${x}/vtk${x} || die
272 + eend $?
273 + done
274 +
275 + sed -i -e '/add_subdirectory(vtkpugixml)/d' ThirdParty/pugixml/CMakeLists.txt || die
276 + sed -i -e '/vtk_target_export(vtkpugixml)/d' ThirdParty/pugixml/CMakeLists.txt || die
277 +
278 + # my_bool is no longer used in MySQL and MariaDB isn't supported in vtk-8
279 + sed -e 's/my_bool/bool/' -i IO/MySQL/vtkMySQL{Database,Query}.cxx || die
280 +
281 + if use doc; then
282 + einfo "Removing .md5 files from documents."
283 + rm -f "${WORKDIR}"/html/*.md5 || die "Failed to remove superfluous hashes"
284 + sed -e "s|\${VTK_BINARY_DIR}/Utilities/Doxygen/doc|${WORKDIR}|" \
285 + -i Utilities/Doxygen/CMakeLists.txt || die
286 + fi
287 +}
288 +
289 +src_configure() {
290 + # general configuration
291 + local mycmakeargs=(
292 + -Wno-dev
293 + -DVTK_DIR="${S}"
294 + -DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
295 + -DVTK_INSTALL_PACKAGE_DIR="$(get_libdir)/cmake/${PN}-${SPV}"
296 + -DVTK_INSTALL_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
297 + -DVTK_DATA_ROOT="${EPREFIX}/usr/share/${PN}/data"
298 + -DVTK_CUSTOM_LIBRARY_SUFFIX=""
299 + -DBUILD_SHARED_LIBS=ON
300 + -DVTK_USE_SYSTEM_AUTOBAHN=ON
301 + -DVTK_USE_SYSTEM_EXPAT=ON
302 + -DVTK_USE_SYSTEM_FREETYPE=ON
303 + -DVTK_USE_SYSTEM_FreeType=ON
304 + # Use bundled gl2ps (bundled version is a patched version of 1.3.9. Post 1.3.9 versions should be compatible)
305 + -DVTK_USE_SYSTEM_GL2PS=OFF
306 + -DVTK_USE_SYSTEM_HDF5=ON
307 + -DVTK_USE_SYSTEM_JPEG=ON
308 + -DVTK_USE_SYSTEM_LIBPROJ=OFF
309 + -DVTK_USE_SYSTEM_LIBXML2=ON
310 + -DVTK_USE_SYSTEM_LibXml2=ON
311 + -DVTK_USE_SYSTEM_NETCDF=ON
312 + -DVTK_USE_SYSTEM_OGGTHEORA=ON
313 + -DVTK_USE_SYSTEM_PUGIXML=ON
314 + -DVTK_USE_SYSTEM_PNG=ON
315 + -DVTK_USE_SYSTEM_TIFF=ON
316 + -DVTK_USE_SYSTEM_TWISTED=ON
317 + -DVTK_USE_SYSTEM_XDMF2=OFF
318 + -DVTK_USE_SYSTEM_XDMF3=OFF
319 + -DVTK_USE_SYSTEM_ZLIB=ON
320 + -DVTK_USE_SYSTEM_ZOPE=ON
321 + -DVTK_USE_SYSTEM_LIBRARIES=ON
322 + # Use bundled diy2 (no gentoo package / upstream does not provide a Finddiy2.cmake or diy2Config.cmake / diy2-config.cmake)
323 + -DVTK_USE_SYSTEM_DIY2=OFF
324 + -DVTK_USE_GL2PS=ON
325 + -DVTK_USE_LARGE_DATA=ON
326 + -DVTK_USE_PARALLEL=ON
327 + -DVTK_EXTRA_COMPILER_WARNINGS=ON
328 + -DVTK_Group_StandAlone=ON
329 + -DBUILD_DOCUMENTATION=$(usex doc)
330 + -DBUILD_EXAMPLES=$(usex examples)
331 + -DBUILD_VTK_BUILD_ALL_MODULES_FOR_TESTS=off
332 + -DVTK_BUILD_ALL_MODULES=$(usex all-modules)
333 + -DUSE_DOCUMENTATION_HTML_HELP=$(usex doc)
334 + -DVTK_Group_Imaging=$(usex imaging)
335 + -DVTK_Group_MPI=$(usex mpi)
336 + -DVTK_Group_Rendering=$(usex rendering)
337 + -DVTK_Group_Tk=$(usex tk)
338 + -DVTK_Group_Views=$(usex views)
339 + -DVTK_Group_Web=$(usex web)
340 + -DVTK_SMP_IMPLEMENTATION_TYPE="$(usex tbb TBB Sequential)"
341 + -DVTK_WWW_DIR="${EPREFIX}/${MY_HTDOCSDIR}"
342 + -DVTK_WRAP_JAVA=$(usex java)
343 + -DVTK_WRAP_PYTHON=$(usex python)
344 + -DVTK_WRAP_PYTHON_SIP=$(usex python)
345 + -DVTK_WRAP_TCL=$(usex tcl)
346 + -DVTK_USE_BOOST=$(usex boost)
347 + -DUSE_VTK_USE_BOOST=$(usex boost)
348 + -DModule_vtkInfovisBoost=$(usex boost)
349 + -DModule_vtkInfovisBoostGraphAlgorithms=$(usex boost)
350 + -DVTK_USE_ODBC=$(usex odbc)
351 + -DModule_vtkIOODBC=$(usex odbc)
352 + -DVTK_USE_OFFSCREEN=$(usex offscreen)
353 + -DVTK_OPENGL_HAS_OSMESA=$(usex offscreen)
354 + -DVTK_USE_OGGTHEORA_ENCODER=$(usex theora)
355 + -DVTK_USE_NVCONTROL=$(usex video_cards_nvidia)
356 + -DModule_vtkFiltersStatisticsGnuR=$(usex R)
357 + -DVTK_USE_X=$(usex X)
358 + # IO
359 + -DVTK_USE_FFMPEG_ENCODER=$(usex ffmpeg)
360 + -DModule_vtkIOGDAL=$(usex gdal)
361 + -DModule_vtkIOGeoJSON=$(usex json)
362 + -DModule_vtkIOXdmf2=$(usex all-modules)
363 + -DBUILD_TESTING=$(usex examples)
364 + # Apple stuff, does it really work?
365 + -DVTK_USE_COCOA=$(usex aqua)
366 + )
367 +
368 + if use all-modules; then
369 + mycmakeargs+=(
370 + -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=ON
371 + # we don't have a package for zfp yet
372 + -DVTK_USE_SYSTEM_ZFP=OFF
373 + )
374 + fi
375 +
376 + if use java; then
377 + local javacargs=$(java-pkg_javac-args)
378 + mycmakeargs+=( -DJAVAC_OPTIONS=${javacargs// /;} )
379 + fi
380 +
381 + if use mpi; then
382 + mycmakeargs+=( -DVTK_USE_SYSTEM_MPI4PY=ON )
383 + fi
384 +
385 + if use python; then
386 + mycmakeargs+=(
387 + -DVTK_INSTALL_PYTHON_MODULES_DIR="$(python_get_sitedir)"
388 + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
389 + -DPYTHON_LIBRARY="$(python_get_library_path)"
390 + -DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
391 + -DSIP_INCLUDE_DIR="$(python_get_includedir)"
392 + -DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
393 + -DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
394 +# -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX} --root=${D}"
395 + -DVTK_USE_SYSTEM_SIX=ON
396 + )
397 + fi
398 +
399 + if use qt5; then
400 + mycmakeargs+=(
401 + -DVTK_USE_QVTK=ON
402 + -DVTK_USE_QVTK_OPENGL=ON
403 + -DVTK_USE_QVTK_QTOPENGL=ON
404 + -DQT_WRAP_CPP=ON
405 + -DQT_WRAP_UI=ON
406 + -DVTK_INSTALL_QT_DIR="$(basename $(qt5_get_libdir))/qt5/plugins/designer"
407 + -DDESIRED_QT_VERSION=5
408 + -DVTK_QT_VERSION=5
409 + -DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
410 + -DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
411 + -DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt5"
412 + -DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
413 + -DVTK_Group_Qt:BOOL=ON
414 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKitWidgets=ON
415 + )
416 + fi
417 +
418 + if use R; then
419 + mycmakeargs+=(
420 + -DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
421 + -DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
422 + )
423 + fi
424 +
425 + append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
426 +
427 + use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
428 +
429 + if use mpi; then
430 + export CC=mpicc
431 + export CXX=mpicxx
432 + export FC=mpif90
433 + export F90=mpif90
434 + export F77=mpif77
435 + fi
436 +
437 + cmake_src_configure
438 +}
439 +
440 +src_install() {
441 + use web && webapp_src_preinst
442 +
443 + cmake_src_install
444 +
445 + use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
446 +
447 + # Stop web page images from being compressed
448 + use doc && docompress -x /usr/share/doc/${PF}/doxygen
449 +
450 + if use tcl; then
451 + # install Tcl docs
452 + docinto vtk_tcl
453 + docinto .
454 + fi
455 +
456 + # install examples
457 + if use examples; then
458 + einfo "Installing examples"
459 + mv -v {E,e}xamples || die
460 + dodoc -r examples
461 + docompress -x /usr/share/doc/${PF}/examples
462 + fi
463 +
464 + # with MPI, rpaths are not deleted properly
465 + if use mpi; then
466 + chrpath -d "${ED}"/usr/$(get_libdir)/*.so.* || die
467 + if use python; then
468 + chrpath -d "${ED}"/$(python_get_sitedir)/vtkmodules/*.so || die
469 + chrpath -d "${ED}"/usr/bin/{,p}vtkpython || die
470 + fi
471 + fi
472 +
473 + use python && python_optimize
474 +
475 + # environment
476 + cat >> "${T}"/40${PN} <<- EOF || die
477 + VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
478 + VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
479 + VTKHOME=${EPREFIX}/usr
480 + EOF
481 + doenvd "${T}"/40${PN}
482 +
483 + use web && webapp_src_install
484 +}
485 +
486 +# webapp.eclass exports these but we want it optional #534036
487 +pkg_postinst() {
488 + use web && webapp_pkg_postinst
489 +}
490 +
491 +pkg_prerm() {
492 + use web && webapp_pkg_prerm
493 +}