cdhit: add zlib dependency. (#13015)

* cdhit: add zlib dependency.

* Add zlib variant.
This commit is contained in:
Toyohisa Kameyama 2019-10-03 02:55:05 +09:00 committed by Adam J. Stewart
parent b85ff04681
commit da18ac3a0f

View File

@ -17,15 +17,19 @@ class Cdhit(MakefilePackage):
version('4.6.8', 'bdd73ec0cceab6653aab7b31b57c5a8b')
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('zlib', when='+zlib', type='link')
def build(self, spec, prefix):
mkdirp(prefix.bin)
make_args = []
if '~openmp' in spec:
make('openmp=no')
else:
make()
make_args.append('openmp=no')
if '~zlib' in spec:
make_args.append('zlib=no')
make(*make_args)
def setup_environment(self, spack_env, run_env):
spack_env.set('PREFIX', prefix.bin)