summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/gdb/package.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py
index a14e166ed4..f90e4e7ff0 100644
--- a/var/spack/repos/builtin/packages/gdb/package.py
+++ b/var/spack/repos/builtin/packages/gdb/package.py
@@ -41,9 +41,18 @@ class Gdb(Package):
version('7.9', '8f8ced422fe462a00e0135a643544f17')
version('7.8.2', '8b0ea8b3559d3d90b3ff4952f0aeafbc')
+ variant('python', default=True, description='Compile with Python support')
+
+ # Required dependency
depends_on('texinfo', type='build')
+ # Optional dependency
+ depends_on('python', when='+python')
+
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix)
+ options = ['--prefix=%s' % prefix]
+ if '+python' in spec:
+ options.extend(['--with-python'])
+ configure(*options)
make()
make("install")