diff --git a/var/spack/repos/builtin/packages/qwt/no-designer.patch b/var/spack/repos/builtin/packages/qwt/no-designer.patch new file mode 100644 index 0000000000..750d14d649 --- /dev/null +++ b/var/spack/repos/builtin/packages/qwt/no-designer.patch @@ -0,0 +1,33 @@ +--- qwt-6.1.3.orig/qwtconfig.pri 2016-06-13 03:14:23.000000000 -0400 ++++ qwt-6.1.3/qwtconfig.pri 2019-03-29 19:06:22.000000000 -0400 +@@ -42,7 +42,7 @@ + # runtime environment of designer/creator. + ###################################################################### + +-QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer ++#QWT_INSTALL_PLUGINS = $${QWT_INSTALL_PREFIX}/plugins/designer + + # linux distributors often organize the Qt installation + # their way and QT_INSTALL_PREFIX doesn't offer a good +@@ -118,7 +118,7 @@ + # Otherwise you have to build it from the designer directory. + ###################################################################### + +-QWT_CONFIG += QwtDesigner ++#QWT_CONFIG += QwtDesigner + + ###################################################################### + # Compile all Qwt classes into the designer plugin instead +@@ -132,9 +132,9 @@ + # environment of the designer/creator. + ###################################################################### + +-win32 { +- QWT_CONFIG += QwtDesignerSelfContained +-} ++#win32 { ++# QWT_CONFIG += QwtDesignerSelfContained ++#} + + ###################################################################### + # If you want to auto build the examples, enable the line below diff --git a/var/spack/repos/builtin/packages/qwt/package.py b/var/spack/repos/builtin/packages/qwt/package.py index c62cb56eb6..3f333b9626 100644 --- a/var/spack/repos/builtin/packages/qwt/package.py +++ b/var/spack/repos/builtin/packages/qwt/package.py @@ -19,7 +19,13 @@ class Qwt(QMakePackage): version('6.1.3', '19d1f5fa5e22054d22ee3accc37c54ba') version('5.2.2', '70d77e4008a6cc86763737f0f24726ca') + variant('designer', default=False, + description="Build extensions to QT designer") + + patch('no-designer.patch', when='~designer') + depends_on('qt+opengl') + depends_on('qt+tools', when='+designer') # Qwt 6.1.1 and older use a constant that was removed in Qt 5.4 # https://bugs.launchpad.net/ubuntu/+source/qwt-qt5/+bug/1485213 depends_on('qt@:5.3', when='@:6.1.1') diff --git a/var/spack/repos/builtin/packages/visit/nonframework-qwt.patch b/var/spack/repos/builtin/packages/visit/nonframework-qwt.patch new file mode 100644 index 0000000000..60f3ff12a4 --- /dev/null +++ b/var/spack/repos/builtin/packages/visit/nonframework-qwt.patch @@ -0,0 +1,11 @@ +--- a/src/CMake/FindQwt.cmake 2019-02-15 18:31:27.000000000 -0500 ++++ b/src/CMake/FindQwt.cmake 2019-08-11 09:18:38.000000000 -0400 +@@ -51,7 +51,7 @@ + include(${VISIT_SOURCE_DIR}/CMake/SetUpThirdParty.cmake) + + if(APPLE) +- if(VISIT_STATIC) ++ if ("TRUE") + SET_UP_THIRD_PARTY(QWT lib include qwt) + else() + SET_UP_THIRD_PARTY(QWT lib lib/qwt.framework/Versions/Current/Headers qwt) diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 4ec7326f29..4c7e25e693 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -10,8 +10,10 @@ class Visit(CMakePackage): """VisIt is an Open Source, interactive, scalable, visualization, animation and analysis tool.""" homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/" - url = "http://portal.nersc.gov/project/visit/releases/2.10.1/visit2.10.1.tar.gz" + url = "https://portal.nersc.gov/project/visit/releases/3.0.1/visit3.0.1.tar.gz" + version('3.0.1', 'a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd') + version('2.13.3', 'cf0b3d2e39e1cd102dd886d3ef6da892733445e362fc28f24d9682012cccf2e5') version('2.13.0', '716644b8e78a00ff82691619d4d1e7a914965b6535884890b667b97ba08d6a0f') version('2.12.3', '2dd351a291ee3e79926bc00391ca89b202cfa4751331b0fdee1b960c7922161f') version('2.12.2', '355779b1dbf440cdd548526eecd77b60') @@ -20,61 +22,84 @@ class Visit(CMakePackage): version('2.10.1', '3cbca162fdb0249f17c4456605c4211e') variant('gui', default=True, description='Enable VisIt\'s GUI') + variant('adios2', default=False, description='Enable ADIOS2 file format') variant('hdf5', default=True, description='Enable HDF5 file format') variant('silo', default=True, description='Enable Silo file format') variant('python', default=True, description='Enable Python support') variant('mpi', default=True, description='Enable parallel engine') + patch('spack-changes.patch') + patch('nonframework-qwt.patch', when='^qt~framework platform=darwin') + depends_on('cmake@3.0:', type='build') - depends_on('vtk@6.1.0~opengl2~mpi') - depends_on('qt@4.8.6', when='+gui') + depends_on('vtk@8.1.0:+opengl2', when='@3.0:3.0.1') + depends_on('vtk@6.1.0~opengl2', when='@:2.999') + depends_on('vtk+python', when='+python @3.0:') + depends_on('vtk~mpi') + depends_on('vtk+qt', when='+gui') + depends_on('qt@4.8.6:4.999', when='+gui @:2.999') + depends_on('qt@5.10:', when='+gui @3.0:') depends_on('qwt', when='+gui') - depends_on('python', when='+python') + depends_on('python@2.6:2.8', when='+python') depends_on('silo+shared', when='+silo') depends_on('hdf5', when='+hdf5') depends_on('mpi', when='+mpi') + depends_on('adios2', when='+adios2') - conflicts('+hdf5', when='~gui') - conflicts('+silo', when='~gui') + conflicts('+adios2', when='@:2.999') + conflicts('+hdf5', when='~gui @:2.999') + conflicts('+silo', when='~gui @:2.999') root_cmakelists_dir = 'src' + @when('@3.0.0:3.0.1') + def patch(self): + # Some of VTK's targets don't create explicit libraries, so there is no + # 'vtktiff'. Instead, replace with the library variable defined from + # VTK's module flies (e.g. lib/cmake/vtk-8.1/Modules/vtktiff.cmake) + for filename in find('src', 'CMakeLists.txt'): + filter_file(r'\bvtk(tiff|jpeg|png)', r'${vtk\1_LIBRARIES}', + filename) + def cmake_args(self): spec = self.spec args = [ - '-DVTK_MAJOR_VERSION={0}'.format(spec['vtk'].version[0]), - '-DVTK_MINOR_VERSION={0}'.format(spec['vtk'].version[1]), - '-DVISIT_VTK_DIR:PATH={0}'.format(spec['vtk'].prefix), + '-DVTK_MAJOR_VERSION=' + str(spec['vtk'].version[0]), + '-DVTK_MINOR_VERSION=' + str(spec['vtk'].version[1]), + '-DVISIT_VTK_DIR:PATH=' + spec['vtk'].prefix, + '-DVISIT_ZLIB_DIR:PATH=' + spec['zlib'].prefix, '-DVISIT_USE_GLEW=OFF', - '-DCMAKE_CXX_FLAGS=-fPIC', - '-DCMAKE_C_FLAGS=-fPIC' + '-DCMAKE_CXX_FLAGS=' + self.compiler.pic_flag, + '-DCMAKE_C_FLAGS=' + self.compiler.pic_flag, ] - if(spec.variants['python'].value): + if '+python' in spec: args.append('-DPYTHON_DIR:PATH={0}'.format(spec['python'].home)) - if(spec.variants['gui'].value): + if '+gui' in spec: qt_bin = spec['qt'].prefix.bin - args.append( - '-DVISIT_LOC_QMAKE_EXE:FILEPATH={0}/qmake-qt4'.format(qt_bin)) - args.append('-DVISIT_QWT_DIR:PATH={0}'.format(spec['qwt'].prefix)) + args.extend([ + '-DVISIT_LOC_QMAKE_EXE:FILEPATH={0}/qmake'.format(qt_bin), + '-DVISIT_QT_DIR:PATH=' + spec['qt'].prefix, + '-DVISIT_QWT_DIR:PATH=' + spec['qwt'].prefix + ]) else: args.append('-DVISIT_SERVER_COMPONENTS_ONLY=ON') args.append('-DVISIT_ENGINE_ONLY=ON') - if(spec.variants['hdf5'].value): + if '+hdf5' in spec: args.append( '-DVISIT_HDF5_DIR:PATH={0}'.format(spec['hdf5'].prefix)) if spec.satisfies('^hdf5+mpi', strict=True): args.append('-DVISIT_HDF5_MPI_DIR:PATH={0}'.format( spec['hdf5'].prefix)) - if(spec.variants['silo'].value): + if '+silo' in spec: args.append( '-DVISIT_SILO_DIR:PATH={0}'.format(spec['silo'].prefix)) - if(spec.variants['mpi'].value): + if '+mpi' in spec: args.append('-DVISIT_PARALLEL=ON') args.append('-DVISIT_C_COMPILER={0}'.format(spec['mpi'].mpicc)) args.append('-DVISIT_CXX_COMPILER={0}'.format(spec['mpi'].mpicxx)) diff --git a/var/spack/repos/builtin/packages/visit/spack-changes.patch b/var/spack/repos/builtin/packages/visit/spack-changes.patch new file mode 100644 index 0000000000..e6cc810bf2 --- /dev/null +++ b/var/spack/repos/builtin/packages/visit/spack-changes.patch @@ -0,0 +1,22 @@ +--- a/src/CMakeLists.txt 2019-08-11 17:06:04.000000000 -0400 ++++ b/src/CMakeLists.txt 2019-08-11 17:06:20.000000000 -0400 +@@ -459,6 +459,7 @@ + cmake_policy(SET CMP0033 OLD) + cmake_policy(SET CMP0057 NEW) + cmake_policy(SET CMP0062 NEW) ++ cmake_policy(SET CMP0068 NEW) + IF(WIN32) + # don't automatically link with qtmain + cmake_policy(SET CMP0020 OLD) +@@ -2271,11 +2272,6 @@ + # COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/osxfixup/osxfixup.py \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${VISIT_INSTALLED_VERSION} @executable_path/.. 3) + #ADD_DEPENDENCIES(osxfixup install) + +-# todo: replace below with lines above +-IF(APPLE) +- ADD_SUBDIRECTORY(osxfixup) +-ENDIF(APPLE) +- + IF (NOT WIN32) + MESSAGE(STATUS "\n\nUse recmake_visit.sh or search for `CMAKE_INVOKE' in CMakeCache.txt to re-run CMake with the same arguments\n\n") + ELSE (NOT WIN32) diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py index 82cd423e4f..1be771e9f4 100644 --- a/var/spack/repos/builtin/packages/vtk/package.py +++ b/var/spack/repos/builtin/packages/vtk/package.py @@ -22,6 +22,7 @@ class Vtk(CMakePackage): version('8.1.2', sha256='0995fb36857dd76ccfb8bb07350c214d9f9099e80b1e66b4a8909311f24ff0db') version('8.1.1', sha256='71a09b4340f0a9c58559fe946dc745ab68a866cf20636a41d97b6046cb736324') + version('8.1.0', sha256='6e269f07b64fb13774f5925161fb4e1f379f4e6a0131c8408c555f6b58ef3cb7') version('8.0.1', '692d09ae8fadc97b59d35cab429b261a') version('7.1.0', 'a7e814c1db503d896af72458c2d0228f') version('7.0.0', '5fe35312db5fb2341139b8e4955c367d') @@ -32,7 +33,6 @@ class Vtk(CMakePackage): variant('opengl2', default=True, description='Enable OpenGL2 backend') variant('osmesa', default=False, description='Enable OSMesa support') variant('python', default=False, description='Enable Python support') - variant('python3', default=False, description='Enable Python3 support') variant('qt', default=False, description='Build with support for Qt') variant('xdmf', default=False, description='Build XDMF file support') variant('ffmpeg', default=False, description='Build with FFMPEG support') @@ -43,21 +43,16 @@ class Vtk(CMakePackage): # At the moment, we cannot build with both osmesa and qt, but as of # VTK 8.1, that should change conflicts('+osmesa', when='+qt') - conflicts('+python', when='+python3') - conflicts('+python3', when='@:8.0') + conflicts('^python@3:', when='@:8.0') extends('python', when='+python') - extends('python', when='+python3') - - depends_on('python@2.7:2.8', when='+python', type=('build', 'run')) - depends_on('python@3:', when='+python3', type=('build', 'run')) + depends_on('python@2.7:', when='+python', type=('build', 'run')) depends_on('py-mpi4py', when='+python+mpi', type='run') - depends_on('py-mpi4py', when='+python3+mpi', type='run') # python3.7 compatibility patch backported from upstream # https://gitlab.kitware.com/vtk/vtk/commit/706f1b397df09a27ab8981ab9464547028d0c322 - patch('python3.7-const-char.patch', when='@:8.1.1 ^python@3.7:') + patch('python3.7-const-char.patch', when='@7.0.0:8.1.1 ^python@3.7:') # The use of the OpenGL2 backend requires at least OpenGL Core Profile # version 3.2 or higher. @@ -129,6 +124,9 @@ def cmake_args(self): '-DNETCDF_C_ROOT={0}'.format(spec['netcdf'].prefix), '-DNETCDF_CXX_ROOT={0}'.format(spec['netcdf-cxx'].prefix), + # Allow downstream codes (e.g. VisIt) to override VTK's classes + '-DVTK_ALL_NEW_OBJECT_FACTORY:BOOL=ON', + # Disable wrappers for other languages. '-DVTK_WRAP_JAVA=OFF', '-DVTK_WRAP_TCL=OFF', @@ -144,12 +142,13 @@ def cmake_args(self): cmake_args.extend(['-DModule_vtkIOFFMPEG:BOOL=ON']) # Enable/Disable wrappers for Python. - if '+python' in spec or '+python3' in spec: + if '+python' in spec: cmake_args.extend([ '-DVTK_WRAP_PYTHON=ON', '-DPYTHON_EXECUTABLE={0}'.format(spec['python'].command.path), - '-DVTK_USE_SYSTEM_MPI4PY:BOOL=ON' ]) + if '+mpi' in spec: + cmake_args.append('-DVTK_USE_SYSTEM_MPI4PY:BOOL=ON') else: cmake_args.append('-DVTK_WRAP_PYTHON=OFF') @@ -206,12 +205,10 @@ def cmake_args(self): if '+mpi' in spec: cmake_args.extend(["-DModule_vtkIOParallelXdmf3:BOOL=ON"]) - cmake_args.extend([ - '-DVTK_USE_SYSTEM_GLEW:BOOL=ON', + cmake_args.append('-DVTK_RENDERING_BACKEND:STRING=' + opengl_ver) - '-DVTK_RENDERING_BACKEND:STRING=OpenGL{0}'.format( - '2' if '+opengl2' in spec else ''), - ]) + if spec.satisfies('@:8.1.0'): + cmake_args.append('-DVTK_USE_SYSTEM_GLEW:BOOL=ON') if '+osmesa' in spec: cmake_args.extend([ @@ -220,9 +217,10 @@ def cmake_args(self): '-DVTK_OPENGL_HAS_OSMESA:BOOL=ON']) else: - cmake_args.extend([ - '-DVTK_OPENGL_HAS_OSMESA:BOOL=OFF', - '-DOpenGL_GL_PREFERENCE:STRING=LEGACY']) + cmake_args.append('-DVTK_OPENGL_HAS_OSMESA:BOOL=OFF') + if spec.satisfies('@:7.9.9'): + # This option is gone in VTK 8.1.2 + cmake_args.append('-DOpenGL_GL_PREFERENCE:STRING=LEGACY') if 'darwin' in spec.architecture: cmake_args.extend([ @@ -262,10 +260,11 @@ def cmake_args(self): if (self.spec.satisfies('%clang') and self.compiler.is_apple and self.compiler.version >= Version('5.1.0')): - cmake_args.extend(['-DVTK_REQUIRED_OBJCXX_FLAGS=""']) + cmake_args.extend(['-DVTK_REQUIRED_OBJCXX_FLAGS=']) # A bug in tao pegtl causes build failures with intel compilers if '%intel' in spec and spec.version >= Version('8.2'): cmake_args.append( '-DVTK_MODULE_ENABLE_VTK_IOMotionFX:BOOL=OFF') + return cmake_args