perl-bsd-resource: new package (#42982)

Adds BSD::Resource
This commit is contained in:
Arne Becker 2024-03-05 20:03:52 +00:00 committed by GitHub
parent 2f4266161c
commit 24ddc49c1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,25 @@
# 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 PerlBsdResource(PerlPackage):
"""BSD process resource limit and priority functions"""
homepage = "https://metacpan.org/pod/BSD::Resource"
url = "https://cpan.metacpan.org/authors/id/J/JH/JHI/BSD-Resource-1.2911.tar.gz"
maintainers("EbiArnie")
version("1.2911", sha256="9d1cfba063cc18f72427a22451f7908836b7331ac8785dbe07553c5b043a0c3d")
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use BSD::Resource; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out