From 5067b956f45187686a10592b1c25037b5881c086 Mon Sep 17 00:00:00 2001 From: ilbiondo <61497728+ilbiondo@users.noreply.github.com> Date: Thu, 23 Jul 2020 13:22:58 +0200 Subject: Shapeit4: added new package at v4.1.3 (#17674) --- .../repos/builtin/packages/shapeit4/package.py | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 var/spack/repos/builtin/packages/shapeit4/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/shapeit4/package.py b/var/spack/repos/builtin/packages/shapeit4/package.py new file mode 100644 index 0000000000..009e5084bf --- /dev/null +++ b/var/spack/repos/builtin/packages/shapeit4/package.py @@ -0,0 +1,55 @@ +# 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) + +from spack import * + + +class Shapeit4(MakefilePackage): + """SHAPEIT4 is a fast and accurate method for estimation of haplotypes + (aka phasing) for SNP array and high coverage sequencing data.""" + + homepage = "https://odelaneau.github.io/shapeit4/" + url = "https://github.com/odelaneau/shapeit4/archive/v4.1.3.tar.gz" + + version('4.1.3', sha256='d209731277b00bca1e3478b7e0a0cbe40fbe23826c3d640ad12e0dd6033cbbb8') + + maintainers = ['ilbiondo'] + + depends_on('htslib') + depends_on('boost') + depends_on('bzip2') + depends_on('xz') + + def edit(self, spec, prefix): + + makefile = FileFilter('makefile') + makefile.filter('CXX=.*', 'CXX = c++') + + makefile.filter('CXXFLAG=.*', 'CXXFLAG = -O3') + makefile.filter('LDFLAG=.*', 'LDFLAG = -O3') + + makefile.filter('HTSLIB_INC=.*', 'HTSLIB_INC = ' + + self.spec['htslib'].prefix.include) + + makefile.filter('HTSLIB_LIB=.*', 'HTSLIB_LIB = ' + + self.spec['htslib'].prefix.lib + '/libhts.so') + + makefile.filter('BOOST_INC=.*', 'BOOST_INC = ' + + self.spec['boost'].prefix.include) + + makefile.filter('BOOST_LIB_IO=.*', 'BOOST_LIB_IO = ' + + self.spec['boost'].prefix.lib + + "/libboost_iostreams.so") + + makefile.filter('BOOST_LIB_PO=.*', 'BOOST_LIB_PO = ' + + self.spec['boost'].prefix.lib + + "/libboost_program_options.so") + + def install(self, spec, prefix): + + install_tree('bin', prefix.bin) + install_tree('test', join_path(self.prefix, 'test')) + install_tree('docs', join_path(self.prefix, 'docs')) + install_tree('maps', join_path(self.prefix, 'maps')) -- cgit v1.2.3-70-g09d2