mpifileutils: add DAOS variant (#35618)

* mpifileutils: add DAOS variant
* mpifileutils: Add daos dep when +daos
  Add dependency on DAOS when +daos
  Pass DAOS prefix to ensure correct DAOS is found by during configuration
* Change in to satisfies for boolean variants

---------

Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
This commit is contained in:
Sean Koyama 2023-12-15 09:38:01 -08:00 committed by GitHub
parent b1ab01280a
commit 0efd5287c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,8 @@ class Mpifileutils(Package):
depends_on("attr", when="@0.11.1:+xattr") depends_on("attr", when="@0.11.1:+xattr")
depends_on("daos", when="+daos")
depends_on("bzip2") depends_on("bzip2")
depends_on("libcap") depends_on("libcap")
@ -68,6 +70,8 @@ class Mpifileutils(Package):
variant("experimental", default=False, description="Install experimental tools") variant("experimental", default=False, description="Install experimental tools")
conflicts("+experimental", when="@:0.6") conflicts("+experimental", when="@:0.6")
variant("daos", default=False, description="Enable DAOS support", when="@0.11:")
def flag_handler(self, name, flags): def flag_handler(self, name, flags):
spec = self.spec spec = self.spec
iflags = [] iflags = []
@ -82,26 +86,32 @@ def cmake_args(self):
args.append("-DWITH_DTCMP_PREFIX=%s" % self.spec["dtcmp"].prefix) args.append("-DWITH_DTCMP_PREFIX=%s" % self.spec["dtcmp"].prefix)
args.append("-DWITH_LibCircle_PREFIX=%s" % self.spec["libcircle"].prefix) args.append("-DWITH_LibCircle_PREFIX=%s" % self.spec["libcircle"].prefix)
if "+xattr" in self.spec: if self.spec.satisfies("+xattr"):
args.append("-DENABLE_XATTRS=ON") args.append("-DENABLE_XATTRS=ON")
else: else:
args.append("-DENABLE_XATTRS=OFF") args.append("-DENABLE_XATTRS=OFF")
if "+lustre" in self.spec: if self.spec.satisfies("+lustre"):
args.append("-DENABLE_LUSTRE=ON") args.append("-DENABLE_LUSTRE=ON")
else: else:
args.append("-DENABLE_LUSTRE=OFF") args.append("-DENABLE_LUSTRE=OFF")
if "+gpfs" in self.spec: if self.spec.satisfies("+gpfs"):
args.append("-DENABLE_GPFS=ON") args.append("-DENABLE_GPFS=ON")
else: else:
args.append("-DENABLE_GPFS=OFF") args.append("-DENABLE_GPFS=OFF")
if "+experimental" in self.spec: if self.spec.satisfies("+experimental"):
args.append("-DENABLE_EXPERIMENTAL=ON") args.append("-DENABLE_EXPERIMENTAL=ON")
else: else:
args.append("-DENABLE_EXPERIMENTAL=OFF") args.append("-DENABLE_EXPERIMENTAL=OFF")
if self.spec.satisfies("+daos"):
args.append("-DENABLE_DAOS=ON")
args.append("-DWITH_DAOS_PREFIX=%s" % self.spec["daos"].prefix)
else:
args.append("-DENABLE_DAOS=OFF")
return args return args
@when("@0.9:") @when("@0.9:")
@ -135,16 +145,16 @@ def configure_args(self):
) )
args.append("--with-dtcmp=%s" % self.spec["dtcmp"].prefix) args.append("--with-dtcmp=%s" % self.spec["dtcmp"].prefix)
if "+xattr" in self.spec: if self.spec.satisfies("+xattr"):
args.append("CFLAGS=-DDCOPY_USE_XATTRS") args.append("CFLAGS=-DDCOPY_USE_XATTRS")
if "+lustre" in self.spec: if self.spec.satisfies("+lustre"):
args.append("--enable-lustre") args.append("--enable-lustre")
else: else:
args.append("--disable-lustre") args.append("--disable-lustre")
if self.spec.satisfies("@0.7:"): if self.spec.satisfies("@0.7:"):
if "+experimental" in self.spec: if self.spec.satisfies("+experimental"):
args.append("--enable-experimental") args.append("--enable-experimental")
else: else:
args.append("--disable-experimental") args.append("--disable-experimental")