Skip to content

Commit

Permalink
(#24497) zlib-ng: add version 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
toge authored Jul 3, 2024
1 parent d69beba commit e718b4e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions recipes/zlib-ng/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.2.1":
url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.2.1.tar.gz"
sha256: "ec6a76169d4214e2e8b737e0850ba4acb806c69eeace6240ed4481b9f5c57cdf"
"2.1.7":
url: "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.7.tar.gz"
sha256: "59e68f67cbb16999842daeb517cdd86fc25b177b4affd335cd72b76ddc2a46d8"
Expand Down
6 changes: 6 additions & 0 deletions recipes/zlib-ng/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ZlibNgConan(ConanFile):
"with_new_strategies": [True, False],
"with_native_instructions": [True, False],
"with_reduced_mem": [True, False],
"with_runtime_cpu_detection": [True, False],
}
default_options = {
"shared": False,
Expand All @@ -38,13 +39,16 @@ class ZlibNgConan(ConanFile):
"with_new_strategies": True,
"with_native_instructions": False,
"with_reduced_mem": False,
"with_runtime_cpu_detection": True,
}

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
if Version(self.version) < "2.1.0":
del self.options.with_reduced_mem
if Version(self.version) < "2.2.1":
del self.options.with_runtime_cpu_detection

def configure(self):
if self.options.shared:
Expand Down Expand Up @@ -76,6 +80,8 @@ def generate(self):
tc.variables["WITH_NATIVE_INSTRUCTIONS"] = self.options.with_native_instructions
if Version(self.version) >= "2.1.0":
tc.variables["WITH_REDUCED_MEM"] = self.options.with_reduced_mem
if Version(self.version) >= "2.2.1":
tc.variables["WITH_RUNTIME_CPU_DETECTION"] = self.options.with_runtime_cpu_detection
tc.generate()

def build(self):
Expand Down
2 changes: 2 additions & 0 deletions recipes/zlib-ng/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.2.1":
folder: all
"2.1.7":
folder: all
"2.1.6":
Expand Down

0 comments on commit e718b4e

Please sign in to comment.