summaryrefslogtreecommitdiff
blob: 75bfec2736521ec0a0a28b516eefebbe861c3c88 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-biology/glimmerhmm/glimmerhmm-3.0.1-r1.ebuild,v 1.2 2012/09/14 14:20:49 ago Exp $

EAPI=4

inherit eutils toolchain-funcs

MY_P=GlimmerHMM

DESCRIPTION="An eukaryotic gene finding system from TIGR"
HOMEPAGE="http://www.cbcb.umd.edu/software/GlimmerHMM/"
SRC_URI="ftp://ftp.cbcb.umd.edu/pub/software/glimmerhmm/${MY_P}-${PV}.tar.gz"

LICENSE="Artistic"
SLOT="0"
IUSE=""
KEYWORDS="amd64 ~x86"

src_unpack() {
	unpack ${A}
	mv GlimmerHMM ${P}
}

src_prepare() {
	sed \
		-e 's|\(my $scriptdir=\)$FindBin::Bin|\1"/usr/libexec/'${PN}'/training_utils"|' \
		-e 's|\(use lib\) $FindBin::Bin|\1 "/usr/share/'${PN}'/lib"|' \
		-i "${S}/train/trainGlimmerHMM" || die

	epatch "${FILESDIR}"/${PV}-gentoo.patch
	tc-export CC CXX
}

src_compile() {
	emake -C "${S}/sources"
	emake -C "${S}/train"
}

src_install() {
	dobin sources/glimmerhmm train/trainGlimmerHMM

	insinto /usr/share/${PN}/lib
	doins train/*.pm
	insinto /usr/share/${PN}/models
	doins -r trained_dir/*
	exeinto /usr/libexec/${PN}/training_utils
	doexe train/{build{1,2,-icm,-icm-noframe},erfapp,falsecomp,findsites,karlin,score,score{2,ATG,ATG2,STOP,STOP2},splicescore}

	dodoc README.first train/readme.train
}