blob: 2fd8fa2423c08c6d0dfa75f53cc4d60fbff6e10d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit git-r3 toolchain-funcs
DESCRIPTION="Metagenome assembler using succinct de Bruijn graph approach with CUDA"
HOMEPAGE="https://github.com/voutcn/megahit
http://bioinformatics.oxfordjournals.org/content/31/10/1674.abstract"
EGIT_REPO_URI="https://github.com/voutcn/megahit.git"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
IUSE="+openmp"
DEPEND=""
RDEPEND="${DEPEND}
sys-libs/zlib"
# >=gcc-4.4
# use make use_gpu=1 to compile it and turn on --use-gpu to activate GPU acceleration when running megahit
pkg_setup() {
use openmp && ! tc-has-openmp && die "Please switch to an openmp compatible compiler"
}
src_prepare(){
default
if [[ $(tc-getCXX) =~ g++ ]]; then
local eopenmp=-fopenmp
elif [[ $(tc-getCXX) =~ cxx ]]; then
local eopenmp=-openmp
sed -e "s#-fopenmp#-openmp#" -i Makefile || die
else
elog "Cannot detect compiler type so not setting openmp support"
fi
sed -e "s#^CXXFLAGS = -g -O2#CXXFLAGS = ${CFLAGS}#" -i Makefile || die
}
src_install(){
dobin megahit megahit_toolkit megahit_sdbg_build megahit_asm_core
dodoc README.md
}
|