blob: affea2dd68cef743b9615259bc8e6ae1d7c8f236 (
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
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-biology/velvet/velvet-1.0.18.ebuild,v 1.1 2011/02/03 02:40:47 weaver Exp $
EAPI="3"
inherit eutils toolchain-funcs flag-o-matic
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() {
append-flags -O3 # as recommended by upstream
filter-ldflags -Wl,--as-needed # sorry, no time to deal with this. patches welcome
epatch "${FILESDIR}"/${P}-gentoo.diff
use doc || sed -i -e '/default :/ s/doc//' "${S}"/Makefile || die
}
src_compile() {
tc-export CC
MAKE_XOPTS=""
if [[ $VELVET_MAXKMERLENGTH != "" ]]; then MAKE_XOPTS="$MAKE_XOPTS MAXKMERLENGTH=$VELVET_MAXKMERLENGTH"; fi
if [[ $VELVET_CATEGORIES != "" ]]; then MAKE_XOPTS="$MAKE_XOPTS CATEGORIES=$VELVET_CATEGORIES"; fi
emake -j1 $MAKE_XOPTS || die
emake -j1 $MAKE_XOPTS 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 ChangeLog || die
}
pkg_postinst() {
elog "To adjust the MAXKMERLENGTH or CATEGORIES parameters as described in the manual,"
elog "please set the variables VELVET_MAXKMERLENGTH or VELVET_CATEGORIES in your"
elog "environment or /etc/make.conf, then re-emerge the package. For example:"
elog " VELVET_MAXKMERLENGTH=NN emerge [options] velvet"
}
|