diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-31 09:46:49 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-31 09:46:49 -0700 |
commit | e2a7b7e50dc4c83fc3c8680ab933c28cdbdecc1a (patch) | |
tree | fde9c378a94e26ae27b3e3fb43acd1dbef0c54cf | |
parent | a6f6c2b9c544faaf0093d22cde4176068f282634 (diff) | |
parent | 3b0311a1e484a4f731d1cc6448dc6804410ecb3c (diff) | |
download | spack-e2a7b7e50dc4c83fc3c8680ab933c28cdbdecc1a.tar.gz spack-e2a7b7e50dc4c83fc3c8680ab933c28cdbdecc1a.tar.bz2 spack-e2a7b7e50dc4c83fc3c8680ab933c28cdbdecc1a.tar.xz spack-e2a7b7e50dc4c83fc3c8680ab933c28cdbdecc1a.zip |
Merge pull request #701 from dhandeo/vtk
VTK
-rw-r--r-- | var/spack/repos/builtin/packages/vtk/package.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 4a27a8fedb..24382af406 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -7,11 +7,23 @@ class Vtk(Package): homepage = "http://www.vtk.org" url = "http://www.vtk.org/files/release/6.1/VTK-6.1.0.tar.gz" + version("7.0.0", "5fe35312db5fb2341139b8e4955c367d", url="http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz") + + version("6.3.0", '0231ca4840408e9dd60af48b314c5b6d', url="http://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz") + version('6.1.0', '25e4dfb3bad778722dcaec80cd5dab7d') depends_on("qt") + # VTK7 defaults to OpenGL2 rendering backend + variant('opengl2', default=True, description='Build with OpenGL instead of OpenGL2 as rendering backend') + def install(self, spec, prefix): + def feature_to_bool(feature, on='ON', off='OFF'): + if feature in spec: + return on + return off + with working_dir('spack-build', create=True): cmake_args = [ "..", @@ -35,6 +47,12 @@ class Vtk(Package): if spec['qt'].satisfies('@5'): cmake_args.append("-DVTK_QT_VERSION:STRING=5") + if spec.satisfies("@6.1.0"): + cmake_args.append("-DCMAKE_C_FLAGS=-DGLX_GLXEXT_LEGACY") + cmake_args.append("-DCMAKE_CXX_FLAGS=-DGLX_GLXEXT_LEGACY") + + cmake_args.append('-DVTK_RENDERING_BACKEND:STRING=%s' % feature_to_bool('+opengl2', 'OpenGL2', 'OpenGL')) + cmake(*cmake_args) make() make("install") |