diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libtool/package.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index decc4b114e..60a922c881 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -3,7 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from spack import * +import os +import re class Libtool(AutotoolsPackage, GNUMirrorPackage): @@ -30,6 +31,14 @@ class Libtool(AutotoolsPackage, GNUMirrorPackage): build_directory = 'spack-build' + executables = ['^g?libtool(ize)?$'] + + @classmethod + def determine_version(cls, exe): + output = Executable(exe)('--version', output=str, error=os.devnull) + match = re.search(r'\(GNU libtool\)\s+(\S+)', output) + return match.group(1) if match else None + @when('@2.4.2,develop') def autoreconf(self, spec, prefix): Executable('./bootstrap')() |