From 55d7fec69c6fb7ff77512b8e219564fac218dd82 Mon Sep 17 00:00:00 2001 From: "H. Joe Lee" Date: Tue, 23 May 2023 14:30:23 -0500 Subject: daos: add a new package (#35649) --- .../daos/0001-LIBPATH-fix-for-ALT_PREFIX.2.patch | 42 +++++++++++++ var/spack/repos/builtin/packages/daos/package.py | 70 ++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 var/spack/repos/builtin/packages/daos/0001-LIBPATH-fix-for-ALT_PREFIX.2.patch create mode 100644 var/spack/repos/builtin/packages/daos/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/daos/0001-LIBPATH-fix-for-ALT_PREFIX.2.patch b/var/spack/repos/builtin/packages/daos/0001-LIBPATH-fix-for-ALT_PREFIX.2.patch new file mode 100644 index 0000000000..e57ec977c8 --- /dev/null +++ b/var/spack/repos/builtin/packages/daos/0001-LIBPATH-fix-for-ALT_PREFIX.2.patch @@ -0,0 +1,42 @@ +From 08d0017f06695d4837f1c509ca39d61b32bdae2b Mon Sep 17 00:00:00 2001 +From: Sean Koyama +Date: Mon, 6 Mar 2023 23:02:08 +0000 +Subject: [PATCH] LIBPATH fix for ALT_PREFIX + +--- + site_scons/prereq_tools/base.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/site_scons/prereq_tools/base.py b/site_scons/prereq_tools/base.py +index 4df1347be..da32d3dd1 100644 +--- a/site_scons/prereq_tools/base.py ++++ b/site_scons/prereq_tools/base.py +@@ -1247,18 +1247,18 @@ class PreReqComponent(): + ipath = os.path.join(path, "include") + if not os.path.exists(ipath): + ipath = None +- lpath = None ++ lpaths = [] + for lib in ['lib64', 'lib']: +- lpath = os.path.join(path, lib) +- if not os.path.exists(lpath): +- lpath = None +- if ipath is None and lpath is None: ++ lp = os.path.join(path, lib) ++ if os.path.exists(lp): ++ lpaths.append(lp) ++ if not ipath and not lpaths: + continue + env = self.__env.Clone() + if ipath: + env.AppendUnique(CPPPATH=[ipath]) +- if lpath: +- env.AppendUnique(LIBPATH=[lpath]) ++ if lpaths: ++ env.AppendUnique(LIBPATH=lpaths) + if not comp.has_missing_targets(env): + self.__prebuilt_path[name] = path + return path +-- +2.34.1 + diff --git a/var/spack/repos/builtin/packages/daos/package.py b/var/spack/repos/builtin/packages/daos/package.py new file mode 100644 index 0000000000..838f009092 --- /dev/null +++ b/var/spack/repos/builtin/packages/daos/package.py @@ -0,0 +1,70 @@ +# 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 Daos(SConsPackage): + """The Distributed Asynchronous Object Storage (DAOS) is an open-source + software-defined object store designed from the ground up for massively + distributed Non Volatile Memory (NVM).""" + + homepage = "https://github.com/daos-stack/daos" + git = "https://github.com/daos-stack/daos.git" + maintainers("hyoklee") + + version("master", branch="master", submodules=True) + version("2.2.0", tag="v2.2.0", submodules=True) + variant( + "debug", default=False, description="Enable debugging info and strict compile warnings" + ) + + patch("0001-LIBPATH-fix-for-ALT_PREFIX.2.patch", when="@2.2.0:") + + depends_on("argobots@1.1:") + depends_on("boost", type="build") + depends_on("cmocka", type="build") + depends_on("go", type="build") + depends_on("hwloc") + depends_on("isa-l@2.30.0:") + depends_on("isa-l-crypto@2.23.0:") + depends_on("libfabric@1.15.1:") + depends_on("libfuse@3.6.1:") + depends_on("libuuid") + depends_on("libunwind") + depends_on("libyaml") + depends_on("mercury@2.2.0:+boostsys") + depends_on("openssl") + depends_on("pmdk@1.12.1:") + depends_on("protobuf-c@1.3.3:") + depends_on("py-distro") + depends_on("readline") + depends_on("scons@4.4.0:") + depends_on("spdk@23.01:+shared+rdma+dpdk") + depends_on("ucx@1.12.1:") + + def build_args(self, spec, prefix): + args = ["PREFIX={0}".format(prefix), "USE_INSTALLED=all"] + + if "+debug" in spec: + args.append("--debug=explain,findlibs,includes") + + # Construct ALT_PREFIX and make sure that '/usr' is last. + alt_prefix = [] + for node in spec.traverse(): + alt_prefix.append(format(node.prefix)) + + args.extend( + [ + "WARNING_LEVEL=warning", + "ALT_PREFIX=%s" % ":".join([str(elem) for elem in alt_prefix]), + "GO_BIN={0}".format(spec["go"].prefix.bin) + "/go", + ] + ) + return args + + def install_args(self, spec, prefix): + args = ["PREFIX={0}".format(prefix)] + return args -- cgit v1.2.3-60-g2f50