summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2022-08-18 01:49:53 -0700
committerGitHub <noreply@github.com>2022-08-18 08:49:53 +0000
commit5a59e1b77a17d0f84fd04d5357a2494c64a34ece (patch)
tree9631b559ab1cc6df351908901709ccf8f0962725
parenta164b0b3e6852c6fc43c70dab7ab25f2bb291fab (diff)
downloadspack-5a59e1b77a17d0f84fd04d5357a2494c64a34ece.tar.gz
spack-5a59e1b77a17d0f84fd04d5357a2494c64a34ece.tar.bz2
spack-5a59e1b77a17d0f84fd04d5357a2494c64a34ece.tar.xz
spack-5a59e1b77a17d0f84fd04d5357a2494c64a34ece.zip
hiredis: set install_name on macos, ccache: optional hiredis (#32219)
* hiredis: set install_name on macos * ccache: make hiredis optional Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/ccache/package.py12
-rw-r--r--var/spack/repos/builtin/packages/hiredis/package.py5
2 files changed, 15 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/ccache/package.py b/var/spack/repos/builtin/packages/ccache/package.py
index 58d1cfc4c0..faeb0eabbc 100644
--- a/var/spack/repos/builtin/packages/ccache/package.py
+++ b/var/spack/repos/builtin/packages/ccache/package.py
@@ -43,6 +43,8 @@ class Ccache(CMakePackage):
version("3.3", sha256="b220fce435fe3d86b8b90097e986a17f6c1f971e0841283dd816adb238c5fd6a")
version("3.2.9", sha256="1e13961b83a3d215c4013469c149414a79312a22d3c7bf9f946abac9ee33e63f")
+ variant("redis", default=True, description="Enable Redis secondary storage")
+
depends_on("cmake@3.15:", when="@4.7:", type="build")
depends_on("cmake@3.10:", when="@4.4:", type="build")
depends_on("cmake@3.4.3:", when="@4.0:", type="build")
@@ -53,14 +55,20 @@ class Ccache(CMakePackage):
depends_on("zstd", when="@4.0:")
- depends_on("hiredis@0.13.3:", when="@4.4:")
+ depends_on("hiredis@0.13.3:", when="@4.4: +redis")
depends_on("pkgconfig", type="build", when="@4.4:")
conflicts("%gcc@:5", when="@4.4:")
conflicts("%clang@:4", when="@4.4:")
def cmake_args(self):
- return [self.define("ENABLE_TESTING", False)]
+ return [
+ self.define("ENABLE_TESTING", False),
+ self.define("ENABLE_DOCUMENTATION", False),
+ self.define_from_variant("REDIS_STORAGE_BACKEND", "redis"),
+ self.define("ZSTD_FROM_INTERNET", False),
+ self.define("HIREDIS_FROM_INTERNET", False),
+ ]
# Before 4.0 this was an Autotools package
@when("@:3")
diff --git a/var/spack/repos/builtin/packages/hiredis/package.py b/var/spack/repos/builtin/packages/hiredis/package.py
index 1e5bc12d03..ed0dfe4aea 100644
--- a/var/spack/repos/builtin/packages/hiredis/package.py
+++ b/var/spack/repos/builtin/packages/hiredis/package.py
@@ -19,3 +19,8 @@ class Hiredis(MakefilePackage):
def install(self, spec, prefix):
make("PREFIX={0}".format(prefix), "install")
+
+ @run_after("install")
+ def darwin_fix(self):
+ if self.spec.satisfies("platform=darwin"):
+ fix_darwin_install_name(self.prefix.lib)