summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/odc/package.py
blob: 5022fd6b25750d2f8ceb5d62d92a8a13f397751a (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
# Copyright 2013-2024 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 Odc(CMakePackage):
    """ECMWF encoding and decoding of observational data in ODB2 format."""

    homepage = "https://github.com/ecmwf/odc"
    url = "https://github.com/ecmwf/odc/archive/refs/tags/1.3.0.tar.gz"

    maintainers("skosukhin")

    license("Apache-2.0")

    version("1.4.5", sha256="8532d0453531d62e1f15791d1c5c96540b842913bd211a8ef090211eaf4cccae")
    version("1.3.0", sha256="97a4f10765b341cc8ccbbf203f5559cb1b838cbd945f48d4cecb1bc4305e6cd6")

    variant("fortran", default=False, description="Enable the Fortran interface")

    depends_on("ecbuild@3.4:", type="build")
    depends_on("cmake@3.12:", type="build")

    depends_on("eckit@1.4:+sql")

    def cmake_args(self):
        args = [
            self.define_from_variant("ENABLE_FORTRAN", "fortran"),
            # The tests download additional data (~650MB):
            self.define("ENABLE_TESTS", self.run_tests),
        ]
        return args