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

# http://bugs.gentoo.org/show_bug.cgi?id=157827

DESCRIPTION="The Gene Index Project utilities for genomic data processing: seqclean, cdbfasta, psx"
LICENSE="Artistic"
HOMEPAGE="http://compbio.dfci.harvard.edu/tgi/software/"
SLOT="0"
IUSE=""
KEYWORDS="~x86"

for i in seqclean/{seqclean,mdust,trimpoly} cdbfasta/cdbfasta tgicl/{psx,pvmsx,zmsort,tclust,sclust,nrcl,tgi_cpp_library}; do
	SRC_URI="${SRC_URI} ftp://occams.dfci.harvard.edu/pub/bio/tgi/software/${i}.tar.gz";
done

RESTRICT="nomirror"

DEPEND=""
RDEPEND=${DEPEND}
S=${WORKDIR}

src_unpack() {
	unpack {seqclean,mdust,trimpoly,cdbfasta,tgi_cpp_library}.tar.gz
	for i in nrcl sclust tclust zmsort psx pvmsx; do
		mkdir ${S}/${i}; cd ${S}/${i}; unpack ${i}.tar.gz
	done
}

src_compile() {
	sed -i 's/use Mailer;/#use Mailer;/' ${S}/seqclean/seqclean
	sed -i 's/-V\t\tverbose/-V\t\tverbose\\/' ${S}/zmsort/zmsort.cpp
	# TODO: fix errors in nrcl, pvmsx
	for i in cdbfasta mdust psx sclust tclust trimpoly zmsort; do
		sed -i 's/CFLAGS[ ]*=/CFLAGS :=/; s/-D_REENTRANT/-D_REENTRANT \${CFLAGS}/; s/CFLAGS[ ]*:=[ ]*-O2$//' ${S}/${i}/Makefile
		(cd ${S}/${i}; emake) || die
	done
}

src_install() {
	dobin cdbfasta/{cdbfasta,cdbyank} seqclean/{seqclean,cln2qual,bin/seqclean.psx}
	for i in mdust psx sclust tclust trimpoly zmsort; do dobin ${i}/${i}; done
}