summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Dittrich <markusle@gentoo.org>2007-01-12 02:31:40 +0000
committerMarkus Dittrich <markusle@gentoo.org>2007-01-12 02:31:40 +0000
commit0a3a297c590e8e907e660a7824cf33d01b5fb15b (patch)
treed60714d3a0b6aaf2407053038ba1abee0b4f3767 /sci-astronomy
parentFixing keywords for now - thanks mr. b (diff)
downloadgentoo-2-0a3a297c590e8e907e660a7824cf33d01b5fb15b.tar.gz
gentoo-2-0a3a297c590e8e907e660a7824cf33d01b5fb15b.tar.bz2
gentoo-2-0a3a297c590e8e907e660a7824cf33d01b5fb15b.zip
Version bump and general ebuild overhaul (see bug #140991). Fixed predict-update script to resolve insecure temp file handling via wget (see bug #160130).
(Portage version: 2.1.2_rc4-r7)
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/predict/ChangeLog12
-rw-r--r--sci-astronomy/predict/files/digest-predict-2.2.2-r32
-rw-r--r--sci-astronomy/predict/files/digest-predict-2.2.33
-rw-r--r--sci-astronomy/predict/files/predict-update20
-rw-r--r--sci-astronomy/predict/predict-2.2.3.ebuild168
5 files changed, 195 insertions, 10 deletions
diff --git a/sci-astronomy/predict/ChangeLog b/sci-astronomy/predict/ChangeLog
index 37a492c82830..76b64e56bffc 100644
--- a/sci-astronomy/predict/ChangeLog
+++ b/sci-astronomy/predict/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-astronomy/predict
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/predict/ChangeLog,v 1.6 2005/12/08 00:53:27 cryos Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/predict/ChangeLog,v 1.7 2007/01/12 02:31:40 markusle Exp $
+
+*predict-2.2.3 (11 Jan 2007)
+
+ 11 Jan 2007; Markus Dittrich <markusle@gentoo.org> files/predict-update,
+ +predict-2.2.3.ebuild:
+ Version bump and general ebuild overhaul (see bug #140991). Fixed
+ predict-update script to resolve insecure temp file handling via
+ wget (see bug #160130).
08 Dec 2005; Marcus D. Hanwell <cryos@gentoo.org> predict-2.2.2-r3.ebuild:
Stable on amd64.
diff --git a/sci-astronomy/predict/files/digest-predict-2.2.2-r3 b/sci-astronomy/predict/files/digest-predict-2.2.2-r3
index 8786565e5599..4e4d2c185c83 100644
--- a/sci-astronomy/predict/files/digest-predict-2.2.2-r3
+++ b/sci-astronomy/predict/files/digest-predict-2.2.2-r3
@@ -1 +1,3 @@
MD5 2512bc6b584ece66de027e46f114ab53 predict-2.2.2.tar.gz 1637893
+RMD160 555db99142521408d2c24065972eaba16d8541e2 predict-2.2.2.tar.gz 1637893
+SHA256 6996bc4219483fb3bb0e33de5bd58bc7a921fad4298a951b5a6a3c97f8d95d7f predict-2.2.2.tar.gz 1637893
diff --git a/sci-astronomy/predict/files/digest-predict-2.2.3 b/sci-astronomy/predict/files/digest-predict-2.2.3
new file mode 100644
index 000000000000..46c28041b991
--- /dev/null
+++ b/sci-astronomy/predict/files/digest-predict-2.2.3
@@ -0,0 +1,3 @@
+MD5 8060cd69bcd54a21ec7994ee3665c1b8 predict-2.2.3.tar.gz 1639784
+RMD160 b0ec4efcad5ca530f787b2a83d3ba9bb80489d6e predict-2.2.3.tar.gz 1639784
+SHA256 fbaa7c78227a2216ee22b25c914c4dd538abfc22d96f0bb5d21e3e61976e5166 predict-2.2.3.tar.gz 1639784
diff --git a/sci-astronomy/predict/files/predict-update b/sci-astronomy/predict/files/predict-update
index d218fd18ed6d..b0634e148e46 100644
--- a/sci-astronomy/predict/files/predict-update
+++ b/sci-astronomy/predict/files/predict-update
@@ -1,8 +1,7 @@
#!/bin/sh
-PV=
+oldpwd=$PWD
if [ ! -f ~/.predict/predict.tle ]; then
- oldpwd=$PWD
mkdir -p ~/.predict
cd ~/.predict
cat > predict.tle << EOF
@@ -79,10 +78,15 @@ STARSHINE 3
1 26929U 02216.67548843 .00042169 00000-0 00000-0 0 9
2 26929 67.0426 246.5544 0011326 237.9129 122.0981 15.57367567 47636
EOF
- cd $oldpwd
fi
-wget -qc www.celestrak.com/NORAD/elements/amateur.txt -O /tmp/amateur.txt
-wget -qc www.celestrak.com/NORAD/elements/visual.txt -O /tmp/visual.txt
-wget -qc www.celestrak.com/NORAD/elements/weather.txt -O /tmp/weather.txt
-predict -u /tmp/amateur.txt /tmp/visual.txt /tmp/weather.txt
-rm /tmp/amateur.txt /tmp/visual.txt /tmp/weather.txt
+
+mkdir /tmp/predict-$$ || exit 1
+cd /tmp/predict-$$
+
+wget -qc www.celestrak.com/NORAD/elements/amateur.txt -O ./amateur.txt
+wget -qc www.celestrak.com/NORAD/elements/visual.txt -O ./visual.txt
+wget -qc www.celestrak.com/NORAD/elements/weather.txt -O ./weather.txt
+predict -u ./amateur.txt ./visual.txt ./weather.txt
+
+cd ${oldpwd}
+rm -fr /tmp/predict-$$
diff --git a/sci-astronomy/predict/predict-2.2.3.ebuild b/sci-astronomy/predict/predict-2.2.3.ebuild
new file mode 100644
index 000000000000..f13876f27641
--- /dev/null
+++ b/sci-astronomy/predict/predict-2.2.3.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/predict/predict-2.2.3.ebuild,v 1.1 2007/01/12 02:31:40 markusle Exp $
+
+inherit toolchain-funcs
+
+DESCRIPTION="Satellite tracking and orbital prediction."
+HOMEPAGE="http://www.qsl.net/kd2bd/predict.html"
+SRC_URI="http://www.amsat.org/amsat/ftp/software/Linux/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="xforms xplanet gtk nls"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="sys-libs/ncurses
+ gtk? ( =x11-libs/gtk+-1.2* )
+ xforms? ( x11-libs/xforms )
+ xplanet? ( || ( x11-misc/xplanet x11-misc/xearth ) )"
+
+src_compile() {
+ # predict uses a ncurses based configure script
+ # this is what it does if it was bash based ;)
+
+ # set compiler string to a var so if compiler checks
+ # can be added at a later date
+ COMPILER="$(tc-getCC) ${CFLAGS}"
+
+ # write predict.h
+ echo "char *predictpath=\"/usr/share/predict/\";" > predict.h
+ echo "char soundcard=1;" >> predict.h
+ echo "char *version=\"${PV}\";" >> predict.h
+
+ # compile predict
+ einfo "compiling predict"
+ ${COMPILER} -L/$(get_libdir) -lm -lncurses -lpthread predict.c -o predict || \
+ die "Failed compiling predict"
+
+ # write vocalizer.h
+ cd vocalizer
+ echo "char *path={\"/usr/share/predict/vocalizer/\"};" > vocalizer.h
+
+ # compile vocalizer
+ einfo "compiling vocalizer"
+ ${COMPILER} vocalizer.c -o vocalizer || \
+ die "Failed compiling vocalizer"
+
+ einfo "compiling clients"
+
+ # earthtrack
+ if use xplanet; then
+ einfo "compiling earthtrack"
+ cd ${S}/clients/earthtrack
+ # fix include path
+ sed -e "s:/usr/local/share/xplanet:/usr/share/xplanet:" \
+ -i earthtrack.c || die "Failed to fix xplanet paths"
+ ${COMPILER} -lm earthtrack.c -o earthtrack || \
+ die "Failed compiling earthtrack"
+ fi
+
+ # kep_reload
+ einfo "compiling kep_reload"
+ cd ${S}/clients/kep_reload
+ ${COMPILER} kep_reload.c -o kep_reload || \
+ die "Failed compiling kep_reload"
+
+ # map
+ if use xforms; then
+ einfo "compiling map"
+ cd ${S}/clients/map
+ TCOMP="${COMPILER} -I/usr/X11R6/include -L/usr/X11R6/$(get_libdir) -lforms -lX11 -lm map.c map_cb.c map_main.c -o map"
+ ${TCOMP} || die "Failed compiling map"
+ fi
+
+ # gsat
+ if use gtk; then
+ # note there are plugins for gsat but they are missing header files and wont compile
+ use nls || myconf="--disable-nls"
+ einfo "compiling gsat"
+ cd ${S}/clients/gsat-*
+ ./configure --prefix=/usr ${myconf}
+ cd src
+ sed -e "s:#define DEFAULTPLUGINSDIR .*:#define DEFAULTPLUGINSDIR \"/usr/$(get_libdir)/gsat/plugins/\":" -i globals.h
+ sed -e 's:int errno;::' -i globals.h
+ cd ..
+ emake || die "Failed compiling gsat"
+ fi
+}
+
+src_install() {
+ # install predict
+ cd ${S}
+ dobin predict ${FILESDIR}/predict-update
+ dodoc CHANGES COPYING CREDITS HISTORY README NEWS
+ dodoc docs/pdf/predict.pdf
+ dodoc docs/postscript/predict.ps
+ doman docs/man/predict.1
+
+ insinto /usr/share/${PN}/default
+ doins default/predict.*
+
+ #install vocalizer
+ exeinto /usr/bin
+ cd vocalizer
+ doexe vocalizer
+ dodir /usr/share/predict/vocalizer
+ insinto /usr/share/predict/vocalizer
+ dosym /usr/bin/vocalizer /usr/share/predict/vocalizer/vocalizer
+ doins *.wav || die "Failed to install vocalizer *.wav files"
+
+ # install clients
+
+ # earthtrack
+ if use xplanet; then
+ cd ${S}/clients/earthtrack
+ ln -s earthtrack earthtrack2
+ dobin earthtrack earthtrack2
+ mv README README.earthtrack && \
+ dodoc README.earthtrack || \
+ die "Failed to install earthtrack docs"
+ fi
+
+ # kep_reload
+ cd ${S}/clients/kep_reload
+ dobin kep_reload
+ mv INSTALL INSTALL.kep_reload && \
+ mv README README.kep_reload && \
+ dodoc INSTALL.kep_reload README.kep_reload || \
+ die "Failed to install kep_reload docs"
+
+ # map
+ if use xforms; then
+ cd ${S}/clients/map
+ dobin map
+ for i in CHANGES README COPYING; do
+ mv ${i} ${i}.map && dodoc ${i}.map || \
+ die "Failed to install xforms docs"
+ done
+ fi
+
+ # gsat
+ if use gtk; then
+ # the install seems broken so do manually...
+ cd ${S}/clients/gsat-*
+ dodir /usr/$(get_libdir)/gsat/plugins
+ keepdir /usr/$(get_libdir)/gsat/plugins
+ cd src
+ dobin gsat
+ cd ..
+ for i in AUTHORS ABOUT-NLS COPYING ChangeLog INSTALL NEWS README Plugin_API; do
+ mv ${i} ${i}.gsat && dodoc ${i}.gsat || \
+ die "Failed to install gsat docs"
+ done
+ fi
+}
+
+pkg_postinst() {
+ einfo "to use the clients the following line will"
+ einfo "have to be inserted into /etc/services"
+ einfo "predict 1210/udp"
+ einfo "the port can be changed to anything"
+ einfo "the name predict is what is needed to work"
+ einfo "after that is set run 'predict -s'"
+ einfo ""
+ einfo "to get list of satellites run 'predict-update'"
+ einfo "before running predict this script will also update"
+ einfo "the list of satellites so they are up to date."
+}