mosquitto, cjson: added new packages (#28550)

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Daniele Cesarini 2022-01-25 13:08:29 +01:00 committed by GitHub
parent b36920283d
commit bed3a69498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 59 additions and 0 deletions

View File

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

View File

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