summaryrefslogtreecommitdiff
blob: 7143d138e84f46c8b7fc7101fbff35022ed92185 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-biology/velvet/velvet-0.7.50.ebuild,v 1.1 2009/08/20 15:18:27 weaver Exp $

EAPI="2"

MY_P="${PN}_${PV}"

DESCRIPTION="A sequence assembler for very short reads"
HOMEPAGE="http://www.ebi.ac.uk/~zerbino/velvet/"
SRC_URI="http://www.ebi.ac.uk/~zerbino/velvet/${MY_P}.tgz"

LICENSE="GPL-2"
SLOT="0"
IUSE="-doc"
KEYWORDS="~amd64 ~x86"

DEPEND="doc? ( virtual/latex-base )"
RDEPEND=""

S="${WORKDIR}/${MY_P}"

src_prepare() {
	rm -rf "${S}"/third-party/zlib*
	sed -i -e '/\(CFLAGS\|LDFLAGS\|Z_LIB_DIR\|Z_LIB_FILES\) *= */d' \
		-e '1 a CFLAGS+= -Wall' -e '1 a LDFLAGS+= -lm -lz' \
		-e '/default :/ s/zlib//' -e '/color :/ s/zlib//' \
		"${S}"/Makefile || die
	use doc || sed -i -e '/default :/ s/doc//' "${S}"/Makefile || die
	sed -i -e '/zlib.h/d' -e '1 i #include <zlib.h>' "${S}"/src/readSet.c || die
}

src_compile() {
	emake -j1 || die
	emake -j1 color || die
}

src_install() {
	dobin velvet{g,h,g_de,h_de} || die
	insinto /usr/share/${PN}
	doins -r contrib || die
	dodoc Manual.pdf CREDITS.txt
}