summaryrefslogtreecommitdiff
path: root/sci-biology/mrbayes/mrbayes-3.1.2-r2.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-biology/mrbayes/mrbayes-3.1.2-r2.ebuild
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-biology/mrbayes/mrbayes-3.1.2-r2.ebuild')
-rw-r--r--sci-biology/mrbayes/mrbayes-3.1.2-r2.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/sci-biology/mrbayes/mrbayes-3.1.2-r2.ebuild b/sci-biology/mrbayes/mrbayes-3.1.2-r2.ebuild
new file mode 100644
index 000000000000..ebe9926212c9
--- /dev/null
+++ b/sci-biology/mrbayes/mrbayes-3.1.2-r2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Bayesian Inference of Phylogeny"
+HOMEPAGE="http://mrbayes.csit.fsu.edu/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
+IUSE="debug mpi readline"
+
+DEPEND="
+ sys-libs/ncurses:0=
+ mpi? ( virtual/mpi )
+ readline? ( sys-libs/readline:0= )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ if use mpi; then
+ sed -e "s:MPI ?= no:MPI=yes:" -i Makefile || die "Patching MPI support."
+ fi
+ if ! use readline; then
+ sed -e "s:USEREADLINE ?= yes:USEREADLINE=no:" \
+ -i Makefile || die "Patching readline support."
+ else
+ # Only needed for OSX with an old (4.x) version of
+ # libreadline, but it doesn't hurt for other distributions.
+ epatch "${FILESDIR}"/mb_readline_312.patch
+ fi
+ sed -e 's:-ggdb::g' -i Makefile || die
+}
+
+src_compile() {
+ local myconf mycc
+
+ if use mpi; then
+ mycc=mpicc
+ else
+ mycc=$(tc-getCC)
+ fi
+
+ use mpi && myconf="MPI=yes"
+ use readline || myconf="${myconf} USEREADLINE=no"
+ use debug && myconf="${myconf} DEBUG=yes"
+ emake \
+ OPTFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC=${mycc} \
+ ${myconf}
+}
+
+src_install() {
+ dobin mb
+ insinto /usr/share/${PN}
+ doins *.nex
+}