gruff: add support for external detection (#21646)
This commit is contained in:
parent
c0490ab30f
commit
d2a0235d4b
1 changed files with 9 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue