perl-date-utils and deps: New packages (#42045)

* perl-class-accessor-lvalue: New package

Adds Class::Accessor::Lvalue

* perl-date-utils and deps: New packages

This adds:
- perl-date-utils and its dependencies:
- perl-date-exception
- perl-term-ansicolor-markup
This commit is contained in:
Arne Becker 2024-01-12 18:19:15 +00:00 committed by GitHub
parent d148d06ed3
commit 510416837f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 128 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# Copyright 2013-2024 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 PerlClassAccessorLvalue(PerlPackage):
"""Create Lvalue accessors"""
homepage = "https://metacpan.org/pod/Class::Accessor::Lvalue"
url = "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Class-Accessor-Lvalue-0.11.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("0.11", sha256="ea5b1bcfbc1c3c63004eb280a5415f7dad2a82257675ab033382814fe168913c")
depends_on("perl-class-accessor", type=("build", "run", "test"))
depends_on("perl-want", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Class::Accessor::Lvalue; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out

View File

@ -0,0 +1,32 @@
# Copyright 2013-2024 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 PerlDateException(PerlPackage):
"""Base exception package as Moo Role for Date::* packages."""
homepage = "https://metacpan.org/pod/Date::Exception"
url = "https://cpan.metacpan.org/authors/id/M/MA/MANWAR/Date-Exception-0.08.tar.gz"
maintainers("EbiArnie")
license("Artistic-2.0")
version("0.08", sha256="329327e1071123b9b50f31e54202c1f48b866a538cb93aeab193e92eb0c847f8")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
depends_on("perl-moo@2.000000:", type=("build", "run", "test"))
depends_on("perl-namespace-autoclean@0.28:", type=("build", "run", "test"))
depends_on("perl-throwable@0.200011:", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Date::Exception; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out

View File

@ -0,0 +1,33 @@
# Copyright 2013-2024 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 PerlDateUtils(PerlPackage):
"""Common date functions as Moo Role."""
homepage = "https://metacpan.org/pod/Date::Utils"
url = "https://cpan.metacpan.org/authors/id/M/MA/MANWAR/Date-Utils-0.28.tar.gz"
maintainers("EbiArnie")
license("Artistic-2.0")
version("0.28", sha256="1ed50713512498e88a54bc7dcf70372763b63196ecf7d9a54668e535d22f03ad")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
depends_on("perl-date-exception@0.08:", type=("build", "run", "test"))
depends_on("perl-moo", type=("build", "run", "test"))
depends_on("perl-namespace-autoclean@0.28:", type=("build", "run", "test"))
depends_on("perl-term-ansicolor-markup@0.06:", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Date::Utils; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out

View File

@ -0,0 +1,33 @@
# Copyright 2013-2024 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 PerlTermAnsicolorMarkup(PerlPackage):
"""Colorize tagged strings for screen output"""
homepage = "https://metacpan.org/pod/Term::ANSIColor::Markup"
url = "https://cpan.metacpan.org/authors/id/K/KE/KENTARO/Term-ANSIColor-Markup-0.06.tar.gz"
maintainers("EbiArnie")
license("MIT")
version("0.06", sha256="66f1c2f2f403fdaae0902b36202d57356b6b5b5a57b3cca8d0248ffbe78c753f")
depends_on("perl@5.8.1:", type=("build", "link", "run", "test"))
depends_on("perl-class-accessor-lvalue", type=("build", "run", "test"))
depends_on("perl-html-parser", type=("build", "run", "test"))
depends_on("perl-test-exception", type=("build", "link"))
depends_on("perl-module-install", type=("build", "link"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Term::ANSIColor::Markup; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out