summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/zlib-ng/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/zlib-ng/package.py')
-rw-r--r--var/spack/repos/builtin/packages/zlib-ng/package.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/zlib-ng/package.py b/var/spack/repos/builtin/packages/zlib-ng/package.py
index a15dbdb086..a5615574ec 100644
--- a/var/spack/repos/builtin/packages/zlib-ng/package.py
+++ b/var/spack/repos/builtin/packages/zlib-ng/package.py
@@ -13,6 +13,7 @@ class ZlibNg(AutotoolsPackage, CMakePackage):
homepage = "https://github.com/zlib-ng/zlib-ng"
url = "https://github.com/zlib-ng/zlib-ng/archive/2.0.0.tar.gz"
+ version("2.1.3", sha256="d20e55f89d71991c59f1c5ad1ef944815e5850526c0d9cd8e504eaed5b24491a")
version("2.1.2", sha256="383560d6b00697c04e8878e26c0187b480971a8bce90ffd26a5a7b0f7ecf1a33")
version("2.0.7", sha256="6c0853bb27738b811f2b4d4af095323c3d5ce36ceed6b50e5f773204fb8f7200")
version("2.0.0", sha256="86993903527d9b12fc543335c19c1d33a93797b3d4d37648b5addae83679ecd8")
@@ -20,14 +21,24 @@ class ZlibNg(AutotoolsPackage, CMakePackage):
variant("compat", default=True, description="Enable compatibility API")
variant("opt", default=True, description="Enable optimizations")
+ provides("zlib-api", when="+compat")
+
# Default to autotools, since cmake would result in circular dependencies if it's not
# reused.
build_system("autotools", "cmake", default="autotools")
+ # rpath shenanigans, see https://github.com/zlib-ng/zlib-ng/pull/1546
+ patch("pr-1546.patch", when="@2.1.3 platform=darwin")
+
with when("build_system=cmake"):
depends_on("cmake@3.5.1:", type="build")
depends_on("cmake@3.14.0:", type="build", when="@2.1.0:")
+ @property
+ def libs(self):
+ name = "libz" if self.spec.satisfies("+compat") else "libz-ng"
+ return find_libraries(name, root=self.prefix, recursive=True, shared=True)
+
class AutotoolsBuilder(autotools.AutotoolsBuilder):
def configure_args(self):