diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2020-08-27 07:39:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 14:39:46 +0200 |
commit | 7fd8f74c2388ea3a8f0e0797afd72cc08371f449 (patch) | |
tree | 87410c2e36290f1ea2022f6e1b1312116e735115 /var | |
parent | ba470137c8cdb1e6eeb24b559993d338155167dd (diff) | |
download | spack-7fd8f74c2388ea3a8f0e0797afd72cc08371f449.tar.gz spack-7fd8f74c2388ea3a8f0e0797afd72cc08371f449.tar.bz2 spack-7fd8f74c2388ea3a8f0e0797afd72cc08371f449.tar.xz spack-7fd8f74c2388ea3a8f0e0797afd72cc08371f449.zip |
SLOCCount: add new package (#18271)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/sloccount/package.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/sloccount/package.py b/var/spack/repos/builtin/packages/sloccount/package.py new file mode 100644 index 0000000000..c580a043d1 --- /dev/null +++ b/var/spack/repos/builtin/packages/sloccount/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2020 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) + + +class Sloccount(MakefilePackage): + """SLOCCount is a set of tools for counting physical Source Lines of Code + (SLOC) in a large number of languages of a potentially large set of + programs.""" + + homepage = "https://dwheeler.com/sloccount/" + url = "https://dwheeler.com/sloccount/sloccount-2.26.tar.gz" + + version('2.26', sha256='fa7fa2bbf2f627dd2d0fdb958bd8ec4527231254c120a8b4322405d8a4e3d12b') + + # md5sum needed at run-time + depends_on('coreutils', type=('build', 'run')) + + def edit(self, spec, prefix): + makefile = FileFilter('makefile') + makefile.filter('^PREFIX=.*', 'PREFIX=' + prefix) + makefile.filter('^CC=.*', 'CC=' + spack_cc) + + # Needed for `make test` to pass + makefile.filter('PATH=.:${PATH}', 'PATH=$(CURDIR):${PATH}', + string=True) + + def install(self, spec, prefix): + mkdir(prefix.bin) + make('install') |