gruff: add support for external detection (#21646)

This commit is contained in:
iarspider 2021-02-16 16:57:02 +01:00 committed by GitHub
parent c0490ab30f
commit d2a0235d4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"