Skip to content

Commit

Permalink
gruff: add support for external detection (spack#21646)
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Feb 16, 2021
1 parent c0490ab commit d2a0235
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions var/spack/repos/builtin/packages/groff/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
import re


class Groff(AutotoolsPackage, GNUMirrorPackage):
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit d2a0235

Please sign in to comment.