summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-03-01 09:14:24 +0000
committerJustin Lecher <jlec@gentoo.org>2013-03-01 09:14:24 +0000
commitdff693a83e1a4a4128042e565fc03f30a8ee07b9 (patch)
tree27b6bd50caf1a28cf4b9765db39b5f8a9903af76 /sci-biology
parentDon't build for python 2.4. (diff)
downloadgentoo-2-dff693a83e1a4a4128042e565fc03f30a8ee07b9.tar.gz
gentoo-2-dff693a83e1a4a4128042e565fc03f30a8ee07b9.tar.bz2
gentoo-2-dff693a83e1a4a4128042e565fc03f30a8ee07b9.zip
sci-biology/ncbi-tools: Clean heuristic to fix build env, #459720 and #459726
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/ncbi-tools/ChangeLog7
-rw-r--r--sci-biology/ncbi-tools/ncbi-tools-2.2.26-r1.ebuild153
2 files changed, 159 insertions, 1 deletions
diff --git a/sci-biology/ncbi-tools/ChangeLog b/sci-biology/ncbi-tools/ChangeLog
index b74895569524..559f9a2b0024 100644
--- a/sci-biology/ncbi-tools/ChangeLog
+++ b/sci-biology/ncbi-tools/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-biology/ncbi-tools
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/ncbi-tools/ChangeLog,v 1.87 2013/02/18 12:53:27 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/ncbi-tools/ChangeLog,v 1.88 2013/03/01 09:14:24 jlec Exp $
+
+*ncbi-tools-2.2.26-r1 (01 Mar 2013)
+
+ 01 Mar 2013; Justin Lecher <jlec@gentoo.org> +ncbi-tools-2.2.26-r1.ebuild:
+ Clean heuristic to fix build env, #459720 and #459726
18 Feb 2013; Justin Lecher <jlec@gentoo.org> ncbi-tools-0.20080302.ebuild,
ncbi-tools-0.20090809.ebuild, ncbi-tools-2.2.26.ebuild,
diff --git a/sci-biology/ncbi-tools/ncbi-tools-2.2.26-r1.ebuild b/sci-biology/ncbi-tools/ncbi-tools-2.2.26-r1.ebuild
new file mode 100644
index 000000000000..a9f6b23ec9df
--- /dev/null
+++ b/sci-biology/ncbi-tools/ncbi-tools-2.2.26-r1.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/ncbi-tools/ncbi-tools-2.2.26-r1.ebuild,v 1.1 2013/03/01 09:14:24 jlec Exp $
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Development toolkit and applications for computational biology, including NCBI BLAST"
+HOMEPAGE="http://www.ncbi.nlm.nih.gov/"
+SRC_URI="ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release/${PV}/ncbi.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="~alpha ~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc static-libs X"
+
+RDEPEND="
+ app-shells/tcsh
+ dev-lang/perl
+ media-libs/libpng
+ X? ( x11-libs/motif:0 )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/ncbi"
+
+EXTRA_VIB="asn2all asn2asn"
+
+pkg_setup() {
+ echo
+ ewarn 'Please note that the NCBI toolkit (and especially the X'
+ ewarn 'applications) are known to have compilation and run-time'
+ ewarn 'problems when compiled with agressive compilation flags. The'
+ ewarn '"-O3" flag is filtered by the ebuild on the x86 architecture if'
+ ewarn 'X support is enabled.'
+ echo
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-extra_vib.patch
+
+ if use ppc || use ppc64; then
+ epatch "${FILESDIR}"/${PN}-lop.patch
+ fi
+
+ if ! use X; then
+ sed \
+ -e "s:\#set HAVE_OGL=0:set HAVE_OGL=0:" \
+ -e "s:\#set HAVE_MOTIF=0:set HAVE_MOTIF=0:" \
+ -i "${S}"/make/makedis.csh || die
+ else
+ # X applications segfault on startup on x86 with -O3.
+ use x86 || replace-flags '-O3' '-O2'
+ fi
+
+ # Apply user C flags...
+ cd "${S}"/platform
+ sed \
+ -e 's:-O[23]\?::g' \
+ -e 's:-m\(cpu\|arch\)=[a-zA-Z0-9]*::g' \
+ -e 's:-x[A-Z]*::g' \
+ -e 's:-pipe::g' \
+ -e "/NCBI_MAKE_SHELL *=/s:=.*:= \"${EPREFIX}\"/bin/sh:g" \
+ -e "/NCBI_AR *=/s:ar:$(tc-getAR):g" \
+ -e "/NCBI_RANLIB *=/s:ranlib:$(tc-getRANLIB):g" \
+ -e "/NCBI_CC *=/s:= [a-zA-Z0-9]* := $(tc-getCC) :g" \
+ -e "/NCBI_OPTFLAG *=/s:$: ${CFLAGS}:g" \
+ -e "/NCBI_LDFLAGS1 *=/s:$: ${CFLAGS} ${LDFLAGS}:g" \
+ -e "/NCBI_OGLLIBS *=/s:=.*:= $($(tc-getPKG_CONFIG) --cflags gl glu 2>/dev/null):g" \
+ -e "/OPENGL_LIBS *=/s:=.*:= $($(tc-getPKG_CONFIG) --libs gl glu 2>/dev/null):g" \
+ -e "/NCBI_OGLLIBS *=/s:=.*:= $($(tc-getPKG_CONFIG) --libs gl glu 2>/dev/null):g" \
+ -i linux-x86.ncbi.mk linux-alpha.ncbi.mk hppalinux.ncbi.mk \
+ ppclinux.ncbi.mk linux64.ncbi.mk linux.ncbi.mk || die
+
+ # We use dynamic libraries
+ sed -i -e "s/-Wl,-Bstatic//" *linux*.ncbi.mk || die
+
+ sed \
+ -re "s:/usr(/bin/.*sh):\1:g" \
+ -e "s:(/bin/.*sh):${EPREFIX}\1:g" \
+ -i $(find "${S}" -type f) || die
+}
+
+src_compile() {
+ export EXTRA_VIB
+ cd "${WORKDIR}"
+ csh ncbi/make/makedis.csh || die
+ mkdir "${S}"/cgi "${S}"/real || die
+ mv "${S}"/bin/*.cgi "${S}"/cgi || die
+ mv "${S}"/bin/*.REAL "${S}"/real || die
+ cd "${S}"/demo
+ emake \
+ -f ../make/makenet.unx \
+ CC="$(tc-getCC) ${CFLAGS} -I../include -L../lib" \
+ LDFLAGS="${LDFLAGS}" \
+ spidey
+ cp spidey ../bin/ || die
+}
+
+src_install() {
+ #sci-geosciences/cdat-lite
+ mv "${S}"/bin/cdscan "${S}"/bin/cdscan-ncbi || die
+
+ dobin "${S}"/bin/*
+
+ for i in ${EXTRA_VIB}; do
+ dobin "${S}"/build/${i} || die "Failed to install binaries."
+ done
+ use static-libs && dolib.a "${S}"/lib/*.a
+ mkdir -p "${ED}"/usr/include/ncbi
+ cp -RL "${S}"/include/* "${ED}"/usr/include/ncbi || \
+ die "Failed to install headers."
+
+ # TODO: wwwblast with webapps
+ #insinto /usr/share/ncbi/lib/cgi
+ #doins ${S}/cgi/*
+ #insinto /usr/share/ncbi/lib/real
+ #doins ${S}/real/*
+
+ # Basic documentation
+ dodoc "${S}"/{README,VERSION,doc/{*.txt,README.*}}
+ newdoc "${S}"/doc/fa2htgs/README README.fa2htgs
+ newdoc "${S}"/config/README README.config
+ newdoc "${S}"/network/encrypt/README README.encrypt
+ newdoc "${S}"/network/nsclilib/readme README.nsclilib
+ newdoc "${S}"/sequin/README README.sequin
+ mv "${S}"/doc/man/fmerge{,-ncbi}.1 || die
+ doman "${S}"/doc/man/*
+
+ # Hypertext user documentation
+ dohtml "${S}"/{README.htm,doc/{*.html,*.htm,*.gif}}
+ insinto /usr/share/doc/${PF}/html
+ doins -r "${S}"/doc/blast "${S}"/doc/images "${S}"/doc/seq_install
+
+ # Developer documentation
+ if use doc; then
+ # Demo programs
+ mkdir "${ED}"/usr/share/ncbi
+ mv "${S}"/demo "${ED}"/usr/share/ncbi/demo || die
+ fi
+
+ # Shared data (similarity matrices and such) and database directory.
+ insinto /usr/share/ncbi
+ doins -r "${S}"/data
+ dodir /usr/share/ncbi/formatdb
+
+ # Default config file to set the path for shared data.
+ insinto /etc/ncbi
+ newins "${FILESDIR}"/ncbirc .ncbirc
+
+ # Env file to set the location of the config file and BLAST databases.
+ newenvd "${FILESDIR}"/21ncbi-r1 21ncbi
+}