zlib-ng: add variant new_strategies (#43219)

This commit is contained in:
Sergey Kosukhin 2024-03-18 09:42:43 +01:00 committed by GitHub
parent a7dd756b34
commit 8cd160db85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -36,6 +36,7 @@ class ZlibNg(AutotoolsPackage, CMakePackage):
variant("compat", default=True, description="Enable compatibility API")
variant("opt", default=True, description="Enable optimizations")
variant("new_strategies", default=True, description="Enable new deflate strategies")
provides("zlib-api", when="+compat")
@ -67,6 +68,8 @@ def configure_args(self):
args.append("--zlib-compat")
if self.spec.satisfies("~opt"):
args.append("--without-optimizations")
if self.spec.satisfies("~new_strategies"):
args.append("--without-new-strategies")
return args
@ -75,4 +78,5 @@ def cmake_args(self):
return [
self.define_from_variant("ZLIB_COMPAT", "compat"),
self.define_from_variant("WITH_OPTIM", "opt"),
self.define_from_variant("WITH_NEW_STRATEGIES", "new_strategies"),
]