diff --git a/meshing/packages/magix3d/package.py b/meshing/packages/magix3d/package.py index e378e79..9cee909 100644 --- a/meshing/packages/magix3d/package.py +++ b/meshing/packages/magix3d/package.py @@ -36,14 +36,14 @@ class Magix3d(CMakePackage): version('2.2.6', sha256='9d39dd74a1b9360a5ca2790f2d9e8b17429f82833df2d633b57c866383873d05') version('2.2.5') - depends_on('guitoolkitsvariables', type=('build')) - depends_on('tkutil') - depends_on('vtkcontrib@4: +shared', type=('build', 'link')) - depends_on('preferences@5: +shared', type=('build', 'link')) - depends_on('pythonutil@5: +shared', type=('build', 'link')) + depends_on('guitoolkitsvariables@1.6.0:', type=('build')) + depends_on('tkutil@6:') + depends_on('vtkcontrib@5: +shared', type=('build', 'link')) + depends_on('preferences@6: +shared', type=('build', 'link')) + depends_on('pythonutil@6: +shared', type=('build', 'link')) depends_on('qqualif+gmds', type=('build', 'link')) - depends_on('qtpython@4: +shared', type=('build', 'link')) - depends_on('qtvtk@7: +shared', type=('build', 'link')) + depends_on('qtpython@6: +shared', type=('build', 'link')) + depends_on('qtvtk@8: +shared', type=('build', 'link')) depends_on('cgns', type=('build', 'link')) depends_on('gmds+lima+cgns', type=('build', 'link')) depends_on('gts', type=('build', 'link')) diff --git a/meshing/packages/qqualif/package.py b/meshing/packages/qqualif/package.py index 74ccedd..2aef7c6 100644 --- a/meshing/packages/qqualif/package.py +++ b/meshing/packages/qqualif/package.py @@ -19,13 +19,14 @@ class Qqualif(CMakePackage): depends_on('guitoolkitsvariables', type=('build')) depends_on('qwtcharts@4: ~shared', type=('build', 'link'), when='~shared') depends_on('qwtcharts@4: +shared', type=('build', 'link'), when='+shared') - depends_on('vtkcontrib@4: ~shared', type=('build', 'link'), when='~shared+vtk') - depends_on('vtkcontrib@4: +shared', type=('build', 'link'), when='+shared+vtk') +# depends_on('vtkcontrib@4: ~shared', type=('build', 'link'), when='~shared+vtk') +# depends_on('vtkcontrib@4: +shared', type=('build', 'link'), when='+shared+vtk') depends_on('qualif@2: ~shared', type=('build', 'link'), when='~shared') depends_on('qualif@2: +shared', type=('build', 'link'), when='+shared') depends_on('gmds', type=('build', 'link'), when='+gmds') depends_on('lima', type=('build', 'link'), when='+lima') - depends_on('vtk-maillage', type=('build', 'link'), when='+vtk') + depends_on('vtk-maillage', type=('build', 'link'), when='+vtk7') + depends_on('vtk', type=('build', 'link'), when='+vtk9') # necessary because it is probably missing in the lima cmake files # depends_on('machine-types', type=('build', 'link'), when='+lima') @@ -36,7 +37,12 @@ class Qqualif(CMakePackage): variant('shared', default=True, description='Creation de bibliotheques dynamiques') variant('lima', default=True, description='Utilisation de la structure de maillages Lima') variant('gmds', default=True, description='Utilisation de la structure de maillages GMDS') - variant('vtk', default=True, description='Utilisation de la structure de maillages VTK') +# The difficulty with QQualif is that we do or do not want VTK, and that, for VtkContrib and +# QtVtk, we can use vtk-maillage or vtk 9. +# The use here of the 2 variants vtk7 and vtk9 allows us to cover these 3 cases. + variant('vtk7', default=True, description='Utilisation de la structure de maillages vtkUnstructuredGrid de VTK 7') + variant('vtk9', default=False, description='Utilisation de la structure de maillages vtkUnstructuredGrid de VTK 9') + conflicts('+vtk7', when='+vtk9') version('4.6.0', sha256='78fbbbd4919b5b6a96ee684e66baafa074c2a36328829ac120625e1a6540da14') version('4.5.0', sha256='ae16c1e0c44a5ad3843e9bc7e6beca3d800ce0c887faf646e06b8f0dfb40363e') @@ -65,6 +71,7 @@ def cmake_args(self): args.append(self.define_from_variant('BUILD_SHARED_LIBS', 'shared')) args.append(self.define_from_variant('BUILD_GQLima', 'lima')) args.append(self.define_from_variant('BUILD_GQGMDS', 'gmds')) - args.append(self.define_from_variant('BUILD_GQVtk', 'vtk')) + if self.spec.satisfies('+vtk7') or self.spec.satisfies('+vtk9'): + args.append('-DBUILD_GQVtk:BOOL=ON') return args diff --git a/meshing/packages/qtvtk/package.py b/meshing/packages/qtvtk/package.py index fe6d057..bd8fe7a 100644 --- a/meshing/packages/qtvtk/package.py +++ b/meshing/packages/qtvtk/package.py @@ -19,11 +19,12 @@ class Qtvtk(CMakePackage): depends_on('guitoolkitsvariables', type=('build')) depends_on('qtutil@5: +shared', type=('build', 'link'), when='+shared') depends_on('qtutil@5: ~shared', type=('build', 'link'), when='~shared') - depends_on('vtkcontrib@4: +shared', type=('build', 'link'), when='+shared') - depends_on('vtkcontrib@4: ~shared', type=('build', 'link'), when='~shared') + depends_on('vtkcontrib@5: +shared', type=('build', 'link'), when='+shared') + depends_on('vtkcontrib@5: ~shared', type=('build', 'link'), when='~shared') depends_on('preferences', type=('build', 'link')) depends_on('qt') - depends_on('vtk-maillage +qt', type=('build', 'link')) + depends_on('vtk-maillage +qt', type=('build', 'link'), when='^vtkcontrib+vtk7') + depends_on('vtk +qt', type=('build', 'link'), when='^vtkcontrib~vtk7') variant('shared', default=True, description='Creation de bibliotheques dynamiques (defaut:shared, annuler le defaut par ~shared)') diff --git a/meshing/packages/vtkcontrib/package.py b/meshing/packages/vtkcontrib/package.py index 9ce2e71..8b3e54a 100644 --- a/meshing/packages/vtkcontrib/package.py +++ b/meshing/packages/vtkcontrib/package.py @@ -21,7 +21,8 @@ class Vtkcontrib(CMakePackage): # depends_on('vtk@7.1:7.99~opengl2~python~xdmf+qt', type=('build', 'link')) # depends_on('qt@5.9.1', type=('build', 'link')) depends_on('guitoolkitsvariables@1.5.99:', type=('build', 'link')) - depends_on('vtk-maillage', type=('build', 'link')) + depends_on('vtk-maillage', type=('build', 'link'), when='+vtk7') + depends_on('vtk@9.3:', type=('build', 'link'), when='~vtk7') # depends_on('mpi', type=('build', 'link')) # for undefined reference in util-linux/libmount to intl_.... @@ -56,6 +57,7 @@ class Vtkcontrib(CMakePackage): depends_on("cxx", type="build") # generated variant('shared', default=True, description='Creation de bibliotheques dynamiques (defaut:shared, annuler le defaut par ~shared)') + variant('vtk7', default=True, description='Uses VTK v 7.1.1 and its OpenGL 1 backend. In its absence uses VTK 9.3 and its OpenGL 2 backend (does not pass through the GLX channel of ssh).') def cmake_args(self): # Since version 5.4.0 VtkContrib uses common_vtk.cmake of GUIToolkitsVariables which @@ -63,8 +65,4 @@ def cmake_args(self): args = [] args.append(self.define_from_variant('BUILD_SHARED_LIBS', 'shared')) - # if OFF does vtkcontrib uses OPENGL2 ? - # see VTK_OPENGL_BACKEND in src/VtkContrib/CMakeLists.txt - args.append('-DUSE_OPENGL_BACKEND:BOOL=ON') - return args