diff options
-rw-r--r-- | var/spack/repos/builtin/packages/grep/package.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/grep/package.py b/var/spack/repos/builtin/packages/grep/package.py index 03d3f923f5..50a7707c1a 100644 --- a/var/spack/repos/builtin/packages/grep/package.py +++ b/var/spack/repos/builtin/packages/grep/package.py @@ -15,4 +15,18 @@ class Grep(AutotoolsPackage): version('3.7', sha256='5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c') version('3.3', sha256='b960541c499619efd6afe1fa795402e4733c8e11ebf9fafccc0bb4bccdc5b514') + variant('pcre', default=False, description='Enable Perl Compatible Regular Expression support') + build_directory = 'spack-build' + + depends_on('pcre', when='+pcre') + + def configure_args(self): + args = [] + + if '+pcre' in self.spec: + args.append('--enable-perl-regexp') + else: + args.append('--disable-perl-regexp') + + return args |