blob: 370bf1a732534dc861deed9e1b7f21c30af0ceb7 (
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
49
50
51
52
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit toolchain-funcs
MYP=Montage_v${PV}
DESCRIPTION="Astronomical image mosaic engine"
HOMEPAGE="http://montage.ipac.caltech.edu/"
SRC_URI="http://montage.ipac.caltech.edu/download/${MYP}.tar.gz
doc? ( http://montage.ipac.caltech.edu/docs/docs.tar.gz -> ${PN}-docs.tar.gz )"
LICENSE="Montage"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
SLOT="0"
IUSE="doc mpi"
# unfortunate upstream patching, cfitsio, wcstools, jpeg
# see docs/ExternalLibraries
RDEPEND=""
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MYP}"
src_prepare() {
use doc && mv "${WORKDIR}"/docs/* docs/
sed -i \
-e "/CC.*=/s:\(gcc\|cc\):$(tc-getCC):g" \
-e "/CFLAGS.*=/s:-g:${CFLAGS}:g" \
-e "s:ar q:$(tc-getAR) q:g" \
$(find . -name Makefile) || die
if use mpi; then
sed -i \
-e 's:# MPICC:MPICC:' \
-e 's:# BINS:BINS:' \
Montage/Makefile || die
fi
}
src_install () {
dobin bin/*
dodoc README ChangeHistory
if use doc; then
insinto /usr/share/doc/${PF}
doins -r docs/*
fi
}
|