Skip to content

Commit

Permalink
cdhit: add missing perl dep, patch shebangs (spack#38179)
Browse files Browse the repository at this point in the history
  • Loading branch information
snehring committed Jun 12, 2023
1 parent b4ad883 commit 5e6174c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions var/spack/repos/builtin/packages/cdhit/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from glob import glob

from spack.package import *


Expand All @@ -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 = []
Expand Down
21 changes: 21 additions & 0 deletions var/spack/repos/builtin/packages/perl-text-nsp/package.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 5e6174c

Please sign in to comment.