summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/petsc/package.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 8be5d8cce5..3d13887fa8 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -80,6 +80,9 @@ class Petsc(Package):
variant('suite-sparse', default=False,
description='Activates support for SuiteSparse')
+ variant('X', default=False,
+ description='Activate X support')
+
# 3.8.0 has a build issue with MKL - so list this conflict explicitly
conflicts('^intel-mkl', when='@3.8.0')
@@ -146,6 +149,7 @@ class Petsc(Package):
depends_on('trilinos@xsdk-0.2.0', when='@xsdk-0.2.0+trilinos+mpi')
depends_on('trilinos@develop', when='@xdevelop+trilinos+mpi')
depends_on('suite-sparse', when='+suite-sparse')
+ depends_on('libx11', when='+X')
def mpi_dependent_options(self):
if '~mpi' in self.spec:
@@ -183,7 +187,6 @@ class Petsc(Package):
def install(self, spec, prefix):
options = ['--with-ssl=0',
- '--with-x=0',
'--download-c2html=0',
'--download-sowing=0',
'--download-hwloc=0',
@@ -210,6 +213,11 @@ class Petsc(Package):
'--with-blas-lapack-lib=%s' % lapack_blas.joined()
])
+ if '+X' in spec:
+ options.append('--with-x=1')
+ else:
+ options.append('--with-x=0')
+
if 'trilinos' in spec:
options.append('--with-cxx-dialect=C++11')
if spec.satisfies('^trilinos+boost'):