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)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
class Groff(AutotoolsPackage, GNUMirrorPackage):
|
class Groff(AutotoolsPackage, GNUMirrorPackage):
|
||||||
|
@ -40,6 +41,14 @@ class Groff(AutotoolsPackage, GNUMirrorPackage):
|
||||||
patch('BuildFoundries.patch')
|
patch('BuildFoundries.patch')
|
||||||
patch('pdfmom.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):
|
def configure_args(self):
|
||||||
args = [
|
args = [
|
||||||
"--without-x"
|
"--without-x"
|
||||||
|
|
Loading…
Reference in a new issue