summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Hedges <aphedges@users.noreply.github.com>2022-05-17 03:43:01 -0400
committerGitHub <noreply@github.com>2022-05-17 09:43:01 +0200
commit446cbf4b5a4b902fe90aeda9376e4671557617f7 (patch)
treec178e0058af029eacd489566fc9051db58c293ab
parent5153c9e98cc9c997f67beda8c356bfa5e68f985c (diff)
downloadspack-446cbf4b5a4b902fe90aeda9376e4671557617f7.tar.gz
spack-446cbf4b5a4b902fe90aeda9376e4671557617f7.tar.bz2
spack-446cbf4b5a4b902fe90aeda9376e4671557617f7.tar.xz
spack-446cbf4b5a4b902fe90aeda9376e4671557617f7.zip
sed: add v4.8.0, set gnu_mirror_path per version (#30666)
-rw-r--r--var/spack/repos/builtin/packages/sed/package.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/sed/package.py b/var/spack/repos/builtin/packages/sed/package.py
index fa8807aecb..12f190e604 100644
--- a/var/spack/repos/builtin/packages/sed/package.py
+++ b/var/spack/repos/builtin/packages/sed/package.py
@@ -11,12 +11,20 @@ from spack import *
class Sed(AutotoolsPackage, GNUMirrorPackage):
"""GNU implementation of the famous stream editor."""
homepage = "https://www.gnu.org/software/sed/"
- gnu_mirror_path = "sed/sed-4.2.2.tar.bz2"
+ gnu_mirror_path = "sed/sed-4.8.tar.xz"
+ version('4.8', sha256='f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633')
version('4.2.2', sha256='f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7')
executables = ['^sed$']
+ def url_for_version(self, version):
+ if Version("4.2") <= version < Version("4.3.0"):
+ self.gnu_mirror_path = "sed/sed-{0}.tar.bz2".format(version)
+ elif version < Version("4.2"):
+ self.gnu_mirror_path = "sed/sed-{0}.tar.gz".format(version)
+ return super(Sed, self).url_for_version(version)
+
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)