aboutsummaryrefslogtreecommitdiff
blob: c2c502442db2c46ee292ab425690146a102f869b (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit eutils flag-o-matic toolchain-funcs

DESCRIPTION="An ultrafast memory-efficient short read aligner"
HOMEPAGE="http://bowtie-bio.sourceforge.net/"
SRC_URI="mirror://sourceforge/bowtie-bio/${P}-source.zip"

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

CDEPEND="dev-lang/perl"
DEPEND="${CDEPEND} \
		app-arch/unzip"
RDEPEND="${CDEPEND}"

S="${WORKDIR}/${PN}2-${PV}"

pkg_pretend() {
	if ! use sse2 ; then
		ebegin
		eerror "bowtie2 requires sse2 support. Please make sure your system supports"
		eerror "sse2 and enable the sse2 use flag."
		eend
		die
	fi
}

src_prepare() {
	epatch "${FILESDIR}/${P}-buildsystem.patch"
}

src_compile() {
	use sse2 && append-cxxflags -msse2
	emake \
		CC="$(tc-getCC)" \
		CPP="$(tc-getCXX)" \
		EXTRA_FLAGS="${LDFLAGS}" \
		RELEASE_FLAGS="${CXXFLAGS}"
}

src_install() {
	dobin bowtie2 bowtie2-*
	exeinto /usr/share/${PN}2/scripts
	doexe scripts/*

	newman MANUAL bowtie2.1
	dodoc AUTHORS NEWS TUTORIAL
	dohtml doc/manual.html doc/style.css

	if use examples; then
		insinto /usr/share/${PN}2
		doins -r example
	fi
}