# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="The TIGR Gene Indices Clustering Tools (TGICL) for genomic data processing: tgicl, seqclean, cln2qual, mdust, trimpoly, zmsort, tclust, sclust, cdbfasta, psx" HOMEPAGE="http://compbio.dfci.harvard.edu/tgi/software/" for i in seqclean/{mdust,seqclean,seqcl_scripts,trimpoly} cdbfasta/cdbfasta \ tgicl/{mgblast,nrcl,psx,pvmsx,sclust,tclust,tgi_cpp_library,tgicl_linux,tgicl_scripts,zmsort} \ clview/clview_src clview/clview_linux_i386; do SRC_URI="${SRC_URI} ftp://occams.dfci.harvard.edu/pub/bio/tgi/software/${i}.tar.gz" done LICENSE="Artistic" SLOT="0" IUSE="pvm" KEYWORDS="~x86" DEPEND="pvm? ( sys-cluster/pvm ) x11-libs/fox" # mgblast needs old version of ncbi-tools unpacked and compiled during its own compilation # from newer tools you need to include blfmtutl.h but the next errir is no go: # mgblast.c:2205: error: too few arguments to function ‘BXMLBuildOneQueryIteration’ RDEPEND="${DEPEND} sci-biology/ncbi-tools sci-biology/cap3-bin dev-lang/perl" S=${WORKDIR} src_unpack() { unpack {nrcl,sclust,tclust,zmsort,mdust,seqclean,seqcl_scripts,trimpoly,cdbfasta,mgblast,tgi_cpp_library,tgicl_linux,tgicl_scripts,clview_src}.tar.gz for i in psx pvmsx; do mkdir "${S}"/${i} cd "${S}/${i}" unpack ${i}.tar.gz cd .. done cd clview unpack clview_linux_i386.tar.gz cd .. mv mgblast/makefile mgblast/Makefile } src_compile() { einfo "You might download UniVec from NCBI if you do not have your own" einfo "fasta file with vector sequences you want to remove from sequencing" einfo "reads. See http://www.ncbi.nlm.nih.gov/VecScreen/UniVec.html" # disable the necessity to install Mailer.pm with this tool einfo "Disabling mailer feature withing seqclean" sed -i 's/use Mailer;/#use Mailer;/' seqclean/seqclean ###################################################################### # clview with tgi_cl/gcl stuff cannot be compiled # # FIXME: we have to run `/usr/bin/fox-config --cflags' to yield # `-I/usr/include/fox-1.6' # similarly `fox-config --libs' to yield e.g. # `-lFOX-1.6 -lXext -lX11 -lXft -lXrender -lfontconfig -lfreetype -lz -lX11 # -lXcursor -lXrandr -ldl -lpthread -lrt -ljpeg -lpng -ltiff -lz -lbz2 -lm # -lcups -lnsl -lGLU -lGL' FOXINCPATH='-I/usr/include/fox-1.6' FOXLIBS='-lFOX-1.6 -lXext -lX11 -lXft -lXrender -lfontconfig -lfreetype -lz -lX11 -lXcursor -lXrandr -ldl -lpthread -lrt -ljpeg -lpng -ltiff -lz -lbz2 -lm -lcups -lnsl -lGLU -lGL' sed -i "s/FOXDIR := \/tucan\/src\/fox-1.0.3/#FOXDIR := \/tucan\/src\/fox-1.0.3/" clview/Makefile || die "a" sed -i 's#-I${FOXDIR}/include#-I/usr/include/fox-1.6#' clview/Makefile || die "d" sed -i "s#-L${FOXDIR}/src/.libs##" clview/Makefile || die "here" sed -i "s#LOADLIBES := -lm -lXext -lFOX#LOADLIBES := -lFOX-1.6 -lXext -lX11 -lXft -lXrender -lfontconfig -lfreetype -lz -lX11 -lXcursor -lXrandr -ldl -lpthread -lrt -ljpeg -lpng -ltiff -lz -lbz2 -lm -lcups -lnsl -lGLU -lGL#" clview/Makefile || die "v" sed -i "s#-I-#-iquote#" clview/Makefile # see tgi_cl/gcl/ sed -i "s#TGICLASSDIR := /tucan/geo/src/tgi_cl#TGICLASSDIR := ../tgi_cl#" clview/Makefile || die cd ${S}/clview # is used in conjunction with clview_src.tar.gz make cd .. ###################################################################### # mgblast cannot be compiled against newer ncbi-tools but let's try sed -i 's#/usr/local/projects/tgi/ncbitoolkit/ncbi#/usr#' mgblast/Makefile sed -i 's#NCBI_INCDIR = $(NCBI_TOOLKIT)/include#NCBI_INCDIR = $(NCBI_TOOLKIT)/include/ncbi#' mgblast/Makefile sed -i "s#-I-#-iquote#" mgblast/Makefile cd ${S}/mgblast make || cp ../tgicl_linux/bin/mgblast . cd .. sed -i 's/-V\t\tverbose/-V\t\tverbose\\/' zmsort/zmsort.cpp # the PVM-related binaries are compiled only when PVM is installed but # anyway, the binaries are available in tgicl_linux/bin/ just in case for i in nrcl cdbfasta mdust psx sclust tclust trimpoly zmsort $(use pvm && echo pvmsx); do sed -i 's/CFLAGS[ ]*=/CFLAGS :=/; s/-D_REENTRANT/-D_REENTRANT \${CFLAGS}/; s/CFLAGS[ ]*:=[ ]*-O2$//' \ ${S}/${i}/Makefile sed -i "s#-I-#-iquote#" ${S}/${i}/Makefile cd "${S}/${i}" || die "cd ${i} failed" emake || die "emake failed in ${i}" done } src_install() { dobin cdbfasta/{cdbfasta,cdbyank} dobin seqclean/{seqclean,cln2qual,bin/seqclean.psx} dobin tgicl_scripts/tgicl tgicl_scripts/bin/tgicl_asm.psx tgicl_scripts/bin/tgicl_cluster.psx # an old version of cap3 is available but we REQUIRE sci-biology/cap3-bin # newbin tgicl_linux/bin/cap3 /usr/bin/cap3.old for i in mgblast mdust psx sclust tclust trimpoly zmsort $(use pvm && echo pvmsx); do dobin ${i}/${i} done for i in cdbfasta seqclean tgicl_linux mgblast trimpoly tgicl_scripts; do newdoc ${i}/README README.${i} done # install at least the binaries for clview when we cannot compile it dobin clview/clview dolib clview/libFOX-1.0.so.0 dolib clview/libFOX-1.0.so.0.0.3 }