summaryrefslogtreecommitdiff
blob: 353362fd6026e11f36106bbf6f34d9fde5e65ff0 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{9..11} )

inherit python-single-r1 toolchain-funcs

DESCRIPTION="Popular short read aligner for Next-generation sequencing data"
HOMEPAGE="https://bowtie-bio.sourceforge.net/bowtie2/"
SRC_URI="mirror://sourceforge/project/${PN}-bio/bowtie2/${PV}/bowtie2-${PV}-source.zip"
S="${WORKDIR}/${PN}2-${PV}"

LICENSE="GPL-3"
SLOT="2"
KEYWORDS="~amd64 ~x86"

IUSE="test cpu_flags_x86_sse2 examples"
# Test script missing from tarball
# ./scripts/sim/run.sh: No such file or directory
RESTRICT="test"
REQUIRED_USE="cpu_flags_x86_sse2 ${PYTHON_REQUIRED_USE}"

RDEPEND="
	${PYTHON_DEPS}
	dev-lang/perl
	sys-libs/zlib
"
DEPEND="${RDEPEND}"
BDEPEND="
	app-arch/unzip
	test? (
		dev-perl/App-cpanminus
		dev-perl/B-COW
		dev-perl/Clone
		dev-perl/Config-General
		dev-perl/File-Which
		dev-perl/local-lib
		dev-perl/Math-Random
		dev-perl/Test-Deep
		dev-perl/Text-Template
	)
"

src_compile() {
	emake \
		CXX="$(tc-getCXX)" \
		CXXFLAGS="" \
		CPPFLAGS="${CPPFLAGS}" \
		EXTRA_FLAGS="${LDFLAGS}" \
		RELEASE_FLAGS="${CXXFLAGS} -msse2"
}

src_install() {
	dobin bowtie2 bowtie2-*

	exeinto /usr/libexec/bowtie2
	doexe scripts/*

	HTML_DOCS=( doc/{manual.html,style.css} )
	einstalldocs
	dodoc TUTORIAL
	newman MANUAL bowtie2.1

	python_fix_shebang "${ED}"/usr/bin/bowtie2-{build,inspect}

	if use examples; then
		docinto examples
		dodoc -r example/.
		docompress -x /usr/share/doc/${PF}/examples
	fi
}