summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorRobert Blake <blake14@llnl.gov>2020-08-28 14:21:51 -0700
committerGitHub <noreply@github.com>2020-08-28 16:21:51 -0500
commitc9fd2983dc41367b042eb9f64e533604e9adcade (patch)
treefd10c0aaaab4488516c63577fb9a5bde3abc61e9 /var
parent65fda72d7c8bf6107ebf4828338b45fbe3a6181e (diff)
downloadspack-c9fd2983dc41367b042eb9f64e533604e9adcade.tar.gz
spack-c9fd2983dc41367b042eb9f64e533604e9adcade.tar.bz2
spack-c9fd2983dc41367b042eb9f64e533604e9adcade.tar.xz
spack-c9fd2983dc41367b042eb9f64e533604e9adcade.zip
texinfo: Adding external support (#18362)
* texinfo: Adding external support for texinfo. * Adding re package.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/texinfo/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/texinfo/package.py b/var/spack/repos/builtin/packages/texinfo/package.py
index 77af84703f..596996df27 100644
--- a/var/spack/repos/builtin/packages/texinfo/package.py
+++ b/var/spack/repos/builtin/packages/texinfo/package.py
@@ -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