summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/zlib-ng/package.py
blob: ad7d782874b708d0c8478d2df2a283a3b4583fc5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class ZlibNg(CMakePackage):
    """zlib replacement with optimizations for next generation systems."""

    homepage = "https://github.com/zlib-ng/zlib-ng"
    url      = "https://github.com/zlib-ng/zlib-ng/archive/2.0.0.tar.gz"

    version('2.0.0', sha256='86993903527d9b12fc543335c19c1d33a93797b3d4d37648b5addae83679ecd8')

    variant('compat', default=False, description='Enable compatibility API')
    variant('opt', default=True, description='Enable optimizations')

    depends_on('cmake@3.5.1:', type='build')

    def cmake_args(self):
        args = [
            self.define_from_variant('ZLIB_COMPAT', 'compat'),
            self.define_from_variant('WITH_OPTIM', 'opt'),
        ]

        return args