blob: 33e1d7d00d605d372415c63b8c476f0da9205ae2 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=2
inherit eutils
DESCRIPTION="General-Use FTools for manipulating and inspecting FITS files"
HOMEPAGE="http://heasarc.gsfc.nasa.gov/docs/software/ftools/ftools_menu.html"
SRC_URI="heasoft${PV}src.tar.gz"
LICENSE="GPLv2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
RESTRICT="test"
DEPEND="x11-base/xorg-server"
RDEPEND="${DEPEND}"
S="${WORKDIR}/heasoft-${PV}/"
PREFIX="/usr/heasoft-${PV}"
MSG="The HEASOFT General-Use FTools have been installed into
$PREFIX.
To use the HEASOFT, you need to set the HEADAS environment
variable, and source the headas init script, like so
export HEADAS=\"${PREFIX}/<arch-dependent-dir>\"
. \${HEADAS}/headas-init.sh
if you are using a bourne-shell. There is also an initscript
for C-shells in the same directory as the one for bourne-shells."
src_prepare() {
for subdir in tcl tk; do
cd "${S}"/tcltk/${subdir}/unix
epatch "${FILESDIR}"/installManPage-S-namecollision.patch \
|| die "epatch failed"
done
}
src_configure() {
[[ -d "${PREFIX}" ]] && die "Please unmerge previous installation."
ewarn "This ebuild is no good."
cd BUILD_DIR
econf --prefix="${PREFIX}" || die "econf failed"
}
src_compile() {
cd BUILD_DIR
emake || die "emake failed"
echo "${MSG}" > WTF
}
src_install() {
# The heasoft install scripts don't allow for $DESTDIR. Thus we
# must let headas install itself. This is very, very bad.
addwrite "${PREFIX}"
einfo "Installing into ${PREFIX} directly..."
cd BUILD_DIR
# Hell knows why we need -j1 here. But we sure need it.
emake -j1 install || die "emake install failed"
einfo "Moving ${PREFIX} to image directory..."
mkdir "${D}"/usr
mv "${PREFIX}" "${D}"/usr
dodoc WTF
elog "${MSG}"
}
|