summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2021-05-03 15:18:36 +0200
committerGitHub <noreply@github.com>2021-05-03 13:18:36 +0000
commit60f38291c25a3f1dc44649848c57a9da5e853c5b (patch)
tree0cec0be5dc87810ef2bed0b1c82131808e748cf8 /var
parentc39b53ffb35a30afe61603db8c73971df2b131c1 (diff)
downloadspack-60f38291c25a3f1dc44649848c57a9da5e853c5b.tar.gz
spack-60f38291c25a3f1dc44649848c57a9da5e853c5b.tar.bz2
spack-60f38291c25a3f1dc44649848c57a9da5e853c5b.tar.xz
spack-60f38291c25a3f1dc44649848c57a9da5e853c5b.zip
ccache: add v4.2.1 and earlier, zstd support (#23039)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ccache/package.py32
1 files changed, 26 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/ccache/package.py b/var/spack/repos/builtin/packages/ccache/package.py
index 027a88053c..13c2b62bea 100644
--- a/var/spack/repos/builtin/packages/ccache/package.py
+++ b/var/spack/repos/builtin/packages/ccache/package.py
@@ -7,16 +7,20 @@ from spack import *
import re
-class Ccache(AutotoolsPackage):
+class Ccache(CMakePackage):
"""ccache is a compiler cache. It speeds up recompilation by caching
previous compilations and detecting when the same compilation is being done
again."""
- homepage = "https://ccache.samba.org/"
- url = "https://github.com/ccache/ccache/releases/download/v3.7.9/ccache-3.7.9.tar.gz"
+ homepage = "https://ccache.dev/"
+ url = "https://github.com/ccache/ccache/releases/download/v4.2.1/ccache-4.2.1.tar.gz"
executables = ['^ccache$']
+ version('4.2.1', sha256='320d2b17d2f76393e5d4bb28c8dee5ca783248e9cd23dff0654694d60f8a4b62')
+ version('4.2', sha256='dbf139ff32031b54cb47f2d7983269f328df14b5a427882f89f7721e5c411b7e')
+ version('4.1', sha256='cdeefb827b3eef3b42b5454858123881a4a90abbd46cc72cf8c20b3bd039deb7')
+ version('4.0', sha256='ac97af86679028ebc8555c99318352588ff50f515fc3a7f8ed21a8ad367e3d45')
version('3.7.11', sha256='34309a59d4b6b6b33756366aa9d3144a4655587be9f914476b4c0e2d36365f01')
version('3.7.9', sha256='92838e2133c9e704fdab9ee2608dad86c99021278b9ac47d065aa8ff2ea8ce36')
version('3.7.1', sha256='e562fcdbe766406b6fe4bf97ce5c001d2be8a17465f33bcddefc9499bbb057d8')
@@ -27,9 +31,25 @@ class Ccache(AutotoolsPackage):
version('3.3', sha256='b220fce435fe3d86b8b90097e986a17f6c1f971e0841283dd816adb238c5fd6a')
version('3.2.9', sha256='1e13961b83a3d215c4013469c149414a79312a22d3c7bf9f946abac9ee33e63f')
- depends_on('gperf')
- depends_on('libxslt')
- depends_on('zlib')
+ depends_on('zstd', when='@4.0:')
+
+ depends_on('gperf', when='@:3.99')
+ depends_on('libxslt', when='@:3.99')
+ depends_on('zlib', when='@:3.99')
+
+ # Before 4.0 this was an Autotools package
+ @when('@:3.99')
+ def cmake(self, spec, prefix):
+ configure_args = ["--prefix=" + prefix]
+ configure(*configure_args)
+
+ @when('@:3.99')
+ def build(self, spec, prefix):
+ make()
+
+ @when('@:3.99')
+ def install(self, spec, prefix):
+ make("install")
@classmethod
def determine_version(cls, exe):