summaryrefslogtreecommitdiff
path: root/sci-astronomy/predict
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-astronomy/predict
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-astronomy/predict')
-rw-r--r--sci-astronomy/predict/Manifest8
-rw-r--r--sci-astronomy/predict/files/predict-2.2.3-earthtrack.patch27
-rw-r--r--sci-astronomy/predict/files/predict-update92
-rw-r--r--sci-astronomy/predict/metadata.xml20
-rw-r--r--sci-astronomy/predict/predict-2.2.3-r2.ebuild207
5 files changed, 354 insertions, 0 deletions
diff --git a/sci-astronomy/predict/Manifest b/sci-astronomy/predict/Manifest
new file mode 100644
index 000000000000..4a1ecedb89ba
--- /dev/null
+++ b/sci-astronomy/predict/Manifest
@@ -0,0 +1,8 @@
+AUX predict-2.2.3-earthtrack.patch 1175 SHA256 d43fe03b11b472fe6818cba1e0b27329c99b3c4eadba585c75434aa122109aab SHA512 908d5b323606d2655787fb50f456fba894b87398bc55298d9ce99d065b6a7625a3c564a0a047011d83a31af640f3b0f8a1b38e467ec7017159601bb9bc237fd3 WHIRLPOOL 72f39cbf3c9018f8089548a720e87b4937b31862a27949ceea0ef21e8edb01200621e7b59c494b96a788cb4aac9936dff8c1dd9fd80b5997bed842629d5391ea
+AUX predict-update 4039 SHA256 83dbf5f5e08f7d017391f7cfa7a30730f8930dec195dfa60bcd075188275d892 SHA512 8bcc89babe25f44ca985776b994265a12be8e3d6390e4301594f7a8d1402d7d42aa66f6ae1ab6f51c2d8d910d9f012920382928c0238fce4e1707cb8843a739a WHIRLPOOL f3244a54311356f5ff53e7a5510268380c720e58fcc7dcb0af3001d0f619c3f13072694363e32321d0c3ef9727779cdabd5a8b4fd8b733eaea4a3dfe85721578
+DIST predict_2.2.3-3.1.diff.gz 78624 SHA256 60c00a542c399e69dba154cc0827ea15f33dae61547f3604b8c232e9d26d06df SHA512 9fe2e3ffd931be7ab85f10db4cd35a2091a459c3fd0c48e9ecf8a4482c20400c267b38d31f72d28270d50b7305bc49418fefe35ff013ac9be1627d853205bd5f WHIRLPOOL 9e2ed3fd43d556bb8c5ad92c9502574650cdf13116b222bdcbb7ee18d9e431cbfe8de6262f034dd9ab7abcebc940864c61911e4a0e26de2c6e14c24b9d17bc9d
+DIST predict_2.2.3.orig.tar.gz 1444530 SHA256 47b7c185f1cf4d318b6b31a22a533c03c4a3f57394839df036367c7cdf2dd7ff SHA512 260f7f4dbc72cca4b0b5f7bc9dcf612b8a7e3ef12ab6f34afa3c06b1ac24427435af1c4bae9d39e7cbcdff6cccad72e3235dd191605464642f014207651d8c11 WHIRLPOOL 69ee83befef0ce413c826e6034b6b7ea2ab12749b9dc7071badc865208fd89141451c1f887cbefae6c7f1ec5d8adbd0d112a62fb89e805ddbef984e42ab05a63
+EBUILD predict-2.2.3-r2.ebuild 5685 SHA256 35a651a018ff8487a72b82d3410c1e337699dc1325409d0c313c4d35c59a3928 SHA512 ef04cba114fb677519cf60bce037085535e0fbbfca0b9f22b10274534112cee862d7a86f2cd5220f21eeb5a4c4c70b23c00e163e8f15b0ea4b2806531283ec2d WHIRLPOOL d2b1bed2337554434215a8bef2cf302da79a156ac24c24c36207ca09df5b1dd618aa34662ad6cdd4ea227fc9c4537a676ce0d45b70950bf2be543d953e396a58
+MISC ChangeLog 3400 SHA256 ed9ad542c205d0d10f480972687e4e98a2fe280b62c916bac35e79ea4abfe566 SHA512 346b141fec3ff3246ac7bde9bc04158a1d96661f2da16e0a2b8a379834df4e5bb64347a0c0914bf57b9093f5be7a283455a281e2efbf3e4f5dd76ad094cd3d93 WHIRLPOOL 090694de37a2f46d840c67d99cec7e47fb02369b9051edeb86844e4fc54298eeb209eb598205f875990fd03b44a24a5515545587ad6aad8711b76565a7b4eec0
+MISC ChangeLog-2015 4600 SHA256 7647e8a9f3605a171fc75917649f8e6fb7d35a8540650219ab7181590feac546 SHA512 4db3c65a3069083bceca5d2d22afc60f61dbc87e2b3a69357b807b61d6eb16506e6bf5c5369c2c9af52c6bb745cc9e380bd7c3ba6c23a8bb4d70285b8def455b WHIRLPOOL 06c3ab5a5f56d251982d6927484855dc065e8a0f38d7bd0c53b59b2e4781061349d310f4c780a3c0b8a5cd0e93ea2d3a0857be841ae329720fce15721ebdc206
+MISC metadata.xml 836 SHA256 c536f704b5eb00528fe4373b6074b42e6aaf6067ede2719bc713350d50863ed9 SHA512 7e67a924a0b385cb051848bd1dd73d6a93ae60d13a10db785e96ead08df289137f06c67f17d519055b85aa228c1eca79db6da97494a532759c7c06c95e9c51d8 WHIRLPOOL 9564968d7c823e90cdcaa088152256a5c596430fadc689cbdf54c070679948bdd7f7aad35853ad9397ec73311ffd607d303245b73a971f5628e6c4b5f7bba9fb
diff --git a/sci-astronomy/predict/files/predict-2.2.3-earthtrack.patch b/sci-astronomy/predict/files/predict-2.2.3-earthtrack.patch
new file mode 100644
index 000000000000..65f18bf9512d
--- /dev/null
+++ b/sci-astronomy/predict/files/predict-2.2.3-earthtrack.patch
@@ -0,0 +1,27 @@
+diff -Nur a/clients/earthtrack/earthtrack.c b/clients/earthtrack/earthtrack.c
+--- a/clients/earthtrack/earthtrack.c 2013-06-08 20:03:55.629967192 +0200
++++ b/clients/earthtrack/earthtrack.c 2013-06-08 20:05:15.559966743 +0200
+@@ -495,11 +495,11 @@
+
+ fprintf(fd,"marker_file=%s\n",markerfile);
+ fprintf(fd,"arc_file=%s\n",greatarcfile);
+- fprintf(fd,"marker_font=/usr/local/share/xplanet/fonts/FreeMonoBold.ttf\n");
+- fprintf(fd,"\n## Your \"/usr/local/share/xplanet/config/default\" configuration file follows:\n\n");
++ fprintf(fd,"marker_font=/usr/share/xplanet/fonts/FreeMonoBold.ttf\n");
++ fprintf(fd,"\n## Your \"/usr/share/xplanet/config/default\" configuration file follows:\n\n");
+ fclose(fd);
+
+- x=AppendFile("/usr/local/share/xplanet/config/default",configfile);
++ x=AppendFile("/usr/share/xplanet/config/default",configfile);
+
+ if (x==1)
+ {
+@@ -509,7 +509,7 @@
+
+ if (x==2)
+ {
+- fprintf(stderr,"%c*** Error: Could not read \"/usr/local/share/xplanet/config/default\"\nIs xplanet installed?\n\n",7);
++ fprintf(stderr,"%c*** Error: Could not read \"/usr/share/xplanet/config/default\"\nIs xplanet installed?\n\n",7);
+ exit(-1);
+ }
+ }
diff --git a/sci-astronomy/predict/files/predict-update b/sci-astronomy/predict/files/predict-update
new file mode 100644
index 000000000000..b0634e148e46
--- /dev/null
+++ b/sci-astronomy/predict/files/predict-update
@@ -0,0 +1,92 @@
+#!/bin/sh
+oldpwd=$PWD
+
+if [ ! -f ~/.predict/predict.tle ]; then
+ mkdir -p ~/.predict
+ cd ~/.predict
+ cat > predict.tle << EOF
+OSCAR-10
+1 14129U 02217.21791401 .00000442 00000-0 00000-0 0 7
+2 14129 25.6686 197.8739 6086930 273.5039 23.0795 2.05866525116000
+OSCAR-11
+1 14781U 02217.20425383 .00001813 00000-0 00000-0 0 6
+2 14781 98.0880 185.1059 0010359 119.2373 240.9876 14.76997913987094
+OSCAR-14
+1 20437U 02217.20572416 .00000181 00000-0 00000-0 0 8
+2 20437 98.3009 264.9286 0011799 68.5863 291.6580 14.31121869654267
+PACSAT
+1 20439U 02217.25154490 .00000231 00000-0 00000-0 0 9
+2 20439 98.3472 275.4922 0012032 74.6777 285.5743 14.31332429654304
+LUSAT
+1 20442U 02216.75520291 .00000242 00000-0 00000-0 0 5
+2 20442 98.3779 280.4632 0012985 73.9191 286.3409 14.31575156654338
+OSCAR-20
+1 20480U 02217.54003808 -.00000027 00000-0 00000-0 0 7
+2 20480 99.0206 212.5786 0540948 90.2870 276.0202 12.83318863585245
+OSCAR-22
+1 21575U 02216.97001758 .00000422 00000-0 00000-0 0 9
+2 21575 98.1264 214.2386 0008207 17.4055 342.7413 14.38915947579867
+OSCAR-23
+1 22077U 02216.94266766 -.00000037 00000-0 00000-0 0 9
+2 22077 66.0844 179.5905 0009538 319.0308 40.9993 12.86398497468888
+OSCAR-25
+1 22828U 02217.51170770 .00000176 00000-0 00000-0 0 9
+2 22828 98.2949 253.2889 0010744 97.6953 262.5454 14.29395258429974
+ITAMSAT
+1 22826U 02216.71294910 .00000212 00000-0 00000-0 0 2
+2 22826 98.2981 252.2691 0009565 119.2021 241.0116 14.29035332461667
+OSCAR-27
+1 22825U 02217.14273416 .00000182 00000-0 00000-0 0 3
+2 22825 98.2952 251.6595 0009305 119.9116 240.3013 14.28824165461683
+OSCAR-29
+1 24278U 02216.92953700 -.00000035 00000-0 00000-0 0 1
+2 24278 98.5168 30.2010 0351470 9.0561 351.6706 13.52846361294584
+OSCAR-36
+1 25693U 02217.47022698 .00000460 00000-0 00000-0 0 8
+2 25693 64.5605 253.8004 0008708 253.5019 106.5150 14.74585281177168
+OSCAR-40
+1 26609U 02217.05030362 -.00000251 00000-0 00000-0 0 6
+2 26609 7.5635 101.4360 7924755 75.7827 352.4675 1.25596086 8104
+RS-12/13
+1 21089U 02216.81449027 .00000082 00000-0 00000-0 0 9
+2 21089 82.9235 328.1138 0030158 114.6154 245.8150 13.74373061576622
+RS-15
+1 23439U 02216.86493965 -.00000037 00000-0 00000-0 0 6
+2 23439 64.8185 1.1847 0152424 152.9684 207.9281 11.27546726313309
+NOAA-12
+1 21263U 02216.96410173 .00000410 00000-0 00000-0 0 4
+2 21263 98.6066 205.1774 0011736 236.4413 123.5645 14.24842312583078
+NOAA-14
+1 23455U 02216.94655308 .00000224 00000-0 00000-0 0 1
+2 23455 99.1906 225.2382 0010223 66.1025 294.1215 14.13170722391563
+NOAA-15
+1 25338U 02216.96832533 .00000312 00000-0 00000-0 0 0
+2 25338 98.5657 239.3255 0010503 167.6220 192.5219 14.24094451219673
+UARS
+1 21701U 02217.09598012 .00001106 00000-0 00000-0 0 8
+2 21701 56.9808 110.9304 0004474 115.3921 244.7510 15.02171395596038
+HUBBLE
+1 20580U 02217.09786941 .00002710 00000-0 00000-0 0 4
+2 20580 28.4663 239.6798 0003524 339.3283 57.0940 14.96472945473016
+ISS
+1 25544U 02217.52476852 .00025143 00000-0 00000-0 0 9
+2 25544 51.6355 165.2615 0018093 106.6267 56.5198 15.57209040211722
+PCSAT
+1 26931U 02217.22743486 .00000269 00000-0 00000-0 0 9
+2 26931 67.0531 43.5764 0007786 258.8522 101.1704 14.28921812 44150
+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
+fi
+
+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/metadata.xml b/sci-astronomy/predict/metadata.xml
new file mode 100644
index 000000000000..f5e4e6e1fe77
--- /dev/null
+++ b/sci-astronomy/predict/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+</maintainer>
+<longdescription lang="en">
+ Predict is a satellite tracking program. It is probably mostly of interest
+ to users of amateur satellites, but includes support for optionally
+ announcing azimuth and elevation to help in manual antenna pointing,
+ or optical observation of satellites.
+</longdescription>
+<use>
+ <flag name="xforms">Add a "map" client which uses the
+ <pkg>x11-libs/xforms</pkg> library for its GUI</flag>
+ <flag name="xplanet">Project predict data onto world maps generated by
+ <pkg>x11-misc/xplanet</pkg> / <pkg>x11-misc/xearth</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/sci-astronomy/predict/predict-2.2.3-r2.ebuild b/sci-astronomy/predict/predict-2.2.3-r2.ebuild
new file mode 100644
index 000000000000..bca4d52f5976
--- /dev/null
+++ b/sci-astronomy/predict/predict-2.2.3-r2.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools toolchain-funcs
+
+DEB_P=${PN}_${PV}
+DEB_PR=3.1
+
+DESCRIPTION="Satellite tracking and orbital prediction"
+HOMEPAGE="http://www.qsl.net/kd2bd/predict.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${DEB_P}-${DEB_PR}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="doc gtk nls xforms xplanet"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="sys-libs/ncurses:0=
+ gtk? ( x11-libs/gtk+:2 )
+ xforms? ( x11-libs/xforms )
+ xplanet? ( x11-misc/xplanet[truetype] )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/"${P}"-earthtrack.patch
+ "${WORKDIR}"/${DEB_P}-${DEB_PR}.diff
+)
+
+src_prepare() {
+ default
+ sed -i -e 's:predict\(.*\)/:predict-2.2.3\1/:g' \
+ debian/patches/140*.diff || die
+ sed -i -e 's:\(a\|b\)/:predict-2.2.3/:g' \
+ debian/patches/180*.diff || die
+ eapply debian/patches/.
+ # fix some further array out of bounds errors
+ sed -i -e "s/satname\[ 26/satname\[ 25/g" \
+ clients/gsat-1.1.0/src/db.c || die
+ sed -i -e "s/satname\[ 26/satname\[ 25/g" \
+ clients/gsat-1.1.0/src/comms.c || die
+ sed -i -e "s/output\[20\];/output[21];/" \
+ utils/moontracker/moontracker.c || die
+ # fix underlinking
+ sed -i -e '/AC_OUTPUT/i \
+AC_SEARCH_LIBS([cos], [m]) \
+AC_SEARCH_LIBS([dlclose], [dl])' \
+ -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' \
+ -e 's/configure.in/configure.ac/' \
+ clients/gsat-1.1.0/configure.in || die
+
+ mv clients/gsat-1.1.0/configure.{in,ac} || die
+
+ sed -i \
+ -e 's/gcc/$(CC) $(CFLAGS) $(LDFLAGS)/g' \
+ -e 's/-o/-lm -o/g' \
+ clients/gsat-1.1.0/plugins/Makefile || die
+
+ # fix the hardcoded /usr/lib
+ PRED_DIR=/usr/$(get_libdir)/${PN}
+ sed -i -e "s:/usr/lib/${PN}:${EPREFIX}/${PRED_DIR}:g" \
+ predict.h vocalizer/vocalizer.c || die
+
+ sed -i -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):g" \
+ clients/gsat-1.1.0/src/globals.h || die
+
+ if use gtk; then
+ cd "${S}"/clients/gsat-* || die
+ rm config.sub missing || die
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ if use gtk; then
+ cd "${S}"/clients/gsat-* || die
+ econf $(use_enable nls)
+ fi
+}
+
+src_compile() {
+ # predict uses a ncurses based configure script
+ # this is what it does if it was bash based ;)
+
+ local COMPILER="$(tc-getCC) ${CFLAGS} ${LDFLAGS}"
+ einfo "Compiling predict"
+ ${COMPILER} predict.c -lm $($(tc-getPKG_CONFIG) --libs ncurses) -lpthread \
+ -o predict || die "failed predict"
+ einfo "Compiling predict-g1yyh"
+ ${COMPILER} predict-g1yyh.c -lm $($(tc-getPKG_CONFIG) --libs ncurses) -lpthread -lmenu \
+ -o predict-g1yyh || die "failed predict-g1yyh"
+ einfo "Compiling vocalizer"
+ ${COMPILER} vocalizer/vocalizer.c \
+ -o vocalizer/vocalizer || die "failed vocalizer"
+ local c
+ for c in fodtrack geosat moontracker; do
+ einfo "Compiling ${c}"
+ cd "${S}"/utils/${c}* || die
+ ${COMPILER} ${c}.c -lm -o ${c} || die "failed ${c}"
+ done
+ einfo "Compiling kep_reload"
+ cd "${S}"/clients/kep_reload
+ ${COMPILER} kep_reload.c \
+ -o kep_reload || die "failed kep_reload"
+
+ if use xplanet; then
+ einfo "Compiling earthtrack"
+ cd "${S}"/clients/earthtrack || die
+ ${COMPILER} earthtrack.c \
+ -lm -o earthtrack || die "failed earthtrack"
+ fi
+
+ if use xforms; then
+ einfo "Compiling map"
+ cd "${S}"/clients/map || die
+ ${COMPILER} map.c map_cb.c map_main.c -lforms -lX11 -lm \
+ -o map || die "Failed compiling map"
+ fi
+
+ if use gtk; then
+ einfo "Compiling gsat"
+ cd "${S}"/clients/gsat-* || die
+ emake
+ emake -C plugins
+ fi
+}
+
+src_install() {
+ dobin predict predict-g1yyh "${FILESDIR}"/predict-update
+ dodoc CHANGES CREDITS HISTORY README NEWS debian/README.Debian
+ doman docs/man/predict.1
+ newman debian/predict-g1yyh.man predict-g1yyh.1
+ insinto ${PRED_DIR}/default
+ doins default/predict.*
+ use doc && dodoc docs/pdf/predict.pdf
+
+ cd "${S}"/vocalizer || die
+ dobin vocalizer
+ dosym ../../../bin/vocalizer ${PRED_DIR}/vocalizer/vocalizer
+ insinto ${PRED_DIR}/vocalizer
+ doins *.wav
+
+ cd "${S}"/clients/kep_reload || die
+ dobin kep_reload
+ newdoc README README.kep_reload
+ doman "${S}"/debian/kep_reload.1
+
+ cd "${S}"/utils/fodtrack-0.1 || die
+ insinto /etc
+ doins fodtrack.conf
+ doman fodtrack.conf.5 fodtrack.8
+ dobin fodtrack
+ newdoc README README.fodtrack
+
+ cd "${S}"/utils/geosat || die
+ dobin geosat
+ newdoc README README.geosa
+ newman "${S}"/debian/geosat.man geosat.1
+
+ cd "${S}"/utils/moontracker || die
+ dobin moontracker
+ newdoc README README.moontracker
+ doman "${S}"/debian/moontracker.1
+
+ if use xplanet; then
+ cd "${S}"/clients/earthtrack || die
+ ln -s earthtrack earthtrack2 || die
+ dobin earthtrack earthtrack2
+ newdoc README README.earthtrack
+ doman "${S}"/debian/earthtrack.1
+ fi
+
+ if use xforms; then
+ cd "${S}"/clients/map || die
+ newbin map predict-map
+ newdoc CHANGES CHANGES.map
+ newdoc README README.map
+ doman "${S}"/debian/predict-map.1
+ fi
+
+ if use gtk; then
+ cd "${S}"/clients/gsat-* || die
+ exeinto /usr/$(get_libdir)/gsat/plugins
+ doexe plugins/radio_{FT736,FT847,ICR10,print,test} plugins/rotor_{print,pictrack}
+ dobin src/gsat
+ doman "${S}"/debian/gsat.1
+ local i
+ for i in AUTHORS ChangeLog NEWS README Plugin_API; do
+ newdoc ${i} ${i}.gsat
+ 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."
+}