openssl: added detection capabilities (#16653)
This commit is contained in:
parent
07422f95de
commit
30dc0baa34
@ -9,6 +9,7 @@
|
|||||||
import spack.architecture
|
import spack.architecture
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
class Openssl(Package): # Uses Fake Autotools, should subclass Package
|
class Openssl(Package): # Uses Fake Autotools, should subclass Package
|
||||||
@ -23,6 +24,8 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
|
|||||||
list_url = "http://www.openssl.org/source/old/"
|
list_url = "http://www.openssl.org/source/old/"
|
||||||
list_depth = 1
|
list_depth = 1
|
||||||
|
|
||||||
|
executables = ['openssl']
|
||||||
|
|
||||||
# The latest stable version is the 1.1.1 series. This is also our Long Term
|
# The latest stable version is the 1.1.1 series. This is also our Long Term
|
||||||
# Support (LTS) version, supported until 11th September 2023.
|
# Support (LTS) version, supported until 11th September 2023.
|
||||||
version('1.1.1g', sha256='ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46')
|
version('1.1.1g', sha256='ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46')
|
||||||
@ -77,6 +80,12 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package
|
|||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def determine_version(cls, exe):
|
||||||
|
output = Executable(exe)('version', output=str)
|
||||||
|
match = re.search(r'OpenSSL.(\S+)*', output)
|
||||||
|
return match.group(1) if match else None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def libs(self):
|
def libs(self):
|
||||||
return find_libraries(['libssl', 'libcrypto'], root=self.prefix.lib)
|
return find_libraries(['libssl', 'libcrypto'], root=self.prefix.lib)
|
||||||
|
Loading…
Reference in New Issue
Block a user