Libtool: add spack external find support (#16691)
* Libtool: add spack external find support * Less specific regex * match -> search * Clarify that min returns first alphabetically, not shortest * Simplify version determination
This commit is contained in:
parent
313511bf1d
commit
2f0fd44b97
1 changed files with 10 additions and 1 deletions
|
@ -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')()
|
||||
|
|
Loading…
Reference in a new issue