From 2913cd936afe9cd9b5c108088d1604b2b131b0b9 Mon Sep 17 00:00:00 2001 From: Eric Berquist Date: Mon, 16 Oct 2023 22:28:51 -0400 Subject: [PATCH] Add latest versions of rlwrap (#40563) * Add latest versions of rlwrap * rlwrap: fix URL for v0.46.1 --- var/spack/repos/builtin/packages/rlwrap/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/rlwrap/package.py b/var/spack/repos/builtin/packages/rlwrap/package.py index 2df72bfa2b3f0b..8203856915270c 100644 --- a/var/spack/repos/builtin/packages/rlwrap/package.py +++ b/var/spack/repos/builtin/packages/rlwrap/package.py @@ -13,6 +13,17 @@ class Rlwrap(AutotoolsPackage): homepage = "https://github.com/hanslub42/rlwrap" url = "https://github.com/hanslub42/rlwrap/releases/download/v0.43/rlwrap-0.43.tar.gz" + version("0.46.1", sha256="2711986a1248f6ac59e2aecf5586205835970040d300a42b4bf8014397e73e37") + version("0.46", sha256="b4bd79fda824426dae65236e338ba7daf3f0d0acad7c1561d4d5e6dadcfd539d") + version("0.45.2", sha256="9f8870deb46e473d21b5db89d709b6497f4ef9fa06d44eebc5f821daa00c8eca") + version("0.44", sha256="cd7ff50cde66e443cbea0049b4abf1cca64a74948371fa4f1b5d9a5bbce1e13c") version("0.43", sha256="8e86d0b7882d9b8a73d229897a90edc207b1ae7fa0899dca8ee01c31a93feb2f") depends_on("readline@4.2:") + + def url_for_version(self, version): + if version < Version("0.46.1"): + return super().url_for_version(version) + # The latest release (0.46.1) removed the "v" prefix. + url_fmt = "https://github.com/hanslub42/rlwrap/releases/download/{0}/rlwrap-{0}.tar.gz" + return url_fmt.format(version)