summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2020-08-25 05:30:16 -0700
committerGitHub <noreply@github.com>2020-08-25 14:30:16 +0200
commit11a3ac25acc65355c6b600e5d1fa682da1a031af (patch)
tree01c6d1d699d18045cd0d2934d84349f8299a6649
parentb562154423c4cbfb073cf8eee140c38ac7990cb1 (diff)
downloadspack-11a3ac25acc65355c6b600e5d1fa682da1a031af.tar.gz
spack-11a3ac25acc65355c6b600e5d1fa682da1a031af.tar.bz2
spack-11a3ac25acc65355c6b600e5d1fa682da1a031af.tar.xz
spack-11a3ac25acc65355c6b600e5d1fa682da1a031af.zip
CCache: added v3.7.11 and support for external detection (#18246)
-rw-r--r--var/spack/repos/builtin/packages/ccache/package.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ccache/package.py b/var/spack/repos/builtin/packages/ccache/package.py
index 6bc53831a9..e4f9a52353 100644
--- a/var/spack/repos/builtin/packages/ccache/package.py
+++ b/var/spack/repos/builtin/packages/ccache/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import re
class Ccache(AutotoolsPackage):
@@ -14,6 +15,9 @@ class Ccache(AutotoolsPackage):
homepage = "https://ccache.samba.org/"
url = "https://github.com/ccache/ccache/releases/download/v3.7.9/ccache-3.7.9.tar.gz"
+ executables = ['^ccache$']
+
+ version('3.7.11', sha256='34309a59d4b6b6b33756366aa9d3144a4655587be9f914476b4c0e2d36365f01')
version('3.7.9', sha256='92838e2133c9e704fdab9ee2608dad86c99021278b9ac47d065aa8ff2ea8ce36')
version('3.7.1', sha256='e562fcdbe766406b6fe4bf97ce5c001d2be8a17465f33bcddefc9499bbb057d8')
version('3.3.4', sha256='1348b54e7c35dd2f8d17923389e03c546e599cfbde6459d2f31cf6f1521ec538')
@@ -26,3 +30,9 @@ class Ccache(AutotoolsPackage):
depends_on('gperf')
depends_on('libxslt')
depends_on('zlib')
+
+ @classmethod
+ def determine_version(cls, exe):
+ output = Executable(exe)('--version', output=str, error=str)
+ match = re.search(r'ccache.*version\s+(\S+)', output)
+ return match.group(1) if match else None