diff options
author | Daniele Cesarini <d.cesarini@cineca.it> | 2022-01-25 13:08:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-25 05:08:29 -0700 |
commit | bed3a694985466544aa16a19af0f0a13221b51a9 (patch) | |
tree | adbf71142db40267289f664732e3f4c6fa7cf9de | |
parent | b36920283d27ca0aaabf82f274f7bff5d4f904d0 (diff) | |
download | spack-bed3a694985466544aa16a19af0f0a13221b51a9.tar.gz spack-bed3a694985466544aa16a19af0f0a13221b51a9.tar.bz2 spack-bed3a694985466544aa16a19af0f0a13221b51a9.tar.xz spack-bed3a694985466544aa16a19af0f0a13221b51a9.zip |
mosquitto, cjson: added new packages (#28550)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
-rw-r--r-- | var/spack/repos/builtin/packages/cjson/package.py | 16 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/mosquitto/package.py | 43 |
2 files changed, 59 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cjson/package.py b/var/spack/repos/builtin/packages/cjson/package.py new file mode 100644 index 0000000000..c110268572 --- /dev/null +++ b/var/spack/repos/builtin/packages/cjson/package.py @@ -0,0 +1,16 @@ +# 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 import * + + +class Cjson(CMakePackage): + """Ultralightweight JSON parser in ANSI C.""" + + homepage = 'https://github.com/DaveGamble/cJSON' + git = 'https://github.com/DaveGamble/cJSON' + url = 'https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.15.zip' + + version('1.7.15', sha256='c55519316d940757ef93a779f1db1ca809dbf979c551861f339d35aaea1c907c') diff --git a/var/spack/repos/builtin/packages/mosquitto/package.py b/var/spack/repos/builtin/packages/mosquitto/package.py new file mode 100644 index 0000000000..da5aeca51b --- /dev/null +++ b/var/spack/repos/builtin/packages/mosquitto/package.py @@ -0,0 +1,43 @@ +# 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 import * + + +class Mosquitto(CMakePackage): + """Mosquitto is an open source implementation of a server + for version 5.0, 3.1.1, and 3.1 of the MQTT protocol.""" + + homepage = 'https://mosquitto.org' + git = 'https://github.com/eclipse/mosquitto' + url = 'https://mosquitto.org/files/source/mosquitto-2.0.14.tar.gz' + + version('2.0.14', sha256='d0dde8fdb12caf6e2426b4f28081919a2fce3448773bdb8af0d3cd5fe5776925') + version('1.6.15', sha256='5ff2271512f745bf1a451072cd3768a5daed71e90c5179fae12b049d6c02aa0f') + version('1.5.11', sha256='4a3b8a8f5505d27a7a966dd68bfd76f1e69feb51796d1b46b7271d1bb5a1a299') + version('1.4.15', sha256='7d3b3e245a3b4ec94b05678c8199c806359737949f4cfe0bf936184f6ca89a83') + version('1.3.5', sha256='16eb3dbef183827665feee9288362c7352cd016ba04ca0402a0ccf857d1c2ab2') + + variant('tls', default=True, description='Build with TLS support') + variant('cjson', default=True, description='Build with cJSON support', when='@2.0.0:') + variant('static', default=False, description='Build with static libraries', when='@1.5.0:') + variant('c-ares', default=False, description='Build with c-ares support', when='@1.4.0:') + variant('websocket', default=False, description='Build with websocket support', when='@1.4.0:') + + depends_on('openssl', when='+tls') + depends_on('cjson', when='+cjson') + depends_on('c-ares', when='+c-ares') + depends_on('libwebsockets', when='+websocket') + + def cmake_args(self): + args = [ + self.define('DOCUMENTATION', 'no'), + self.define_from_variant('WITH_CJSON', 'cjson'), + self.define_from_variant('WITH_TLS', 'tls'), + self.define_from_variant('WITH_STATIC_LIBRARIES', 'static'), + self.define_from_variant('WITH_SRV', 'c-ares'), + self.define_from_variant('WITH_WEBSOCKETS', 'websocket') + ] + return args |