diff options
author | Chris Green <greenc@fnal.gov> | 2023-05-15 10:16:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 10:16:11 -0500 |
commit | b8c5099cdece67a3e6219b6aa357fbfbc878f5d1 (patch) | |
tree | 4d284db080ff5444077c8fb4a81a4f04b76da749 /var | |
parent | ea5bca90675fc30ef221a7251175a7987013d7f1 (diff) | |
download | spack-b8c5099cdece67a3e6219b6aa357fbfbc878f5d1.tar.gz spack-b8c5099cdece67a3e6219b6aa357fbfbc878f5d1.tar.bz2 spack-b8c5099cdece67a3e6219b6aa357fbfbc878f5d1.tar.xz spack-b8c5099cdece67a3e6219b6aa357fbfbc878f5d1.zip |
[jwt-cpp] New package (#37641)
* [jwt-cpp] New package
* Update homepage
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
* [@spackbot] updating style on behalf of greenc-FNAL
---------
Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
Co-authored-by: greenc-FNAL <greenc-FNAL@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/jwt-cpp/package.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/jwt-cpp/package.py b/var/spack/repos/builtin/packages/jwt-cpp/package.py new file mode 100644 index 0000000000..42175687e6 --- /dev/null +++ b/var/spack/repos/builtin/packages/jwt-cpp/package.py @@ -0,0 +1,49 @@ +# Copyright 2013-2023 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 JwtCpp(CMakePackage): + """A header only library for creating and validating JSON Web Tokens in C++11.""" + + homepage = "https://thalhammer.github.io/jwt-cpp/" + url = "https://github.com/Thalhammer/jwt-cpp/archive/refs/tags/v0.4.0.tar.gz" + + maintainers("gartung", "greenc-FNAL", "marcmengel", "vitodb") + + version("0.6.0", sha256="0227bd6e0356b211341075c7997c837f0b388c01379bd256aa525566a5553f03") + version("0.5.2", sha256="d3188f9611597eb1bb285169879e1d87202bf10a08e4e7734c9f2097bfd4a850") + version("0.5.1", sha256="d8f5ffb361824630b3b6f4aad26c730c915081071040c232ac57947d6177ef4f") + version("0.5.0", sha256="079a273f070dd11213e301712319a65881e51ab81535cc436d5313191df852a2") + version("0.4.0", sha256="f0dcc7b0e8bef8f9c3f434e7121f9941145042c9fe3055a5bdd709085a4f2be4") + + # TODO: jwt-cpp>=0.6.0 supports wolfSSL for which there is currently + # no Spack recipe. + variant( + "ssl", + default="openssl", + values=("openssl", "libressl"), + multi=False, + when="@0.5.0:", + description="SSL library to use", + ) + + depends_on("openssl@1.0.2:", when="@0.4.0:0.4.99") + depends_on("openssl@1.0.2:", when="@0.5.0:0.5.99 ssl=openssl") + depends_on("openssl@1.0.1:", when="@0.6.0: ssl=openssl") + depends_on("libressl@3:", when="@0.5.0: ssl=libressl") + + def cmake_args(self): + spec = self.spec + define = self.define + args = [] + if spec.satisfies("@0.5.0:"): + ssl_library_dict = {"openssl": "OpenSSL", "libressl": "LibreSSL"} + args.append(define("JWT_SSL_LIBRARY", ssl_library_dict[spec.variants["ssl"].value])) + args += [define("JWT_BUILD_TESTS", False), define("JWT_BUILD_EXAMPLES", False)] + else: + args.append(define("BUILD_TESTS", False)) + return args |