libssh2: add new versions and crypto=mbedtls|openssl (#27284)
This commit is contained in:
parent
81a0f7222c
commit
0322431c5c
@ -12,20 +12,38 @@ class Libssh2(CMakePackage):
|
|||||||
homepage = "https://www.libssh2.org/"
|
homepage = "https://www.libssh2.org/"
|
||||||
url = "https://www.libssh2.org/download/libssh2-1.7.0.tar.gz"
|
url = "https://www.libssh2.org/download/libssh2-1.7.0.tar.gz"
|
||||||
|
|
||||||
|
version('1.10.0', sha256='2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51')
|
||||||
|
version('1.9.0', sha256='d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd')
|
||||||
version('1.8.0', sha256='39f34e2f6835f4b992cafe8625073a88e5a28ba78f83e8099610a7b3af4676d4')
|
version('1.8.0', sha256='39f34e2f6835f4b992cafe8625073a88e5a28ba78f83e8099610a7b3af4676d4')
|
||||||
version('1.7.0', sha256='e4561fd43a50539a8c2ceb37841691baf03ecb7daf043766da1b112e4280d584')
|
version('1.7.0', sha256='e4561fd43a50539a8c2ceb37841691baf03ecb7daf043766da1b112e4280d584')
|
||||||
version('1.4.3', sha256='eac6f85f9df9db2e6386906a6227eb2cd7b3245739561cad7d6dc1d5d021b96d') # CentOS7
|
version('1.4.3', sha256='eac6f85f9df9db2e6386906a6227eb2cd7b3245739561cad7d6dc1d5d021b96d') # CentOS7
|
||||||
|
|
||||||
variant('shared', default=True,
|
variant('crypto', default='openssl', values=('openssl', 'mbedtls'), multi=False)
|
||||||
description="Build shared libraries")
|
variant('shared', default=True, description="Build shared libraries")
|
||||||
|
|
||||||
|
conflicts('crypto=mbedtls', when='@:1.7', msg='mbedtls only available from 1.8.0')
|
||||||
|
|
||||||
depends_on('cmake@2.8.11:', type='build')
|
depends_on('cmake@2.8.11:', type='build')
|
||||||
depends_on('openssl')
|
depends_on('openssl', when='crypto=openssl')
|
||||||
|
depends_on('openssl@:2', when='@:1.9 crypto=openssl')
|
||||||
|
depends_on('mbedtls@:2 +pic', when='crypto=mbedtls')
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
depends_on('xz')
|
depends_on('xz')
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
return [self.define_from_variant('BUILD_SHARED_LIBS', 'shared')]
|
args = [
|
||||||
|
self.define('BUILD_TESTING', 'OFF'),
|
||||||
|
self.define_from_variant('BUILD_SHARED_LIBS', 'shared')
|
||||||
|
]
|
||||||
|
|
||||||
|
crypto = self.spec.variants['crypto'].value
|
||||||
|
|
||||||
|
if crypto == 'openssl':
|
||||||
|
args.append(self.define('CRYPTO_BACKEND', 'OpenSSL'))
|
||||||
|
elif crypto == 'mbedtls':
|
||||||
|
args.append(self.define('CRYPTO_BACKEND', 'mbedTLS'))
|
||||||
|
|
||||||
|
return args
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
def darwin_fix(self):
|
def darwin_fix(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user