From def42f156d8bd914fa4e291ecc5e89cbc4f71aea Mon Sep 17 00:00:00 2001 From: healther Date: Fri, 3 Mar 2017 15:06:25 +0100 Subject: [PATCH] add flex variant to cscope (#3252) * add flex variant to cscope * fixed dependency * fixed typo --- var/spack/repos/builtin/packages/cscope/package.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/cscope/package.py b/var/spack/repos/builtin/packages/cscope/package.py index 73017ffc57..1e39216367 100644 --- a/var/spack/repos/builtin/packages/cscope/package.py +++ b/var/spack/repos/builtin/packages/cscope/package.py @@ -33,5 +33,12 @@ class Cscope(AutotoolsPackage): version('15.8b', '8f9409a238ee313a96f9f87fe0f3b176') - # Can be configured to use flex (not necessary) - # ./configure --with-flex + variant('flex', default=False, description="Builds with flex") + + depends_on('flex', when='+flex') + + def configure_args(self): + args = [] + if '+flex' in self.spec: + args.append('--with-flex') + return args