summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/czmq/package.py
blob: 8b5b28a2013698b9b32a3527884824341b622bc8 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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 Czmq(AutotoolsPackage):
    """A C interface to the ZMQ library"""

    homepage = "http://czmq.zeromq.org"
    url = "https://github.com/zeromq/czmq/archive/v4.0.2.tar.gz"

    license("MPL-2.0")

    version("4.1.1", sha256="b7623433547aa4b6e79722796c27ebc7c0470fea4204e920fd05e717c648f889")
    version("4.0.2", sha256="794f80af7392ec8d361ad69646fc20aaa284d23fef92951334009771a732c810")
    version("3.0.2", sha256="e56f8498daf70310b31c42669b2f9b753c5e747eafaff6d4fdac26d72a474b27")

    depends_on("libtool", type="build")
    depends_on("automake", type="build")
    depends_on("autoconf", type="build")
    depends_on("pkgconfig", type="build")
    depends_on("docbook-xml", type="build")
    depends_on("docbook-xsl", type="build")
    depends_on("uuid")
    depends_on("libzmq")

    def flag_handler(self, name, flags):
        iflags = []
        if name == "cflags":
            if self.spec.satisfies("%oneapi@2022.2.0:"):
                iflags.append("-Wno-error=gnu-null-pointer-arithmetic")
                iflags.append("-Wno-error=strict-prototypes")
        return (iflags, None, None)

    def autoreconf(self, spec, prefix):
        autogen = Executable("./autogen.sh")
        autogen()

    def configure_args(self):
        config_args = []
        if "clang" in self.compiler.name:
            config_args.append("CFLAGS=-Wno-gnu")
            config_args.append("CXXFLAS=-Wno-gnu")
        return config_args