texinfo: Adding external support (#18362)
* texinfo: Adding external support for texinfo. * Adding re package.
This commit is contained in:
parent
65fda72d7c
commit
c9fd2983dc
@ -5,6 +5,7 @@
|
||||
|
||||
|
||||
from spack import *
|
||||
import re
|
||||
|
||||
|
||||
class Texinfo(AutotoolsPackage, GNUMirrorPackage):
|
||||
@ -17,6 +18,8 @@ class Texinfo(AutotoolsPackage, GNUMirrorPackage):
|
||||
homepage = "https://www.gnu.org/software/texinfo/"
|
||||
gnu_mirror_path = "texinfo/texinfo-6.0.tar.gz"
|
||||
|
||||
executables = ['^info$']
|
||||
|
||||
version('6.5', sha256='d34272e4042c46186ddcd66bd5d980c0ca14ff734444686ccf8131f6ec8b1427')
|
||||
version('6.3', sha256='300a6ba4958c2dd4a6d5ce60f0a335daf7e379f5374f276f6ba31a221f02f606')
|
||||
version('6.0', sha256='83d3183290f34e7f958d209d0b20022c6fe9e921eb6fe94c27d988827d4878d2')
|
||||
@ -36,3 +39,9 @@ class Texinfo(AutotoolsPackage, GNUMirrorPackage):
|
||||
# that uses the global locale.
|
||||
# Ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902771
|
||||
patch('update_locale_handling.patch', when='@6.3:')
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, exe):
|
||||
output = Executable(exe)('--version', output=str, error=str)
|
||||
match = re.search(r'info \(GNU texinfo\)\s+(\S+)', output)
|
||||
return match.group(1) if match else None
|
||||
|
Loading…
Reference in New Issue
Block a user