summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/libxcrypt/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/libxcrypt/package.py')
-rw-r--r--var/spack/repos/builtin/packages/libxcrypt/package.py35
1 files changed, 30 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/libxcrypt/package.py b/var/spack/repos/builtin/packages/libxcrypt/package.py
index 6d2758dd5f..b66f1424d9 100644
--- a/var/spack/repos/builtin/packages/libxcrypt/package.py
+++ b/var/spack/repos/builtin/packages/libxcrypt/package.py
@@ -10,13 +10,38 @@ class Libxcrypt(AutotoolsPackage):
"""libxcrypt is a modern library for one-way hashing of passwords."""
homepage = "https://github.com/besser82/libxcrypt"
- url = "https://github.com/besser82/libxcrypt/archive/v4.4.17.tar.gz"
+ url = "https://github.com/besser82/libxcrypt/releases/download/v4.4.30/libxcrypt-4.4.30.tar.xz"
+ def url_for_version(self, version):
+ if version <= Version("4.4.17"):
+ return "https://github.com/besser82/libxcrypt/archive/v{}.tar.gz".format(version)
+ return "https://github.com/besser82/libxcrypt/releases/download/v{}/libxcrypt-{}.tar.xz".format(
+ version, version
+ )
+
+ version("4.4.30", sha256="b3667f0ba85daad6af246ba4090fbe53163ad93c8b6a2a1257d22a78bb7ceeba")
version("4.4.17", sha256="7665168d0409574a03f7b484682e68334764c29c21ca5df438955a381384ca07")
version("4.4.16", sha256="a98f65b8baffa2b5ba68ee53c10c0a328166ef4116bce3baece190c8ce01f375")
version("4.4.15", sha256="8bcdef03bc65f9dbda742e56820435b6f13eea59fb903765141c6467f4655e5a")
- depends_on("autoconf", type="build")
- depends_on("automake", type="build")
- depends_on("libtool", type="build")
- depends_on("m4", type="build")
+ variant("obsolete_api", default=False, when="@4.4.30:")
+
+ patch("truncating-conversion.patch", when="@4.4.30")
+
+ def configure_args(self):
+ # Disable test dependency on Python (Python itself depends on libxcrypt).
+ args = [
+ "ac_cv_path_python3_passlib=not found",
+ ]
+ args += self.enable_or_disable("obsolete-api", variant="obsolete_api")
+ return args
+
+ @property
+ def libs(self):
+ return find_libraries("libcrypt", root=self.prefix, recursive=True)
+
+ with when("@:4.4.17"):
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")