* [gentoo-science] New sci-astronomy/ftools-6.6.2.ebuild
@ 2009-04-23 13:09 Henry Gebhardt
0 siblings, 0 replies; only message in thread
From: Henry Gebhardt @ 2009-04-23 13:09 UTC (permalink / raw
To: gentoo-science
[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]
Hi everyone,
I have created an ebuild for the ftools from heasarc, used
for inspecting and manipulating astronomical FITS files[1].
As those are widely used in the astronomical community,
I think they would make a great addition to Gentoo.
Unfortunately, the attached ebuild has several problems.
1.) LICENSE="UNKOWN": Does anyone know what the
correct license is?
2.) SRC_URI: What should it be set to? Currently, you will
have to download the tarball yourself from [2], choose only
the "General-Use FTOOLS", nothing else.
3.) The ebuild only works with "General-Use FTOOLS",
no XSpec. Ideally there would be a USE="xspec", but
how to do that. I don't use XSpec, so wont investigate
further for now. Maybe the ebuild could auto-detect what
the user downloaded?
4.) DESTDIR: The src_install() function does an
"addwrite /usr/heasoft-6.6.2" to let the heasoft tools
make the install. Better would be for them to support
the $DESTDIR variable, but I have tried and failed.
Maybe it's ok?
5.) Reinstall: Due to the previous item, you have to
"emerge -C ftools" before reinstalling. Can that be
automated? Currently, it just fails, telling you to unmerge.
6.) Sourcing "$HEADAS/headas-init.sh" is still needed to
be done by the user.
Any help is much appreciated.
Greetings,
Henry
[1] http://heasarc.nasa.gov/lheasoft/ftools/ftools_menu.html
[2] http://heasarc.nasa.gov/lheasoft/download.html
[-- Attachment #2: installManPage-S-namecollision.patch --]
[-- Type: application/octet-stream, Size: 786 bytes --]
diff --git a/tcltk/tcl/unix/installManPage b/tcltk/tcl/unix/installManPage
index 93fd925..765d838 100755
--- a/tcltk/tcl/unix/installManPage
+++ b/tcltk/tcl/unix/installManPage
@@ -3,7 +3,7 @@
ZIP=:
while true; do
case $1 in
- -s | --symlinks ) S="-s ";;
+ -s | --symlinks ) SYM="-s ";;
-z | --compress ) ZIP=$2; shift ;;
-e | --extension ) Z=$2; shift ;;
-s | --suffix ) SUFFIX=$2; shift ;;
@@ -18,7 +18,7 @@ fi
MANPAGE=$1
DIR=$2
-test -z "$S" && S="$DIR/"
+test -z "$SYM" && SYM="$DIR/"
# A sed script to parse the alternative names out of a man page.
#
@@ -62,6 +62,6 @@ for f in $NAMES; do
$ZIP $DIR/$FIRST
else
rm -f $DIR/$f $DIR/$f.*
- ln $S$FIRST$Z $DIR/$f$Z
+ ln $SYM$FIRST$Z $DIR/$f$Z
fi
done
[-- Attachment #3: ftools-6.6.2.ebuild --]
[-- Type: application/octet-stream, Size: 2003 bytes --]
# 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="UNKOWN"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
RESTRICT="test"
DEPEND="x11-base/xorg-server
>=dev-lang/perl-5.6.0"
RDEPEND="${DEPEND}"
S="${WORKDIR}/heasoft-${PV}/BUILD_DIR"
PREFIX="/usr/heasoft-${PV}"
MSG="The HEASOFT General-Use FTools have been installed into
${PREFIX}.
To use the HEASOFT, you need to source the headas init script,
like so
. \${HEADAS}/headas-init.sh
if you are using a bourne-shell. As a shortcut you can put an
alias in your ~/.bashrc:
alias heainit=\". \${HEADAS}/headas-init.sh\"
C-shells should source \${HEADAS}/headas-init.csh instead.
The environment vairable \${HEADAS} has been defined for you
globally in /etc/env.d/99headas."
pkg_setup() {
[[ -d "${PREFIX}" ]] && die "Please unmerge previous installation."
ewarn "This ebuild works but doesn't do things as god intended..."
}
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() {
econf --prefix="${PREFIX}" || die "econf failed"
}
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..."
# 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
echo "${MSG}" > WTF
dodoc WTF
echo "HEADAS=\"`grep "HD_TOP_EXEC_PFX.*= " Makefile | sed "s#^HD_TOP_EXEC_PFX.*= ##"`\"" > 99headas
doenvd 99headas
}
pkg_postinst() {
elog "${MSG}"
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-23 13:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-23 13:09 [gentoo-science] New sci-astronomy/ftools-6.6.2.ebuild Henry Gebhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox