summaryrefslogtreecommitdiff
blob: 7868859871b93802e2643a9e5640747c7c9cb3f1 (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit toolchain-funcs versionator

MY_P=$(version_format_string '${PN}$1$2')

DESCRIPTION="Phylogenetic Analysis by Maximum Likelihood"
HOMEPAGE="http://abacus.gene.ucl.ac.uk/software/paml.html"
SRC_URI="http://abacus.gene.ucl.ac.uk/software/${PN}${PV}.tar.gz"

LICENSE="free-noncomm"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""

S=${WORKDIR}/${MY_P}

src_prepare() {
	# Notice send by mail to prof. Ziheng Yang
	sed -i "s/\$(CC)/& \$(LDFLAGS)/" src/Makefile || die #335608
}

src_compile() {
	emake -C src \
		CC="$(tc-getCC)" \
		CFLAGS="${CFLAGS} -Wno-unused-result" \
		LDFLAGS="${LDFLAGS}"
}

src_install() {
	dodoc README.txt doc/*

	insinto /usr/share/${PN}/control
	doins *.ctl

	insinto /usr/share/${PN}/dat
	doins stewart* *.dat dat/*

	insinto /usr/share/${PN}
	doins -r examples/

	cd src || die
	dobin baseml codeml basemlg mcmctree pamp evolver yn00 chi2
}