summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Hicken <hickej2@rpi.edu>2024-10-09 15:14:56 -0400
committerGitHub <noreply@github.com>2024-10-09 21:14:56 +0200
commit3342866e0ec6dd7b7c93b8c25b1f1e3ec703ef42 (patch)
tree2894e7f8adee6c888064842e9e18904652f407f5
parent39ff675898c7cf90b53579449eb3744e09cc5663 (diff)
downloadspack-3342866e0ec6dd7b7c93b8c25b1f1e3ec703ef42.tar.gz
spack-3342866e0ec6dd7b7c93b8c25b1f1e3ec703ef42.tar.bz2
spack-3342866e0ec6dd7b7c93b8c25b1f1e3ec703ef42.tar.xz
spack-3342866e0ec6dd7b7c93b8c25b1f1e3ec703ef42.zip
adept: new package (#46793)
* added adept package * forgot to remove boilerplate comment * fixed formatting issue and use of lapack_prefix * adept: use f-string * removed debug variant and corresponding configure_args conditional --------- Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/adept/package.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/adept/package.py b/var/spack/repos/builtin/packages/adept/package.py
new file mode 100644
index 0000000000..55aa3a6f44
--- /dev/null
+++ b/var/spack/repos/builtin/packages/adept/package.py
@@ -0,0 +1,48 @@
+# 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 Adept(AutotoolsPackage):
+ """Combined array and automatic differentiation library in C++."""
+
+ homepage = "https://www.met.reading.ac.uk/clouds/adept/"
+ url = "https://www.met.reading.ac.uk/clouds/adept/adept-2.1.1.tar.gz"
+
+ maintainers("jehicken")
+
+ license("Apache-2.0", checked_by="jehicken")
+
+ version("2.1.1", sha256="0cef334e82df4526d3761bdd8319a63e7582c96b2f1cc88391729018b4825c47")
+
+ variant("blas", default=False, description="Enable Adept's native arrays using Openblas")
+ variant("lapack", default=False, description="Enable Adept's native arrays using Lapack")
+
+ depends_on("cxx", type="build")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+
+ depends_on("openblas", when="+blas")
+ depends_on("netlib-lapack", when="+lapack")
+
+ def autoreconf(self, spec, prefix):
+ autoreconf("--install", "--verbose", "--force")
+
+ def configure_args(self):
+ args = []
+
+ if self.spec.satisfies("+blas"):
+ blas_prefix = self.spec["openblas"].prefix
+ args.append(f"--with-blas={blas_prefix}")
+
+ if self.spec.satisfies("+lapack"):
+ lapack_prefix = self.spec["netlib-lapack"].prefix
+ args.append(f"--with-lapack={lapack_prefix}")
+
+ return args