cdhit: add missing perl dep, patch shebangs (#38179)

This commit is contained in:
snehring 2023-06-12 08:51:59 -05:00 committed by GitHub
parent b4ad883b0d
commit 5e6174cbe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View File

@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from glob import glob
from spack.package import *
@ -16,12 +18,19 @@ class Cdhit(MakefilePackage):
version("4.8.1", sha256="f8bc3cdd7aebb432fcd35eed0093e7a6413f1e36bbd2a837ebc06e57cdb20b70")
version("4.6.8", sha256="37d685e4aa849314401805fe4d4db707e1d06070368475e313d6f3cb8fb65949")
maintainers("snehring")
variant("openmp", default=True, description="Compile with multi-threading support")
variant("zlib", default=True, description="Compile with zlib")
depends_on("perl", type=("build", "run"))
depends_on("perl-text-nsp", type="run")
depends_on("zlib", when="+zlib", type="link")
def patch(self):
for f in glob("*.pl"):
filter_file("^#!/usr/bin/perl.*$", "#!/usr/bin/env perl", f)
def build(self, spec, prefix):
mkdirp(prefix.bin)
make_args = []

View File

@ -0,0 +1,21 @@
# Copyright 2013-2023 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 PerlTextNsp(PerlPackage):
"""
The Ngram Statistics Package (NSP) is a suite of programs that aids in
analyzing Ngrams in text files.
"""
homepage = "https://metacpan.org/dist/Text-NSP"
url = "https://cpan.metacpan.org/authors/id/T/TP/TPEDERSE/Text-NSP-1.31.tar.gz"
maintainers("snehring")
version("1.31", sha256="a01201beb29636b3e41ecda2a6cf6522fd265416bd6d994fad02f59fb49cf595")
version("1.29", sha256="26610cc17ddc3a9a239ffd100bbcf42618e2577ab4b051de4c262f2082afd27e")