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-visualization/paraview/files/, sci-visualization/paraview/
Date: Sun, 30 Jun 2019 18:20:24
Message-Id: 1561918747.dc620c1481998584ba8269585d82f04fe980fffa.tamiko@gentoo
1 commit: dc620c1481998584ba8269585d82f04fe980fffa
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 30 14:48:09 2019 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 30 18:19:07 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc620c14
7
8 sci-visualization/paraview: version bump to 5.6.1
9
10 - Version bump to 5.6.1
11 - OpenMP 4.0 compatibility
12 - Fix various dependencies
13
14 Closes: https://bugs.gentoo.org/661860
15 Closes: https://bugs.gentoo.org/686362
16 Closes: https://bugs.gentoo.org/686990
17 Closes: https://bugs.gentoo.org/687534
18 Closes: https://bugs.gentoo.org/687790
19 Package-Manager: Portage-2.3.67, Repoman-2.3.16
20 Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
21
22 sci-visualization/paraview/Manifest | 1 +
23 .../files/paraview-5.6.1-fix_openmp_4.0.patch | 32 +++
24 sci-visualization/paraview/paraview-5.6.1.ebuild | 312 +++++++++++++++++++++
25 3 files changed, 345 insertions(+)
26
27 diff --git a/sci-visualization/paraview/Manifest b/sci-visualization/paraview/Manifest
28 index 9b7d008bf85..396d42620be 100644
29 --- a/sci-visualization/paraview/Manifest
30 +++ b/sci-visualization/paraview/Manifest
31 @@ -1,2 +1,3 @@
32 DIST ParaView-v5.5.2.tar.gz 51418473 BLAKE2B 3300ccbd3fdb522889e9689bd3ad3b37602168658332438d1403f0fcd235722b1751e5acdf01536e4398d759ad26abc4d87f98902f09f64e067a1025e4dcd7a3 SHA512 3150d01cdeaf04aba449b7ffdc22d425d4bace8f17923b56aaf9393695e61fc96406ca49a9ca33ff57f1a2b94a3111b080d4fce5763cce5d082cfbc5c68ea94a
33 DIST ParaView-v5.6.0.tar.gz 54085457 BLAKE2B a99a320f87af19ad4d39336e148f4ab1989225111299341ff3ebb095c652f1392362e42ce90dab8fe7390c44f9200637e76c1076e07d61c7e6cd4aad93df3a83 SHA512 4d7c1b9f5781411cdd290a0ef105221deca1af28bb29b8e6e6c077f3377b110e7c86637c11514559d2d826d36f189d5b5c1caa9e5f9c53820cf35c3ade1ae1f6
34 +DIST ParaView-v5.6.1.tar.xz 38756076 BLAKE2B 65515a61493e5b9518c42b8b255c59086629bc863de9bfd5651b06ea96dce108ce93f559192d76411bfacaa93660add8ee181e68c46e36ba26b65d32dc141534 SHA512 33ca0b29d4dae8f2ecdad3148c30b5cecb4dc64a4fc898206f5f855cacbc18e554c86d6e259b39fb2f56d190cf76cdefe103009b233ce04ad2573caa34b9ca45
35
36 diff --git a/sci-visualization/paraview/files/paraview-5.6.1-fix_openmp_4.0.patch b/sci-visualization/paraview/files/paraview-5.6.1-fix_openmp_4.0.patch
37 new file mode 100644
38 index 00000000000..51562415031
39 --- /dev/null
40 +++ b/sci-visualization/paraview/files/paraview-5.6.1-fix_openmp_4.0.patch
41 @@ -0,0 +1,32 @@
42 +diff -urNd ParaView-v5.6.0/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/openmp/internal/FunctorsOpenMP.h ParaView-v5.6.0-openmp/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/openmp/internal/FunctorsOpenMP.h
43 +--- ParaView-v5.6.0/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/openmp/internal/FunctorsOpenMP.h 2018-11-07 05:05:18.000000000 +1000
44 ++++ ParaView-v5.6.0-openmp/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/openmp/internal/FunctorsOpenMP.h 2019-06-28 14:04:02.292922908 +1000
45 +@@ -290,7 +290,7 @@
46 + std::unique_ptr<ReturnType[]> threadData;
47 +
48 + VTKM_OPENMP_DIRECTIVE(parallel default(none) firstprivate(f)
49 +- shared(data, doParallel, numThreads, threadData))
50 ++ shared(data, doParallel, numThreads, threadData, numVals))
51 + {
52 +
53 + int tid = omp_get_thread_num();
54 +@@ -422,7 +422,7 @@
55 + vtkm::Id outIdx = 0;
56 +
57 + VTKM_OPENMP_DIRECTIVE(parallel default(none) firstprivate(keysIn, valuesIn, keysOut, valuesOut, f)
58 +- shared(outIdx))
59 ++ shared(outIdx, numValues))
60 + {
61 + int tid = omp_get_thread_num();
62 + int numThreads = omp_get_num_threads();
63 +diff -urNd ParaView-v5.6.0/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/openmp/internal/ParallelSortOpenMP.h ParaView-v5.6.0-openmp/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/openmp/internal/ParallelSortOpenMP.h
64 +--- ParaView-v5.6.0/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/openmp/internal/ParallelSortOpenMP.h 2018-11-07 05:05:18.000000000 +1000
65 ++++ ParaView-v5.6.0-openmp/VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/openmp/internal/ParallelSortOpenMP.h 2019-06-28 13:54:33.132064191 +1000
66 +@@ -133,6 +133,7 @@
67 + VTKM_OPENMP_DIRECTIVE(parallel for
68 + default(none)
69 + firstprivate(valuesInPortal, indexPortal, valuesOutPortal)
70 ++ shared(size)
71 + schedule(static))
72 + for (vtkm::Id i = 0; i < size; ++i)
73 + {
74
75 diff --git a/sci-visualization/paraview/paraview-5.6.1.ebuild b/sci-visualization/paraview/paraview-5.6.1.ebuild
76 new file mode 100644
77 index 00000000000..a1cc1d76516
78 --- /dev/null
79 +++ b/sci-visualization/paraview/paraview-5.6.1.ebuild
80 @@ -0,0 +1,312 @@
81 +# Copyright 1999-2019 Gentoo Authors
82 +# Distributed under the terms of the GNU General Public License v2
83 +
84 +EAPI=7
85 +
86 +PYTHON_COMPAT=( python{2_7,3_5,3_6} )
87 +inherit cmake-utils desktop gnome2-utils python-single-r1 toolchain-funcs
88 +
89 +MAIN_PV=$(ver_cut 0-1)
90 +MAJOR_PV=$(ver_cut 1-2)
91 +MY_P="ParaView-v${PV}"
92 +
93 +DESCRIPTION="Powerful scientific data visualization application"
94 +HOMEPAGE="https://www.paraview.org"
95 +SRC_URI="https://www.paraview.org/files/v${MAJOR_PV}/${MY_P}.tar.xz"
96 +
97 +LICENSE="paraview GPL-2"
98 +KEYWORDS="~amd64 ~x86"
99 +SLOT="0"
100 +IUSE="boost cg coprocessing development doc examples ffmpeg mpi mysql nvcontrol openmp offscreen plugins python +qt5 sqlite tcl test tk"
101 +
102 +RESTRICT="mirror test"
103 +
104 +# "vtksqlite, needed by vtkIOSQL" and "vtkIOSQL, needed by vtkIOMySQL"
105 +REQUIRED_USE="python? ( mpi ${PYTHON_REQUIRED_USE} )
106 + mysql? ( sqlite )
107 + ?? ( offscreen qt5 )"
108 +
109 +RDEPEND="
110 + app-arch/lz4
111 + dev-libs/expat
112 + dev-libs/jsoncpp
113 + dev-libs/libxml2:2
114 + dev-libs/protobuf:=
115 + dev-libs/pugixml
116 + media-libs/freetype
117 + media-libs/glew:0
118 + media-libs/libpng:0
119 + media-libs/libtheora
120 + media-libs/tiff:0=
121 + sci-libs/cgnslib
122 + sci-libs/hdf5:=[mpi=]
123 + >=sci-libs/netcdf-4.2[hdf5]
124 + >=sci-libs/netcdf-cxx-4.2:3
125 + sys-libs/zlib
126 + virtual/glu
127 + virtual/jpeg:0
128 + x11-libs/libX11
129 + x11-libs/libXext
130 + x11-libs/libXmu
131 + x11-libs/libXt
132 + coprocessing? (
133 + plugins? (
134 + dev-python/PyQt5
135 + dev-qt/qtgui:5[-gles2]
136 + )
137 + )
138 + ffmpeg? ( virtual/ffmpeg )
139 + mpi? ( virtual/mpi[cxx,romio] )
140 + mysql? ( dev-db/mysql-connector-c )
141 + offscreen? ( >=media-libs/mesa-18.3.6[osmesa] )
142 + !offscreen? ( virtual/opengl )
143 + python? (
144 + ${PYTHON_DEPS}
145 + dev-python/constantly[${PYTHON_USEDEP}]
146 + dev-python/incremental[${PYTHON_USEDEP}]
147 + dev-python/matplotlib[${PYTHON_USEDEP}]
148 + dev-python/numpy[${PYTHON_USEDEP}]
149 + dev-python/pygments[${PYTHON_USEDEP}]
150 + dev-python/sip[${PYTHON_USEDEP}]
151 + dev-python/six[${PYTHON_USEDEP}]
152 + || ( dev-python/twisted[${PYTHON_USEDEP}]
153 + dev-python/twisted-core[${PYTHON_USEDEP}]
154 + )
155 + dev-python/zope-interface[${PYTHON_USEDEP}]
156 + mpi? ( dev-python/mpi4py )
157 + qt5? ( dev-python/PyQt5[opengl,webkit,${PYTHON_USEDEP}] )
158 + )
159 + qt5? (
160 + dev-qt/designer:5
161 + dev-qt/qtgui:5[-gles2]
162 + dev-qt/qthelp:5
163 + dev-qt/qtopengl:5[-gles2]
164 + dev-qt/qtsql:5
165 + dev-qt/qttest:5
166 + dev-qt/qtwebkit:5
167 + dev-qt/qtx11extras:5
168 + )
169 + sqlite? ( dev-db/sqlite:3 )
170 + tcl? ( dev-lang/tcl:0= )
171 + tk? ( dev-lang/tk:0= )"
172 +DEPEND="${RDEPEND}
173 + ${PYTHON_DEPS}
174 + boost? ( dev-libs/boost[mpi?,${PYTHON_USEDEP}] )
175 + doc? ( app-doc/doxygen )"
176 +
177 +S="${WORKDIR}/${MY_P}"
178 +
179 +PATCHES=(
180 + "${FILESDIR}"/${PN}-4.0.1-xdmf-cstring.patch
181 + "${FILESDIR}"/${PN}-5.3.0-fix_buildsystem.patch
182 + "${FILESDIR}"/${PN}-5.5.0-allow_custom_build_type.patch
183 + "${FILESDIR}"/${PN}-5.6.1-fix_openmp_4.0.patch
184 +)
185 +
186 +CMAKE_MAKEFILE_GENERATOR="emake" #579474
187 +
188 +pkg_setup() {
189 + [[ ${MERGE_TYPE} != "binary" ]] && use openmp && tc-check-openmp
190 + python-single-r1_pkg_setup
191 + PVLIBDIR=$(get_libdir)/${PN}-${MAJOR_PV}
192 +}
193 +
194 +src_prepare() {
195 +
196 + # Bug #661812
197 + mkdir -p Plugins/StreamLinesRepresentation/doc || die
198 +
199 + cmake-utils_src_prepare
200 +
201 + # lib64 fixes
202 + sed -i \
203 + -e "s:/lib/python:/$(get_libdir)/python:g" \
204 + VTK/ThirdParty/xdmf3/vtkxdmf3/CMakeLists.txt || die
205 + sed -i \
206 + -e "s:lib/paraview-:$(get_libdir)/paraview-:g" \
207 + ParaViewCore/ServerManager/SMApplication/vtkInitializationHelper.cxx || die
208 +}
209 +
210 +src_configure() {
211 + if use qt5; then
212 + export QT_SELECT=qt5
213 + fi
214 +
215 + local mycmakeargs=(
216 + -DCMAKE_INSTALL_LIBDIR="${PVLIBDIR}"
217 + -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
218 + -DEXPAT_INCLUDE_DIR="${EPREFIX}"/usr/include
219 + -DEXPAT_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libexpat.so
220 + -DBUILD_SHARED_LIBS=ON
221 + -DCMAKE_VERBOSE_MAKEFILE=ON
222 +
223 + -DVTK_Group_StandAlone=ON
224 + -DVTK_DEFAULT_RENDER_WINDOW_OFFSCREEN=TRUE
225 +
226 + -DVTK_USE_OGGTHEORA_ENCODER=TRUE
227 + -DVTK_USE_SYSTEM_CGNS=ON
228 + -DVTK_USE_SYSTEM_PUGIXML=ON
229 + -DVTK_USE_SYSTEM_EXPAT=ON
230 + -DVTK_USE_SYSTEM_FREETYPE=ON
231 + -DVTK_USE_SYSTEM_GL2PS=OFF # doesn't compile, requires modified sources
232 + -DVTK_USE_SYSTEM_GLEW=ON
233 + -DVTK_USE_SYSTEM_HDF5=ON
234 + -DVTK_USE_SYSTEM_JPEG=ON
235 + -DVTK_USE_SYSTEM_JSONCPP=ON
236 + -DVTK_USE_SYSTEM_LIBXML2=ON
237 + -DVTK_USE_SYSTEM_LZ4=ON
238 + -DVTK_USE_SYSTEM_NETCDF=ON
239 + -DVTK_USE_SYSTEM_PNG=ON
240 + -DVTK_USE_SYSTEM_PROTOBUF=ON
241 + -DVTK_USE_SYSTEM_TIFF=ON
242 + -DVTK_USE_SYSTEM_XDMF2=OFF # does not compile with sci-libs/xdmf2-1.0_p141226
243 + -DVTK_USE_SYSTEM_ZLIB=ON
244 +
245 + # boost
246 + -DModule_vtkInfovisBoost="$(usex boost)"
247 +
248 + # coprocessing
249 + -DPARAVIEW_ENABLE_CATALYST="$(usex coprocessing)"
250 +
251 + # doc
252 + -DBUILD_DOCUMENTATION="$(usex doc)"
253 +
254 + # examples
255 + -DBUILD_EXAMPLES="$(usex examples)"
256 +
257 + # ffmpeg
258 + -DPARAVIEW_ENABLE_FFMPEG="$(usex ffmpeg)"
259 + -DVTK_USE_FFMPEG_ENCODER="$(usex ffmpeg)"
260 + -DModule_vtkIOFFMPEG="$(usex ffmpeg)"
261 +
262 + # mpi
263 + -DPARAVIEW_USE_ICE_T="$(usex mpi)"
264 + -DPARAVIEW_USE_MPI_SSEND="$(usex mpi)"
265 + -DPARAVIEW_USE_MPI="$(usex mpi)"
266 + -DVTK_Group_MPI="$(usex mpi)"
267 + -DVTK_XDMF_USE_MPI="$(usex mpi)"
268 + -DXDMF_BUILD_MPI="$(usex mpi)"
269 +
270 + # mysql
271 + -DModule_vtkIOMySQL="$(usex mysql)"
272 +
273 + # offscreen
274 + -DVTK_USE_X=$(usex !offscreen)
275 + -DVTK_OPENGL_HAS_OSMESA=$(usex offscreen)
276 + -DVTK_OPENGL_HAS_OSMESA=$(usex offscreen)
277 +
278 + # plugins
279 + -DPARAVIEW_BUILD_PLUGIN_AdiosReader="$(usex plugins)"
280 + -DPARAVIEW_BUILD_PLUGIN_AnalyzeNIfTIIO="$(usex plugins)"
281 + -DPARAVIEW_BUILD_PLUGIN_ArrowGlyph="$(usex plugins)"
282 + -DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting="$(usex plugins)"
283 + -DPARAVIEW_BUILD_PLUGIN_GMVReader="$(usex plugins)"
284 + -DPARAVIEW_BUILD_PLUGIN_Moments="$(usex plugins)"
285 + -DPARAVIEW_BUILD_PLUGIN_NonOrthogonalSource="$(usex plugins)"
286 + -DPARAVIEW_BUILD_PLUGIN_PacMan="$(usex plugins)"
287 + -DPARAVIEW_BUILD_PLUGIN_SierraPlotTools="$(usex plugins)"
288 + -DPARAVIEW_BUILD_PLUGIN_SLACTools="$(usex plugins)"
289 + -DPARAVIEW_BUILD_PLUGIN_StreamingParticles="$(usex plugins)"
290 + -DPARAVIEW_BUILD_PLUGIN_SurfaceLIC="$(usex plugins)"
291 + # these are always needed for plugins
292 + -DModule_vtkFiltersFlowPaths="$(usex plugins)"
293 + -DModule_vtkPVServerManagerApplication="$(usex plugins)"
294 + # force this module due to incorrect build system deps wrt bug 460528
295 + -DModule_vtkUtilitiesProcessXML=ON
296 +
297 + # python
298 + -DModule_pqPython="$(usex python)"
299 + -DModule_vtkmpi4py="$(usex python)"
300 + -DModule_vtkPython="$(usex python)"
301 + -DModule_vtkWrappingPythonCore="$(usex python)"
302 + -DPARAVIEW_ENABLE_PYTHON="$(usex python)"
303 + -DXDMF_WRAP_PYTHON="$(usex python)"
304 +
305 + # qt5
306 + -DPARAVIEW_INSTALL_DEVELOPMENT_FILES="$(usex development)"
307 + -DModule_vtkGUISupportQtSQL="$(usex qt5)"
308 + -DModule_vtkRenderingQt="$(usex qt5)"
309 + -DModule_vtkViewsQt="$(usex qt5)"
310 + -DPARAVIEW_BUILD_QT_GUI="$(usex qt5)"
311 + -DVTK_Group_ParaViewQt="$(usex qt5)"
312 + -DVTK_Group_Qt="$(usex qt5)"
313 + -DModule_pqPython="$(usex qt5 "$(usex python)" "off")"
314 + $(usex qt5 "-DPARAVIEW_QT_VERSION=5" "")
315 + -DVTK_USE_NVCONTROL="$(usex nvcontrol)"
316 +
317 + # sqlite
318 + -DModule_vtksqlite="$(usex sqlite)"
319 +
320 + # tcl
321 + -DModule_vtkTclTk="$(usex tcl)"
322 +
323 + # test
324 + -DBUILD_TESTING="$(usex test)"
325 +
326 + # tk
327 + -DVTK_Group_Tk="$(usex tk)"
328 + -DVTK_USE_TK="$(usex tk)"
329 + -DModule_vtkRenderingTk="$(usex tk)"
330 + )
331 +
332 + if use openmp; then
333 + mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP )
334 + fi
335 +
336 + if use python; then
337 + mycmakeargs+=(
338 + -DVTK_USE_SYSTEM_TWISTED=ON
339 + -DVTK_USE_SYSTEM_AUTOBAHN=ON
340 + -DVTK_USE_SYSTEM_ZOPE=ON
341 + )
342 + fi
343 +
344 + if use qt5; then
345 + mycmakeargs+=(
346 + -DVTK_USE_QVTK=ON
347 + -DOPENGL_gl_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libGL.so
348 + -DOPENGL_glu_LIBRARY="${EPREFIX}"/usr/$(get_libdir)/libGLU.so
349 + -DVTK_QT_VERSION=5
350 + -DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
351 + -DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
352 + -DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
353 + -DVTK_Group_Qt:BOOL=ON
354 + )
355 + fi
356 +
357 + cmake-utils_src_configure
358 +}
359 +
360 +src_install() {
361 + cmake-utils_src_install
362 +
363 + # remove wrapper binaries and put the actual executable in place
364 + for i in {paraview-config,pvserver,pvdataserver,pvrenderserver,pvbatch,pvpython,paraview}; do
365 + if [ -f "${ED}"/usr/lib/"$i" ]; then
366 + mv "${ED}"/usr/lib/"$i" "${ED}"/usr/bin/"$i" || die
367 + fi
368 + done
369 +
370 + # install libraries into correct directory respecting get_libdir:
371 + mv "${ED}"/usr/lib "${ED}"/usr/lib_tmp || die
372 + mkdir -p "${ED}"/usr/"${PVLIBDIR}" || die
373 + mv "${ED}"/usr/lib_tmp/* "${ED}"/usr/"${PVLIBDIR}" || die
374 + rmdir "${ED}"/usr/lib_tmp || die
375 +
376 + # set up the environment
377 + echo "LDPATH=${EPREFIX}/usr/${PVLIBDIR}" > "${T}"/40${PN} || die
378 + doenvd "${T}"/40${PN}
379 +
380 + newicon "${S}"/Applications/ParaView/pvIcon-32x32.png paraview.png
381 + make_desktop_entry paraview "Paraview" paraview
382 +
383 + use python && python_optimize "${D}"/usr/$(get_libdir)/${PN}-${MAJOR_PV}
384 + }
385 +
386 + pkg_postinst() {
387 + gnome2_icon_cache_update
388 + }
389 +
390 + pkg_postrm() {
391 + gnome2_icon_cache_update
392 + }