summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-08-11 10:16:15 -0500
committerGitHub <noreply@github.com>2020-08-11 10:16:15 -0500
commit2f0fd44b97d00834f152e1a60168310ed5e646f7 (patch)
tree4e6c0e5a056d301c088e8732c93d7e80727d824b
parent313511bf1dfa302d22c9e3492d2ae1e003784230 (diff)
downloadspack-2f0fd44b97d00834f152e1a60168310ed5e646f7.tar.gz
spack-2f0fd44b97d00834f152e1a60168310ed5e646f7.tar.bz2
spack-2f0fd44b97d00834f152e1a60168310ed5e646f7.tar.xz
spack-2f0fd44b97d00834f152e1a60168310ed5e646f7.zip
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
-rw-r--r--var/spack/repos/builtin/packages/libtool/package.py11
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')()