diff options
author | Arne Becker <101113822+EbiArnie@users.noreply.github.com> | 2024-08-28 21:57:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 13:57:01 -0700 |
commit | ec85bbe3f72ba24a4f4ebe21de436da1d610ff87 (patch) | |
tree | 9e2c79530d7287bb91264d369fb9dbde3402bc0d /var | |
parent | 7e1ad8f3212f547e32eb126e18a0a32c74b96cae (diff) | |
download | spack-ec85bbe3f72ba24a4f4ebe21de436da1d610ff87.tar.gz spack-ec85bbe3f72ba24a4f4ebe21de436da1d610ff87.tar.bz2 spack-ec85bbe3f72ba24a4f4ebe21de436da1d610ff87.tar.xz spack-ec85bbe3f72ba24a4f4ebe21de436da1d610ff87.zip |
perl-compress-bzip2: new package (#46055)
* perl-compress-bzip2: new package
Adds Compress::Bzip2
* Use bzip2 from Spack, not system
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/perl-compress-bzip2/package.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl-compress-bzip2/package.py b/var/spack/repos/builtin/packages/perl-compress-bzip2/package.py new file mode 100644 index 0000000000..5eac90503a --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-compress-bzip2/package.py @@ -0,0 +1,35 @@ +# 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 PerlCompressBzip2(PerlPackage): + """Interface to Bzip2 compression library""" + + homepage = "https://metacpan.org/pod/Compress::Bzip2" + url = "https://cpan.metacpan.org/authors/id/R/RU/RURBAN/Compress-Bzip2-2.28.tar.gz" + + maintainers("EbiArnie") + + license("Artistic-1.0-Perl OR GPL-1.0-or-later") + + version("2.28", sha256="859f835c3f5c998810d8b2a6f9e282ff99d6cb66ccfa55cae7e66dafb035116e") + + depends_on("c", type="build") + depends_on("bzip2", type=("build", "test", "run")) + + def setup_build_environment(self, env): + env.set("BZLIB_INCLUDE", self.spec["bzip2"].prefix.include) + env.set("BZLIB_LIB", self.spec["bzip2"].prefix.lib) + env.set("BZLIB_BIN", self.spec["bzip2"].prefix.bin) + + def test_use(self): + """Test 'use module'""" + options = ["-we", 'use strict; use Compress::Bzip2; print("OK\n")'] + + perl = self.spec["perl"].command + out = perl(*options, output=str.split, error=str.split) + assert "OK" in out |