spack/var/spack/repos/builtin/packages/mdsplus/package.py
Harmen Stoppels eef9939c21
Automated git version fixes (#39637)
Use full length commit sha instead of short prefixes, to improve
reproducibility (future clashes) and guard against compromised repos and
man in the middle attacks.

Abbreviated commit shas are expanded to full length, to guard against future
clashes on short hash. It also guards against compromised repos and
man in the middle attacks, where attackers can easily fabricate a malicious
commit with a shasum prefix collision.

Versions with just tags now also get a commit sha, which can later be used to
check for retagged commits.
2023-08-29 16:33:03 +02:00

59 lines
1.7 KiB
Python

# 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 Mdsplus(AutotoolsPackage):
"""A set of software tools for data acquisition and storage and a
methodology for management of complex scientific data."""
homepage = "https://mdsplus.org"
git = "https://github.com/MDSplus/mdsplus.git"
maintainers("wmvanvliet")
parallel = False
version(
"stable_release-7-96-17",
tag="stable_release-7-96-17",
commit="83928a157ee0a5875135aeee0996634ecb802523",
submodules=True,
)
variant("java", default=True, description="Build java libraries and applications")
variant("python", default=True, description="Install python module")
# Autotools needed for building
depends_on("autoconf", type="build")
depends_on("autoconf-archive", type="build")
depends_on("automake", type="build")
depends_on("libtool", type="build")
depends_on("m4", type="build")
depends_on("pkgconfig", type="build")
# Libs needed for building and linking
depends_on("libxml2")
depends_on("readline")
# GUI bindings
depends_on("motif")
# Language bindings
depends_on("java", type=("build", "run"), when="+java")
def configure_args(self):
return self.enable_or_disable("java")
def autoreconf(self, spec, prefix):
bash = which("bash")
bash("./bootstrap")
def setup_run_environment(self, env):
env.set("MDSPLUS_DIR", self.prefix)
if "+python" in self.spec:
env.prepend_path("PYTHONPATH", "{0}/python".format(self.prefix))