summaryrefslogtreecommitdiff
blob: 695c246322d1d00bb08253e4bc33093d426ad483 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-sci/ncbi-tools/ncbi-tools-20031103.ebuild,v 1.3 2004/02/06 00:44:37 sediener Exp $

DESCRIPTION="NCBI toolkit including the BLAST group of programs, entrez, ddv, udv, sequin and others"
HOMEPAGE="http://www.ncbi.nlm.nih.gov/"

SRC_URI="mirror://gentoo/${P}.tar.gz mirror://gentoo/${PN}-data-${PV}.tar.gz"

LICENSE="freedist"
SLOT="0"

KEYWORDS="x86 ~ppc ~sparc ~alpha"
IUSE="X png"

DEPEND="app-shells/tcsh
		X? ( >=xfree-4.3.0
			x11-libs/openmotif
			png? ( media-libs/libpng )
		)"

S=${WORKDIR}/${P}

src_compile() {

	cd ${WORKDIR}

	if [ -z "`use X`" ]
	then
		ewarn "No X11 apps will be compiled"
		sed -e "s:\#set HAVE_OGL=0:set HAVE_OGL=0:" -i ncbi/make/makedis.csh
		sed -e "s:\#set HAVE_MOTIF=0:set HAVE_MOTIF=0:" -i ncbi/make/makedis.csh
	fi

	# change to our CFLAGS
	sed -e "s:-O2:${CFLAGS}:" -i ncbi/platform/linux.ncbi.mk

	# put in our MAKEOPTS 
	# VERY BROKEN :: PLEASE FIGURE IT OUT IF YOU CAN...
	# dosed "s/MFLG=\"\"/MFLG=\"${MAKEOPTS}\"/" ncbi/make/makedis.csh

	./ncbi/make/makedis.csh 2>&1 | tee out.makedis.txt

}

src_install() {

	cd ${WORKDIR}/ncbi/bin
	dobin Nentrez blastclust entrcmd getmesh megablast testobj Psequin blastpgp entrez2 getpub ncbisort testval asn2ff cdscan errhdr getseq netentcf udv asn2gb checksub fa2htgs gil2bin rpsblast vecscreen asn2xml copymat fastacmd idfetch seedtop asndhuff ddv findspl impala seqtest asntool demo_regexp fmerge indexpub tbl2asn blastall demo_regexp_grep formatdb makemat test_regexp blastcl3 dosimple getfeat makeset testcore bl2seq


	cd ${WORKDIR}
	dodir /usr/var/ncbi
	insinto /usr/var/ncbi
	doins data/*

	cd ${WORKDIR}/ncbi/doc
	dodoc * images/* fa2htgs/*

	# ncbirc file
	dodir /etc/skel
	insinto /etc/skel
	newins ${FILESDIR}/dot-ncbirc .ncbirc

	# env file
	dodir /etc/env.d
	insinto /etc/env.d
	doins ${FILESDIR}/21ncbi
}

pkg_postinst() {
	einfo " "
	einfo "You'll need to edit /etc/env.d/21ncbi and indicate where your"
	einfo "formatdb formatted databases are going to live on the filesystem."
	einfo "Additionally, you may want to copy /etc/skel/.ncbirc to your"
	einfo "current users home directories."
	einfo " "
	einfo "Be sure to see the /usr/share/doc/${PF} doc directory!"
	einfo " "
}