diff options
author | Loïc Pottier <48072795+lpottier@users.noreply.github.com> | 2022-11-10 17:19:45 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 17:19:45 -0800 |
commit | c3e9aeeed0b756428b1495b720388f6438f78494 (patch) | |
tree | 3415b4bd3cae0efb40d6ff9b58a778e72f1ad20f /var | |
parent | 277234c0446bae856be2e551d11a12c8278bd4e9 (diff) | |
download | spack-c3e9aeeed0b756428b1495b720388f6438f78494.tar.gz spack-c3e9aeeed0b756428b1495b720388f6438f78494.tar.bz2 spack-c3e9aeeed0b756428b1495b720388f6438f78494.tar.xz spack-c3e9aeeed0b756428b1495b720388f6438f78494.zip |
redis-plus-plus: added initial support (#33803)
* redis-plus-plus: added initial support
* redis-plus-plus: use cmake arg provided by Spack
* redis-plus-plus: oups tiny typo
Signed-off-by: Loïc Pottier <pottier1@llnl.gov>
Signed-off-by: Loïc Pottier <lpottier@arnor>
Co-authored-by: Loïc Pottier <lpottier@arnor>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/redis-plus-plus/package.py | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/redis-plus-plus/package.py b/var/spack/repos/builtin/packages/redis-plus-plus/package.py new file mode 100644 index 0000000000..dacb047aa3 --- /dev/null +++ b/var/spack/repos/builtin/packages/redis-plus-plus/package.py @@ -0,0 +1,54 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class RedisPlusPlus(CMakePackage): + """Redis-plus-plus is a C++ client library for Redis and + is based on hiredis, and is compatible with C++ 17, C++ 14, + and C++ 11.""" + + homepage = "https://github.com/sewenew/redis-plus-plus" + url = "https://github.com/sewenew/redis-plus-plus/archive/refs/tags/1.3.6.tar.gz" + + maintainers = ["lpottier"] + + variant( + "cxxstd", + values=("11", "14", "17"), + default="14", + description="C++ standard used", + ) + variant("shared", default=True, description="Enables the build of a shared library") + variant("static", default=True, description="Enables the build of a static library") + variant( + "fpic", + default=True, + description="Use Position Independent Code (-fPIC) to build the static library", + ) + variant("test", default=False, description="Builds test suite") + + version("1.3.6", sha256="87dcadca50c6f0403cde47eb1f79af7ac8dd5a19c3cad2bb54ba5a34f9173a3e") + version("1.3.5", sha256="a49a72fef26ed39d36a278fcc4e4d92822e111697b5992d8f26f70d16edc6c1f") + version("1.3.4", sha256="b9f2b3e0f084fe9a7360e44a9ae28aa42067fbaf027734989c778865c2d5dca5") + + depends_on("cmake@3.18:", type="build") + depends_on("hiredis@0.14.1:", type=("build", "run", "link")) + + def cmake_args(self): + + cxxstd = self.spec.variants["cxxstd"].value + use_fpic = ("+static" in self.spec) and ("+fpic" in self.spec) + + args = [ + self.define("REDIS_PLUS_PLUS_CXX_STANDARD", cxxstd), + self.define_from_variant("REDIS_PLUS_PLUS_BUILD_TEST", "test"), + self.define_from_variant("REDIS_PLUS_PLUS_BUILD_STATIC", "static"), + self.define_from_variant("REDIS_PLUS_PLUS_BUILD_SHARED", "shared"), + self.define("REDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC", use_fpic), + ] + + return args |