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>
This commit is contained in:
Axel Huebl 2022-08-18 01:49:53 -07:00 committed by GitHub
parent a164b0b3e6
commit 5a59e1b77a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -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")

View file

@ -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)