perl-kyotocabinet: new package and lzo and lzma compression to kyotocabinet (#41772)

- Add Perl module KyotoCabinet
- Add lzo and lzma compression to kyotocabinet
This commit is contained in:
Arne Becker 2024-01-18 01:03:47 +00:00 committed by GitHub
parent 308761d5f9
commit 796d251061
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 42 additions and 0 deletions

View File

@ -19,3 +19,13 @@ class Kyotocabinet(AutotoolsPackage):
version("1.2.80", sha256="4c85d736668d82920bfdbdb92ac3d66b7db1108f09581a769dd9160a02def349")
depends_on("zlib-api@1.2.3:", type=("build", "link"))
depends_on("lzo", type=("build", "link"))
depends_on("xz", type=("build", "link"))
def configure_args(self):
args = []
args.append("--enable-lzo")
args.append("--enable-lzma")
return args

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 PerlKyotocabinet(PerlPackage):
"""Kyoto Cabinet is a library of routines for managing a database."""
homepage = "https://dbmx.net/kyotocabinet/"
url = "https://dbmx.net/kyotocabinet/perlpkg/kyotocabinet-perl-1.20.tar.gz"
maintainers("EbiArnie")
license("GPL-3.0-or-later")
version("1.20", sha256="19b3654dc6febfd0b91e54f36b2a0ebdaeaefaf7875f5aab337ad846a4095c32")
depends_on("kyotocabinet", type=("build", "link", "run", "test"))
depends_on("zlib-api", type=("build", "link", "run", "test"))
depends_on("lzo", type=("build", "link", "run", "test"))
depends_on("xz", type=("build", "link", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use KyotoCabinet; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out