From bed3a694985466544aa16a19af0f0a13221b51a9 Mon Sep 17 00:00:00 2001 From: Daniele Cesarini Date: Tue, 25 Jan 2022 13:08:29 +0100 Subject: mosquitto, cjson: added new packages (#28550) Co-authored-by: Massimiliano Culpo --- var/spack/repos/builtin/packages/cjson/package.py | 16 ++++++++ .../repos/builtin/packages/mosquitto/package.py | 43 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cjson/package.py create mode 100644 var/spack/repos/builtin/packages/mosquitto/package.py (limited to 'var') 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 -- cgit v1.2.3-70-g09d2