Add libdeflate as variant for htslib (#24141)

This commit is contained in:
Nicholas Knoblauch 2022-01-15 09:07:45 -08:00 committed by GitHub
parent ebdf1cb73e
commit a5c0a4dca4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,11 +30,15 @@ class Htslib(AutotoolsPackage):
default=True,
description='Enable libcurl-based support for http/https/etc URLs,'
' for versions >= 1.3. This also enables S3 and GCS support.')
variant('libdeflate',
default=True,
description='use libdeflate for faster crc and deflate algorithms')
depends_on('zlib')
depends_on('bzip2', when='@1.4:')
depends_on('xz', when='@1.4:')
depends_on('curl', when='@1.3:+libcurl')
depends_on('libdeflate', when='@1.8:+libdeflate')
depends_on('m4', when="@1.2")
depends_on('autoconf', when="@1.2")
@ -57,4 +61,7 @@ def configure_args(self):
if spec.satisfies('@1.3:'):
args.extend(self.enable_or_disable('libcurl'))
if spec.satisfies('@1.8:'):
args.extend(self.enable_or_disable('libdeflate'))
return args