diff options
author | iarspider <iarspider@gmail.com> | 2021-02-16 16:57:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 16:57:02 +0100 |
commit | d2a0235d4b9f31a5af9f407ab2c2d1ee4c1a6e48 (patch) | |
tree | bd35783feef3ee53bf672e6bcd6e8187f11d1fec | |
parent | c0490ab30ff5ac875c9adcae5f6b1b43665f8a48 (diff) | |
download | spack-d2a0235d4b9f31a5af9f407ab2c2d1ee4c1a6e48.tar.gz spack-d2a0235d4b9f31a5af9f407ab2c2d1ee4c1a6e48.tar.bz2 spack-d2a0235d4b9f31a5af9f407ab2c2d1ee4c1a6e48.tar.xz spack-d2a0235d4b9f31a5af9f407ab2c2d1ee4c1a6e48.zip |
gruff: add support for external detection (#21646)
-rw-r--r-- | var/spack/repos/builtin/packages/groff/package.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/groff/package.py b/var/spack/repos/builtin/packages/groff/package.py index 450c4794c0..63c8bf1c4f 100644 --- a/var/spack/repos/builtin/packages/groff/package.py +++ b/var/spack/repos/builtin/packages/groff/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import re class Groff(AutotoolsPackage, GNUMirrorPackage): @@ -40,6 +41,14 @@ class Groff(AutotoolsPackage, GNUMirrorPackage): patch('BuildFoundries.patch') patch('pdfmom.patch') + executables = ['^groff$'] + + @classmethod + def determine_version(cls, exe): + output = Executable(exe)('--version', output=str, error=str) + match = re.search(r'GNU groff version\s+(\S+)', output) + return match.group(1) if match else None + def configure_args(self): args = [ "--without-x" |