blob: 7e044056946d3b14f1e4b92f87fef65ad93ee443 (
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
53
54
55
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
inherit eutils 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() {
epatch "${FILESDIR}"/${P}-gcc48.patch
use doc && mv "${WORKDIR}"/docs/* docs/
tc-export CC AR
find . -name Makefile\* | xargs sed -i \
-e "/^CC.*=/s:\(gcc\|cc\):$(tc-getCC):g" \
-e "/^CFLAGS.*=/s:-g:${CFLAGS}:g" \
-e "s:ar q:$(tc-getAR) q:g" || 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
}
|