summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/paraview/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/paraview/package.py')
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py64
1 files changed, 38 insertions, 26 deletions
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index 8bf43b6132..32fdf3746a 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -1,27 +1,8 @@
-##############################################################################
-# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
-# Produced at the Lawrence Livermore National Laboratory.
+# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
-# This file is part of Spack.
-# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
-# LLNL-CODE-647188
-#
-# For details, see https://github.com/spack/spack
-# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License (as
-# published by the Free Software Foundation) version 2.1, February 1999.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
-# conditions of the GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##############################################################################
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
from spack import *
import os
@@ -34,6 +15,9 @@ class Paraview(CMakePackage):
url = "http://www.paraview.org/files/v5.3/ParaView-v5.3.0.tar.gz"
_urlfmt = 'http://www.paraview.org/files/v{0}/ParaView-v{1}{2}.tar.gz'
+ version('5.5.2', '7eb93c31a1e5deb7098c3b4275e53a4a')
+ version('5.5.1', 'a7d92a45837b67c3371006cc45163277')
+ version('5.5.0', 'a8f2f41edadffdcc89b37fdc9aa7f005')
version('5.4.1', '4030c70477ec5a85aa72d6fc86a30753')
version('5.4.0', 'b92847605bac9036414b644f33cb7163')
version('5.3.0', '68fbbbe733aa607ec13d1db1ab5eba71')
@@ -49,21 +33,27 @@ class Paraview(CMakePackage):
variant('osmesa', default=False, description='Enable OSMesa support')
variant('qt', default=False, description='Enable Qt (gui) support')
variant('opengl2', default=True, description='Enable OpenGL2 backend')
+ variant('examples', default=False, description="Build examples")
+ variant('hdf5', default=False, description="Use external HDF5")
depends_on('python@2:2.8', when='+python')
depends_on('py-numpy', when='+python', type='run')
depends_on('py-matplotlib', when='+python', type='run')
depends_on('mpi', when='+mpi')
- depends_on('qt', when='@5.3.0:+qt')
+ depends_on('qt+opengl', when='@5.3.0:+qt+opengl2')
+ depends_on('qt~opengl', when='@5.3.0:+qt~opengl2')
depends_on('qt@:4', when='@:5.2.0+qt')
depends_on('mesa+swrender', when='+osmesa')
+ depends_on('libxt', when='+qt')
conflicts('+qt', when='+osmesa')
depends_on('bzip2')
depends_on('freetype')
# depends_on('hdf5+mpi', when='+mpi')
# depends_on('hdf5~mpi', when='~mpi')
+ depends_on('hdf5+hl+mpi', when='+hdf5+mpi')
+ depends_on('hdf5+hl~mpi', when='+hdf5~mpi')
depends_on('jpeg')
depends_on('libpng')
depends_on('libtiff')
@@ -90,6 +80,15 @@ class Paraview(CMakePackage):
else:
return self._urlfmt.format(version.up_to(2), version, '')
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ if os.path.isdir(self.prefix.lib64):
+ lib_dir = self.prefix.lib64
+ else:
+ lib_dir = self.prefix.lib
+ paraview_version = 'paraview-%s' % self.spec.version.up_to(2)
+ spack_env.set('PARAVIEW_VTK_DIR',
+ join_path(lib_dir, 'cmake', paraview_version))
+
def setup_environment(self, spack_env, run_env):
if os.path.isdir(self.prefix.lib64):
lib_dir = self.prefix.lib64
@@ -100,6 +99,15 @@ class Paraview(CMakePackage):
paraview_version))
run_env.prepend_path('LD_LIBRARY_PATH', join_path(lib_dir,
paraview_version))
+ run_env.set('PARAVIEW_VTK_DIR',
+ join_path(lib_dir, 'cmake', paraview_version))
+ if '+python' in self.spec:
+ run_env.prepend_path('PYTHONPATH', join_path(lib_dir,
+ paraview_version))
+ run_env.prepend_path('PYTHONPATH', join_path(lib_dir,
+ paraview_version, 'site-packages'))
+ run_env.prepend_path('PYTHONPATH', join_path(lib_dir,
+ paraview_version, 'site-packages', 'vtk'))
def cmake_args(self):
"""Populate cmake arguments for ParaView."""
@@ -125,8 +133,9 @@ class Paraview(CMakePackage):
'-DVTK_RENDERING_BACKEND:STRING=%s' % rendering,
'-DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=%s' % includes,
'-DBUILD_TESTING:BOOL=OFF',
+ '-DBUILD_EXAMPLES:BOOL=%s' % variant_bool('+examples'),
'-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON',
- '-DVTK_USE_SYSTEM_HDF5:BOOL=OFF',
+ '-DVTK_USE_SYSTEM_HDF5:BOOL=%s' % variant_bool('+hdf5'),
'-DVTK_USE_SYSTEM_JPEG:BOOL=ON',
'-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON',
'-DVTK_USE_SYSTEM_NETCDF:BOOL=OFF',
@@ -150,7 +159,10 @@ class Paraview(CMakePackage):
if '+mpi' in spec:
cmake_args.extend([
'-DPARAVIEW_USE_MPI:BOOL=ON',
- '-DMPIEXEC:FILEPATH=%s/bin/mpiexec' % spec['mpi'].prefix
+ '-DMPIEXEC:FILEPATH=%s/bin/mpiexec' % spec['mpi'].prefix,
+ '-DMPI_CXX_COMPILER:PATH=%s' % spec['mpi'].mpicxx,
+ '-DMPI_C_COMPILER:PATH=%s' % spec['mpi'].mpicc,
+ '-DMPI_Fortran_COMPILER:PATH=%s' % spec['mpi'].mpifc
])
if 'darwin' in spec.architecture: