summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/libreproc/package.py
blob: d39eada31502794988f012e73a8f91c208be889a (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
29
30
# Copyright 2013-2023 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 Libreproc(CMakePackage):
    """A cross-platform process library"""

    homepage = "https://github.com/DaanDeMeyer/reproc/"
    url = "https://github.com/DaanDeMeyer/reproc/archive/v14.2.4.tar.gz"

    maintainers("charmoniumQ")

    version("14.2.4", sha256="55c780f7faa5c8cabd83ebbb84b68e5e0e09732de70a129f6b3c801e905415dd")

    variant("cxx", default=False, description="Build reproc C++ bindings")
    variant("shared", default=True, description="Build shared libraries")

    depends_on("cmake@3.14:", type="build")
    depends_on("zlib+shared", type="link", when="+shared")
    depends_on("zlib~shared", type="link", when="~shared")

    def cmake_args(self):
        return [
            self.define_from_variant("REPROC++", "cxx"),
            self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
        ]