2021-01-02 15:10:28 +08:00
|
|
|
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
|
2020-04-15 22:37:25 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
|
|
|
|
|
|
|
from spack import *
|
|
|
|
|
|
|
|
|
|
|
|
class IqTree(CMakePackage):
|
|
|
|
"""IQ-TREE Efficient software for phylogenomic inference"""
|
|
|
|
|
|
|
|
homepage = "http://www.iqtree.org"
|
|
|
|
git = "https://github.com/Cibiv/IQ-TREE.git"
|
|
|
|
url = "https://github.com/Cibiv/IQ-TREE/archive/v1.6.12.tar.gz"
|
|
|
|
|
2020-07-30 11:20:44 +08:00
|
|
|
version('2.0.6', tag='v2.0.6', submodules=True)
|
2020-12-24 07:15:41 +08:00
|
|
|
version('1.6.12', sha256='9614092de7a157de82c9cc402b19cc8bfa0cb0ffc93b91817875c2b4bb46a284')
|
2020-04-15 22:37:25 +08:00
|
|
|
|
|
|
|
variant('openmp', default=True, description='Enable OpenMP support.')
|
2020-12-24 07:15:41 +08:00
|
|
|
variant('mpi', default=False, description='Enable MPI support.')
|
2020-07-30 11:20:44 +08:00
|
|
|
variant('lsd2', default=True, description='Axctivate Least Squares Dating.')
|
2020-04-15 22:37:25 +08:00
|
|
|
|
|
|
|
maintainers = ['ilbiondo']
|
|
|
|
|
|
|
|
# Depends on Eigen3 and zlib
|
|
|
|
|
|
|
|
depends_on("boost")
|
|
|
|
depends_on("eigen")
|
|
|
|
depends_on("zlib")
|
|
|
|
depends_on('mpi', when='+mpi')
|
|
|
|
|
|
|
|
def cmake_args(self):
|
|
|
|
|
|
|
|
spec = self.spec
|
|
|
|
args = []
|
|
|
|
iqflags = []
|
|
|
|
|
2020-07-30 11:20:44 +08:00
|
|
|
if '+lsd2' in spec:
|
|
|
|
args.append('-DUSE_LSD2=ON')
|
|
|
|
|
2020-04-15 22:37:25 +08:00
|
|
|
if '+openmp' in spec:
|
|
|
|
iqflags.append('omp')
|
|
|
|
|
|
|
|
if '+mpi' in spec:
|
|
|
|
iqflags.append('mpi')
|
|
|
|
|
|
|
|
if not iqflags:
|
|
|
|
iqflags.append('single')
|
|
|
|
|
|
|
|
args.append('-DIQTREE_FLAGS=' + ",".join(iqflags))
|
|
|
|
|
|
|
|
return args
|