Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/
Date: Fri, 01 May 2020 16:48:50
Message-Id: 1588351659.8943c6d7318281ff9e019c5f1f0bd7ca969babdb.tamiko@gentoo
1 commit: 8943c6d7318281ff9e019c5f1f0bd7ca969babdb
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 1 15:04:02 2020 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Fri May 1 16:47:39 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8943c6d7
7
8 sci-libs/vtk: version bump to 8.2.0
9
10 Closes: https://bugs.gentoo.org/684008
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
13
14 sci-libs/vtk/Manifest | 4 +
15 sci-libs/vtk/vtk-8.2.0.ebuild | 336 ++++++++++++++++++++++++++++++++++++++++++
16 2 files changed, 340 insertions(+)
17
18 diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
19 index 4ac149f56f5..11d42271277 100644
20 --- a/sci-libs/vtk/Manifest
21 +++ b/sci-libs/vtk/Manifest
22 @@ -1,4 +1,8 @@
23 DIST VTK-8.1.0.tar.gz 33482506 BLAKE2B 82aecb497847254595f20294120ae793432348fc3fd881924b52c004335d9bae3d052f168bbe291b307af67845a80e740d8996d36991c38fbec7213438e2395d SHA512 3d5efd1a18939e21045278a387817421a98919cbaaa6ed65167c16999e1bb882b849b698d201a294da9920dbc96d1fbc987013462b1c7cbb12920bfff9b6f2a3
24 +DIST VTK-8.2.0.tar.gz 35511819 BLAKE2B 908ed9377d75da6d0bd84de0078ba90a1e9396fcc906ca2981102e2c79d9d3ba4b1297f98682cd2802c7c04f9dbec32ee70740e645c44180befd765f7cda34a6 SHA512 521bd4dabedbc24b0e80a314a34ecd7554b04af28a7973245e3a9cf99a09b995d1b8ac42305c8e53369f226a0a6da3cdb29105ba2c90b46492736ef717760286
25 DIST VTKData-8.1.0.tar.gz 282986441 BLAKE2B 885f35c5386cc5db8db905a868a3ad79c246f1b0e41a3e5b81312b1f3de90483a1e34886d4764c60fe8006acaace2405b25acf047ec0e25a957f7a2d563d3380 SHA512 0a63f87896320aa38970932bf47c9e3f65a8bdd5413e51f95c53e321348b5b4e1eca2405d755eabb785c03939e1936245cc9f1b0f7ad0988c41362ac6f1e3047
26 +DIST VTKData-8.2.0.tar.gz 304287875 BLAKE2B 0292d84be40e11203326dcb1bf45f4a6ad2a785968130d4868a230f1cfbdcb600d0c03d4dae3519e2737dc7a964f29c51500c91b3da4291069608dd80a2bce45 SHA512 517d0f6dfdb0c61f59df933f06d3a28c8a48ea684aaff311456213fe493e2a20128886144325fc4edfa376b2d375a2dae6c60ad6e3d5d2f4a7b0ac1d8545c87b
27 DIST VTKLargeData-8.1.0.tar.gz 166992034 BLAKE2B ac98861ccac2aacfab7547a4b56de5c9e611b8655f077bb85e6ab850fb0cfd79f4722a0486f73eafcde2cd77d6be305201857f3e729b1f60f710c45bcf0bb63f SHA512 9dfd64b5125205ba7d8cba5665da40874d0a9781f3bd2595058d939207d96980c9a68009ce9ed1476931e1b929199c4888ccf6d590f23d2412873ca6907abc31
28 +DIST VTKLargeData-8.2.0.tar.gz 247522878 BLAKE2B 68dc90548604fbbb8419f2b400aea5d26599b48208b4104f41eaa90f99483689cd928cb00e3a7def396d65db2f03c9294d132854a27af74f66eb118c8319c4ce SHA512 8a7ea3d5870b1e4ccb31c77b4c270d00208349da1b2938e957210db3ec1449b678c66edc2faee1d4514aca6d725f642abc91e10ab0c151f6743cad1c53485588
29 DIST vtkDocHtml-8.1.0.tar.gz 132655967 BLAKE2B a27d9631fa9fe42e9b8076aa3b33e03b3835db0f348ed60cfdc866ffe7accd9c5d99b6525523113a4d628253e28d6d9121e78942d89b6ee281d5e7ecee7c289e SHA512 c49338ad2c121ab16098195e5a1f2c9539137a85ae5edaa64d4a887ece0c64efb8840162942f47b70ab2d82d341bba2e706a6ff007fe6bdfbce12ad92bca883c
30 +DIST vtkDocHtml-8.2.0.tar.gz 132516675 BLAKE2B 8651a3793f3326dee36c5ae8a280b00943067f973115697f34770eefd42b5534a7d7e439e7745b32c5fa83daf5a5292b854792d18951af236d0aa77c3aa2b564 SHA512 45e198bde82948d1d8e47a8bdb64a2792c2bfdfc0d939ffe40ded79092d7ac5f497008c00c805baa09d27eabb419cdf0787eee1caf2ac44c5e8759ecf709a317
31
32 diff --git a/sci-libs/vtk/vtk-8.2.0.ebuild b/sci-libs/vtk/vtk-8.2.0.ebuild
33 new file mode 100644
34 index 00000000000..89b747861a8
35 --- /dev/null
36 +++ b/sci-libs/vtk/vtk-8.2.0.ebuild
37 @@ -0,0 +1,336 @@
38 +# Copyright 1999-2020 Gentoo Authors
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=7
42 +
43 +PYTHON_COMPAT=( python3_6 )
44 +WEBAPP_OPTIONAL=yes
45 +WEBAPP_MANUAL_SLOT=yes
46 +
47 +inherit flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils toolchain-funcs cmake-utils virtualx webapp
48 +
49 +# Short package version
50 +SPV="$(ver_cut 1-2)"
51 +
52 +DESCRIPTION="The Visualization Toolkit"
53 +HOMEPAGE="https://www.vtk.org/"
54 +SRC_URI="
55 + https://www.vtk.org/files/release/${SPV}/VTK-${PV}.tar.gz
56 + doc? ( https://www.vtk.org/files/release/${SPV}/vtkDocHtml-${PV}.tar.gz )
57 + examples? (
58 + https://www.vtk.org/files/release/${SPV}/VTKData-${PV}.tar.gz
59 + https://www.vtk.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
60 + )"
61 +
62 +LICENSE="BSD LGPL-2"
63 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
64 +SLOT="0"
65 +IUSE="
66 + all-modules aqua boost doc examples imaging ffmpeg gdal java json mpi
67 + odbc offscreen postgres python qt5 rendering tbb theora tk tcl
68 + video_cards_nvidia views web R +X xdmf2"
69 +
70 +REQUIRED_USE="
71 + all-modules? ( python xdmf2 boost )
72 + java? ( qt5 )
73 + python? ( ${PYTHON_REQUIRED_USE} )
74 + tcl? ( rendering )
75 + examples? ( python )
76 + tk? ( tcl )
77 + web? ( python )
78 + ^^ ( X aqua offscreen )"
79 +
80 +RDEPEND="
81 + app-arch/lz4
82 + dev-libs/expat
83 + dev-libs/jsoncpp:=
84 + dev-libs/libxml2:2
85 + >=media-libs/freetype-2.5.4
86 + >=media-libs/libharu-2.3.0-r2
87 + media-libs/libpng:0=
88 + media-libs/libtheora
89 + media-libs/mesa
90 + media-libs/tiff:0
91 + sci-libs/exodusii
92 + sci-libs/hdf5:=
93 + sci-libs/netcdf:0=
94 + sci-libs/netcdf-cxx:3
95 + sys-libs/zlib
96 + virtual/jpeg:0
97 + virtual/opengl
98 + x11-libs/libX11
99 + x11-libs/libXmu
100 + x11-libs/libXt
101 + boost? ( dev-libs/boost:=[mpi?] )
102 + examples? (
103 + dev-qt/qtcore:5
104 + dev-qt/qtgui:5
105 + )
106 + ffmpeg? ( media-video/ffmpeg )
107 + gdal? ( sci-libs/gdal )
108 + java? ( >=virtual/jdk-1.7:* )
109 + odbc? ( dev-db/unixODBC )
110 + offscreen? ( media-libs/mesa[osmesa] )
111 + postgres? ( dev-db/postgresql:= )
112 + R? ( dev-lang/R )
113 + tbb? ( dev-cpp/tbb )
114 + tcl? ( dev-lang/tcl:0= )
115 + tk? ( dev-lang/tk:0= )
116 + video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
117 + web? (
118 + ${WEBAPP_DEPEND}
119 + $(python_gen_cond_dep '
120 + dev-python/autobahn[${PYTHON_MULTI_USEDEP}]
121 + dev-python/constantly[${PYTHON_MULTI_USEDEP}]
122 + dev-python/hyperlink[${PYTHON_MULTI_USEDEP}]
123 + dev-python/incremental[${PYTHON_MULTI_USEDEP}]
124 + dev-python/six[${PYTHON_MULTI_USEDEP}]
125 + dev-python/twisted[${PYTHON_MULTI_USEDEP}]
126 + dev-python/txaio[${PYTHON_MULTI_USEDEP}]
127 + dev-python/zope-interface[${PYTHON_MULTI_USEDEP}]
128 + ')
129 + )
130 + xdmf2? ( sci-libs/xdmf2 )
131 + $(python_gen_cond_dep "
132 + mpi? (
133 + virtual/mpi[cxx,romio]
134 + python? ( dev-python/mpi4py[\${PYTHON_MULTI_USEDEP}] )
135 + )
136 + python? (
137 + ${PYTHON_DEPS}
138 + dev-python/sip[\${PYTHON_MULTI_USEDEP}]
139 + )
140 + qt5? (
141 + dev-qt/designer:5
142 + dev-qt/qtcore:5
143 + dev-qt/qtgui:5
144 + dev-qt/qtopengl:5
145 + dev-qt/qtsql:5
146 + dev-qt/qtx11extras:5
147 + python? ( dev-python/PyQt5[\${PYTHON_MULTI_USEDEP}] )
148 + )
149 + ")"
150 +DEPEND="${RDEPEND}
151 + doc? ( app-doc/doxygen )"
152 +
153 +S="${WORKDIR}"/VTK-${PV}
154 +
155 +PATCHES=(
156 + "${FILESDIR}"/vtk-8.1.0-openmpi-4-compatibility.patch
157 +)
158 +
159 +RESTRICT="test"
160 +
161 +pkg_setup() {
162 + use java && java-pkg-opt-2_pkg_setup
163 + use python && python-single-r1_pkg_setup
164 + use web && webapp_pkg_setup
165 +}
166 +
167 +src_prepare() {
168 + default
169 +
170 + local x
171 + # missing: VPIC freerange libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
172 + for x in expat freetype hdf5 jpeg jsoncpp libharu libxml2 lz4 netcdf png tiff zlib; do
173 + ebegin "Dropping bundled ${x}"
174 + rm -r ThirdParty/${x}/vtk${x} || die
175 + eend $?
176 + done
177 +
178 + if use doc; then
179 + einfo "Removing .md5 files from documents."
180 + rm -f "${WORKDIR}"/html/*.md5 || die "Failed to remove superfluous hashes"
181 + sed -e "s|\${VTK_BINARY_DIR}/Utilities/Doxygen/doc|${WORKDIR}|" \
182 + -i Utilities/Doxygen/CMakeLists.txt || die
183 + fi
184 +
185 + cmake-utils_src_prepare
186 +}
187 +
188 +src_configure() {
189 + # general configuration
190 + local mycmakeargs=(
191 + -Wno-dev
192 + -DVTK_DIR="${S}"
193 + -DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
194 + -DVTK_INSTALL_PACKAGE_DIR="$(get_libdir)/cmake/${PN}-${SPV}"
195 + -DVTK_INSTALL_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
196 + -DVTK_DATA_ROOT="${EPREFIX}/usr/share/${PN}/data"
197 + -DVTK_CUSTOM_LIBRARY_SUFFIX=""
198 + -DBUILD_SHARED_LIBS=ON
199 + -DVTK_USE_SYSTEM_AUTOBAHN=ON
200 + -DVTK_USE_SYSTEM_EXPAT=ON
201 + -DVTK_USE_SYSTEM_FREETYPE=ON
202 + -DVTK_USE_SYSTEM_FreeType=ON
203 + # Use bundled gl2ps (bundled version is a patched version of 1.3.9. Post 1.3.9 versions should be compatible)
204 + -DVTK_USE_SYSTEM_GL2PS=OFF
205 + -DVTK_USE_SYSTEM_HDF5=ON
206 + -DVTK_USE_SYSTEM_JPEG=ON
207 + -DVTK_USE_SYSTEM_LIBPROJ4=OFF
208 + -DVTK_USE_SYSTEM_LIBXML2=ON
209 + -DVTK_USE_SYSTEM_LibXml2=ON
210 + -DVTK_USE_SYSTEM_NETCDF=ON
211 + -DVTK_USE_SYSTEM_OGGTHEORA=ON
212 + -DVTK_USE_SYSTEM_PNG=ON
213 + -DVTK_USE_SYSTEM_TIFF=ON
214 + -DVTK_USE_SYSTEM_TWISTED=ON
215 + -DVTK_USE_SYSTEM_XDMF2=OFF
216 + -DVTK_USE_SYSTEM_XDMF3=OFF
217 + -DVTK_USE_SYSTEM_ZLIB=ON
218 + -DVTK_USE_SYSTEM_ZOPE=ON
219 + -DVTK_USE_SYSTEM_LIBRARIES=ON
220 + # Use bundled diy2 (no gentoo package / upstream does not provide a Finddiy2.cmake or diy2Config.cmake / diy2-config.cmake)
221 + -DVTK_USE_SYSTEM_DIY2=OFF
222 + -DVTK_USE_GL2PS=ON
223 + -DVTK_USE_LARGE_DATA=ON
224 + -DVTK_USE_PARALLEL=ON
225 + -DVTK_EXTRA_COMPILER_WARNINGS=ON
226 + -DVTK_Group_StandAlone=ON
227 + -DBUILD_DOCUMENTATION=$(usex doc)
228 + -DBUILD_EXAMPLES=$(usex examples)
229 + -DBUILD_VTK_BUILD_ALL_MODULES_FOR_TESTS=off
230 + -DVTK_BUILD_ALL_MODULES=$(usex all-modules)
231 + -DUSE_DOCUMENTATION_HTML_HELP=$(usex doc)
232 + -DVTK_Group_Imaging=$(usex imaging)
233 + -DVTK_Group_MPI=$(usex mpi)
234 + -DVTK_Group_Rendering=$(usex rendering)
235 + -DVTK_Group_Tk=$(usex tk)
236 + -DVTK_Group_Views=$(usex views)
237 + -DVTK_Group_Web=$(usex web)
238 + -DVTK_WWW_DIR="${ED%/}/${MY_HTDOCSDIR}"
239 + -DVTK_WRAP_JAVA=$(usex java)
240 + -DVTK_WRAP_PYTHON=$(usex python)
241 + -DVTK_WRAP_PYTHON_SIP=$(usex python)
242 + -DVTK_WRAP_TCL=$(usex tcl)
243 + -DVTK_USE_BOOST=$(usex boost)
244 + -DUSE_VTK_USE_BOOST=$(usex boost)
245 + -DModule_vtkInfovisBoost=$(usex boost)
246 + -DModule_vtkInfovisBoostGraphAlgorithms=$(usex boost)
247 + -DVTK_USE_ODBC=$(usex odbc)
248 + -DModule_vtkIOODBC=$(usex odbc)
249 + -DVTK_USE_OFFSCREEN=$(usex offscreen)
250 + -DVTK_OPENGL_HAS_OSMESA=$(usex offscreen)
251 + -DVTK_USE_OGGTHEORA_ENCODER=$(usex theora)
252 + -DVTK_USE_NVCONTROL=$(usex video_cards_nvidia)
253 + -DModule_vtkFiltersStatisticsGnuR=$(usex R)
254 + -DVTK_USE_X=$(usex X)
255 + # IO
256 + -DVTK_USE_FFMPEG_ENCODER=$(usex ffmpeg)
257 + -DModule_vtkIOGDAL=$(usex gdal)
258 + -DModule_vtkIOGeoJSON=$(usex json)
259 + -DModule_vtkIOXdmf2=$(usex xdmf2)
260 + -DBUILD_TESTING=$(usex examples)
261 + # Apple stuff, does it really work?
262 + -DVTK_USE_COCOA=$(usex aqua)
263 + )
264 +
265 + if use java; then
266 + local javacargs=$(java-pkg_javac-args)
267 + mycmakeargs+=( -DJAVAC_OPTIONS=${javacargs// /;} )
268 + fi
269 +
270 + if use tbb; then
271 + mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
272 + else
273 + mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
274 + fi
275 +
276 + if use python; then
277 + mycmakeargs+=(
278 + -DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
279 + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
280 + -DPYTHON_LIBRARY="$(python_get_library_path)"
281 + -DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
282 + -DSIP_INCLUDE_DIR="$(python_get_includedir)"
283 + -DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
284 + -DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
285 + -DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX} --root=${D}"
286 + -DVTK_USE_SYSTEM_SIX=ON
287 + )
288 + fi
289 +
290 + if use qt5; then
291 + mycmakeargs+=(
292 + -DVTK_USE_QVTK=ON
293 + -DVTK_USE_QVTK_OPENGL=ON
294 + -DVTK_USE_QVTK_QTOPENGL=ON
295 + -DQT_WRAP_CPP=ON
296 + -DQT_WRAP_UI=ON
297 + -DVTK_INSTALL_QT_DIR="$(basename $(qt5_get_libdir))/qt5/plugins/designer"
298 + -DDESIRED_QT_VERSION=5
299 + -DVTK_QT_VERSION=5
300 + -DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
301 + -DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
302 + -DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt5"
303 + -DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
304 + -DVTK_Group_Qt:BOOL=ON
305 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKitWidgets=ON
306 + )
307 + fi
308 +
309 + if use R; then
310 + mycmakeargs+=(
311 + -DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
312 + -DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
313 + )
314 + fi
315 +
316 + append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
317 +
318 + use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
319 +
320 + if use mpi; then
321 + export CC=mpicc
322 + export CXX=mpicxx
323 + export FC=mpif90
324 + export F90=mpif90
325 + export F77=mpif77
326 + fi
327 +
328 + cmake-utils_src_configure
329 +}
330 +
331 +src_install() {
332 + use web && webapp_src_preinst
333 +
334 + cmake-utils_src_install
335 +
336 + use java && java-pkg_regjar "${ED%/}"/usr/$(get_libdir)/${PN}.jar
337 +
338 + # Stop web page images from being compressed
339 + use doc && docompress -x /usr/share/doc/${PF}/doxygen
340 +
341 + if use tcl; then
342 + # install Tcl docs
343 + docinto vtk_tcl
344 + docinto .
345 + fi
346 +
347 + # install examples
348 + if use examples; then
349 + einfo "Installing examples"
350 + mv -v {E,e}xamples || die
351 + dodoc -r examples
352 + docompress -x /usr/share/doc/${PF}/examples
353 + fi
354 +
355 + # environment
356 + cat >> "${T}"/40${PN} <<- EOF || die
357 + VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
358 + VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
359 + VTKHOME=${EPREFIX}/usr
360 + EOF
361 + doenvd "${T}"/40${PN}
362 +
363 + use web && webapp_src_install
364 +}
365 +
366 +# webapp.eclass exports these but we want it optional #534036
367 +pkg_postinst() {
368 + use web && webapp_pkg_postinst
369 +}
370 +
371 +pkg_prerm() {
372 + use web && webapp_pkg_prerm
373 +}