orca: add 6.0.0 avx2 version (#45824)

The avx2 version can be downloaded from the ORCA [forum](https://orcaforum.kofo.mpg.de/app.php/dlext/?view=detail&df_id=214#).

The version is named `avx2-6.0.0` (as opposed to the more
natural-looking `6.0.0-avx2`) to avoid the avx2 version shadowing the
non-avx2 one. Definitely open for better suggestion.
This commit is contained in:
Lin Guo 2024-08-20 18:41:30 -07:00 committed by GitHub
parent c29652580a
commit dc3c96dd2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,6 +23,9 @@ class Orca(Package):
license("LGPL-2.1-or-later")
version(
"avx2-6.0.0", sha256="02c21294efe7b1b721e26cb90f98ee15ad682d02807201b7d217dfe67905a2fd"
)
version("6.0.0", sha256="219bd1deb6d64a63cb72471926cb81665cbbcdec19f9c9549761be67d49a29c6")
version("5.0.4", sha256="c4ea5aea60da7bcb18a6b7042609206fbeb2a765c6fa958c5689d450b588b036")
version("5.0.3", sha256="b8b9076d1711150a6d6cb3eb30b18e2782fa847c5a86d8404b9339faef105043")
@ -40,6 +43,7 @@ class Orca(Package):
"5.0.3": "4.1.2",
"5.0.4": "4.1.2",
"6.0.0": "4.1.6",
"avx2-6.0.0": "4.1.6",
}
for orca_version, openmpi_version in openmpi_versions.items():
depends_on(
@ -47,10 +51,14 @@ class Orca(Package):
)
def url_for_version(self, version):
openmpi_version = self.openmpi_versions[str(version.dotted)].replace(".", "")
openmpi_version = self.openmpi_versions[version.string].replace(".", "")
if openmpi_version == "412":
openmpi_version = "411"
return f"file://{os.getcwd()}/orca_{version.underscored}_linux_x86-64_shared_openmpi{openmpi_version}.tar.xz"
ver_parts = version.string.split("-")
ver_underscored = ver_parts[-1].replace(".", "_")
features = ver_parts[:-1] + ["shared"]
feature_text = "_".join(features)
return f"file://{os.getcwd()}/orca_{ver_underscored}_linux_x86-64_{feature_text}_openmpi{openmpi_version}.tar.xz"
def install(self, spec, prefix):
mkdirp(prefix.bin)