aboutsummaryrefslogtreecommitdiff
blob: 9714090007e8b3d90ce203cfce0eee6d1f23e935 (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-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit eutils

DESCRIPTION="Photometric redshift estimator for galaxies"
HOMEPAGE="http://www.astro.yale.edu/eazy/?home"
SRC_URI="http://www.astro.yale.edu/eazy/download/${P}.tar.gz"

LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples"

RDEPEND=""
DEPEND="${RDEPEND}
	doc? ( virtual/latex-base )"

src_prepare() {
	epatch "${FILESDIR}"/${P}-makefile.patch
}

src_compile() {
	emake -C src
	use doc && emake -C doc
}

src_test() {
	cd inputs
	../src/eazy
	mv zphot.param.default zphot.param
	../src/eazy || die
}

src_install() {
	dobin src/eazy
	insinto /usr/share/eazy
	doins -r templates
	use doc && dodoc doc/eazy_manual.pdf
	if use examples; then
		cd inputs
		rm templates
		insinto /usr/share/doc/${PF}
		doins -r *
	fi
}