cdhit: add zlib dependency. (#13015)
* cdhit: add zlib dependency. * Add zlib variant.
This commit is contained in:
parent
b85ff04681
commit
da18ac3a0f
@ -17,15 +17,19 @@ class Cdhit(MakefilePackage):
|
|||||||
version('4.6.8', 'bdd73ec0cceab6653aab7b31b57c5a8b')
|
version('4.6.8', 'bdd73ec0cceab6653aab7b31b57c5a8b')
|
||||||
|
|
||||||
variant('openmp', default=True, description='Compile with multi-threading support')
|
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', type=('build', 'run'))
|
||||||
|
depends_on('zlib', when='+zlib', type='link')
|
||||||
|
|
||||||
def build(self, spec, prefix):
|
def build(self, spec, prefix):
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
|
make_args = []
|
||||||
if '~openmp' in spec:
|
if '~openmp' in spec:
|
||||||
make('openmp=no')
|
make_args.append('openmp=no')
|
||||||
else:
|
if '~zlib' in spec:
|
||||||
make()
|
make_args.append('zlib=no')
|
||||||
|
make(*make_args)
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
spack_env.set('PREFIX', prefix.bin)
|
spack_env.set('PREFIX', prefix.bin)
|
||||||
|
Loading…
Reference in New Issue
Block a user