mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
comms/predict: update to 2.3.1
[upstream changes] Release 2.3.1: By John A. Magliacane <kd2bd@amsat.org> (05-Aug-2023): * Fixed a bug that caused the "Upcoming Passes" list in Multi-Satellite tracking mode to occasionally produce erroneous results if one or more satellites in the database had decayed from orbit. * The Vocalizer feature was modified to prevent it from being executed by a user keyboard command until after the current speech announcement has terminated. * The earthtrack compilation script was modified to prevent the "undefined reference" errors some users experienced during the linking phase of the compilation process. * All references to www.celestrak.com in the "kepupdate" script have been changed to celestrak.org due to the site's name change. * Several other small coding changes were made. ---------------------------------------------------------------------------- [db changes] - Upstream does not come with a proper build infrastructure hence build is done in our port Makefile now instead of copied Makefile. - portlint and portfmt ran clearly as did poudriere. - Added earthtrack, kepupdate and moontracker binaries but did not add gsat which should be a separate port IMO PR: 277986 Reported by: Andrey Korobkov <alster@vinterdalen.se>
This commit is contained in:
parent
39950bb190
commit
730d2d9c02
9 changed files with 112 additions and 45 deletions
|
@ -1,6 +1,5 @@
|
||||||
PORTNAME= predict
|
PORTNAME= predict
|
||||||
PORTVERSION= 2.2.7
|
PORTVERSION= 2.3.1
|
||||||
PORTREVISION= 1
|
|
||||||
CATEGORIES= comms astro hamradio
|
CATEGORIES= comms astro hamradio
|
||||||
MASTER_SITES= https://www.qsl.net/kd2bd/ \
|
MASTER_SITES= https://www.qsl.net/kd2bd/ \
|
||||||
LOCAL/db
|
LOCAL/db
|
||||||
|
@ -10,19 +9,42 @@ COMMENT= Satellite tracking program for amateur radio satellites
|
||||||
WWW= https://www.qsl.net/kd2bd/predict.html
|
WWW= https://www.qsl.net/kd2bd/predict.html
|
||||||
|
|
||||||
LICENSE= GPLv2
|
LICENSE= GPLv2
|
||||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||||
|
|
||||||
LIB_DEPENDS= libasound.so:audio/alsa-lib
|
LIB_DEPENDS= libasound.so:audio/alsa-lib
|
||||||
|
|
||||||
USES= ncurses
|
USES= ncurses
|
||||||
INSTALL_TARGET= install install.man
|
|
||||||
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" PREFIX="${PREFIX}" STAGEDIR="${STAGEDIR}"
|
|
||||||
|
|
||||||
CONFLICTS_INSTALL= liblinear # bin/predict
|
CONFLICTS_INSTALL= liblinear # bin/predict
|
||||||
|
|
||||||
post-patch:
|
OPTIONS_DEFINE= DOCS EXAMPLES
|
||||||
@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' ${FILESDIR}/predict.h > ${WRKSRC}/predict.h
|
|
||||||
@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' ${FILESDIR}/vocalizer.h > ${WRKSRC}/vocalizer/vocalizer.h
|
|
||||||
@${CP} ${FILESDIR}/Makefile ${WRKSRC}/Makefile
|
|
||||||
|
|
||||||
|
post-patch:
|
||||||
|
@${REINPLACE_CMD} -e 's|/usr/src/predict-2.3.1/|${PREFIX}/share/predict|g' ${WRKSRC}/predict.h
|
||||||
|
|
||||||
|
# I'm not building & installing clients/gsat-1 map kep_reload etc. only earthtrack
|
||||||
|
do-build:
|
||||||
|
cd ${WRKSRC} && ${CC} ${CFLAGS} -I ${LOCALBASE}/include -o predict predict.c -L ${LOCALBASE}/lib -pthread -lm -lncursesw -lasound
|
||||||
|
cd ${WRKSRC}/clients/earthtrack && ${CC} ${CFLAGS} -o earthtrack earthtrack.c -lm
|
||||||
|
cd ${WRKSRC}/utils/moontracker && ${CC} ${CFLAGS} -o moontracker moontracker.c -lm
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
${MKDIR} ${STAGEDIR}${DATADIR}/default
|
||||||
|
.for f in predict.db predict.qth predict.tle
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/default/$f ${STAGEDIR}${DATADIR}/default
|
||||||
|
.endfor
|
||||||
|
${MKDIR} ${STAGEDIR}${DATADIR}/vocalizer
|
||||||
|
cd ${WRKSRC}/vocalizer && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/vocalizer
|
||||||
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/docs/pdf/predict.pdf ${STAGEDIR}${DOCSDIR}
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/docs/html/predict.html ${STAGEDIR}${DOCSDIR}
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/docs/text/predict.txt ${STAGEDIR}${DOCSDIR}
|
||||||
|
${INSTALL_MAN} ${WRKSRC}/docs/man/predict.1 ${STAGEDIR}${PREFIX}/share/man/man1
|
||||||
|
${INSTALL_PROGRAM} ${WRKSRC}/predict ${STAGEDIR}${PREFIX}/bin/
|
||||||
|
${INSTALL_PROGRAM} ${WRKSRC}/clients/earthtrack/earthtrack ${STAGEDIR}${PREFIX}/bin/
|
||||||
|
${RLN} ${STAGEDIR}${PREFIX}/bin/earthtrack ${STAGEDIR}${PREFIX}/bin/earthtrack2
|
||||||
|
${INSTALL_PROGRAM} ${WRKSRC}/utils/moontracker/moontracker ${STAGEDIR}${PREFIX}/bin/moontracker
|
||||||
|
${INSTALL_SCRIPT} ${WRKSRC}/kepupdate ${STAGEDIR}${PREFIX}/bin
|
||||||
|
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||||
|
cd ${WRKSRC}/clients/&& ${COPYTREE_SHARE} samples ${STAGEDIR}${EXAMPLESDIR}
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
TIMESTAMP = 1602533134
|
TIMESTAMP = 1711552091
|
||||||
SHA256 (predict-2.2.7.tar.gz) = bc4e828209996daefa591aad2e27320786f86b4da949df6a8c3f167ab035fd71
|
SHA256 (predict-2.3.1.tar.gz) = 3ea626cadf1edf984e49e91891f9fd5cb38f6d83c5cd6e6693e8aecb2d289056
|
||||||
SIZE (predict-2.2.7.tar.gz) = 1887048
|
SIZE (predict-2.3.1.tar.gz) = 2010530
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
default: all
|
|
||||||
all: predict vocalizer/vocalizer
|
|
||||||
|
|
||||||
LIBS = ${LDFLAGS} -pthread -lm -lncursesw
|
|
||||||
predict: predict.c predict.h
|
|
||||||
${CC} ${CFLAGS} -o predict predict.c ${LIBS}
|
|
||||||
|
|
||||||
vocalizer/vocalizer: vocalizer/vocalizer.c vocalizer/vocalizer.h
|
|
||||||
${CC} ${CFLAGS} -I${LOCALBASE}/include -o vocalizer/vocalizer vocalizer/vocalizer.c -L${LOCALBASE}/lib ${LIBS} -lasound
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o predict *core *~ \#* *.txt vocalizer/vocalizer
|
|
||||||
|
|
||||||
install:
|
|
||||||
mkdir -p ${STAGEDIR}${PREFIX}/share/predict/
|
|
||||||
mkdir ${STAGEDIR}${PREFIX}/share/predict/default
|
|
||||||
mkdir ${STAGEDIR}${PREFIX}/share/predict/vocalizer
|
|
||||||
install -m 0644 default/predict.db ${STAGEDIR}${PREFIX}/share/predict/default
|
|
||||||
install -m 0644 default/predict.qth ${STAGEDIR}${PREFIX}/share/predict/default
|
|
||||||
install -m 0644 default/predict.tle ${STAGEDIR}${PREFIX}/share/predict/default
|
|
||||||
install -m 0644 vocalizer/*.wav ${STAGEDIR}${PREFIX}/share/predict/vocalizer
|
|
||||||
install predict ${STAGEDIR}${PREFIX}/bin
|
|
||||||
strip ${STAGEDIR}${PREFIX}/bin/predict
|
|
||||||
install vocalizer/vocalizer ${STAGEDIR}${PREFIX}/bin
|
|
||||||
strip ${STAGEDIR}${PREFIX}/bin/vocalizer
|
|
||||||
|
|
||||||
install.man:
|
|
||||||
install -m 0644 docs/man/predict.1 ${STAGEDIR}${PREFIX}/share/man/man1
|
|
||||||
|
|
||||||
.PHONY: clean build
|
|
16
comms/predict/files/patch-clients_earthtrack_earthtrack.c
Normal file
16
comms/predict/files/patch-clients_earthtrack_earthtrack.c
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
--- clients/earthtrack/earthtrack.c.orig 2023-06-10 19:16:02 UTC
|
||||||
|
+++ clients/earthtrack/earthtrack.c
|
||||||
|
@@ -53,13 +53,6 @@ FILE *markerfd=NULL, *greatarcfd=NULL;
|
||||||
|
HALFPI=1.570796326794896, deg2rad=1.74532925199e-02;
|
||||||
|
FILE *markerfd=NULL, *greatarcfd=NULL;
|
||||||
|
|
||||||
|
-void handler(void)
|
||||||
|
-{
|
||||||
|
- /* This is a function that is called when the response function
|
||||||
|
- times out. This is in case the server fails to respond. */
|
||||||
|
-
|
||||||
|
- signal(SIGALRM,handler);
|
||||||
|
-}
|
||||||
|
|
||||||
|
int connectsock(char *host, char *service, char *protocol)
|
||||||
|
{
|
28
comms/predict/files/patch-kepupdate
Normal file
28
comms/predict/files/patch-kepupdate
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
--- kepupdate.orig 2024-03-27 16:31:40 UTC
|
||||||
|
+++ kepupdate
|
||||||
|
@@ -1,20 +1,19 @@
|
||||||
|
-#!/bin/bash
|
||||||
|
+#!/bin/sh
|
||||||
|
#
|
||||||
|
# Invoke as kepupdate -q in crontab scripts to keep the update "quiet".
|
||||||
|
#
|
||||||
|
|
||||||
|
dir=$HOME/.predict
|
||||||
|
|
||||||
|
-wget -qr https://www.amsat.org/tle/current/nasabare.txt -O $dir/amateur.txt
|
||||||
|
-wget -qr https://celestrak.org/NORAD/elements/visual.txt -O $dir/visual.txt
|
||||||
|
-wget -qr https://celestrak.org/NORAD/elements/weather.txt -O $dir/weather.txt
|
||||||
|
+fetch https://www.amsat.org/tle/current/nasabare.txt -o $dir/amateur.txt
|
||||||
|
+fetch https://celestrak.org/NORAD/elements/visual.txt -o $dir/visual.txt
|
||||||
|
+fetch https://celestrak.org/NORAD/elements/weather.txt -o $dir/weather.txt
|
||||||
|
|
||||||
|
cat $dir/amateur.txt $dir/visual.txt $dir/weather.txt > $dir/keps.tle
|
||||||
|
|
||||||
|
if [ -e $dir/keps.tle ]; then
|
||||||
|
predict -u $dir/keps.tle
|
||||||
|
-
|
||||||
|
- if [[ $1 != "-q" ]] && [[ $1 != "-quiet" ]] && [[ $1 != "--quiet" ]]; then
|
||||||
|
+ if [ $1 ] && [ $1 != "-q" ] && [ $1 != "-quiet" ] && [ $1 != "--quiet" ]; then
|
||||||
|
echo "PREDICT's Keps have been updated!"
|
||||||
|
fi
|
||||||
|
fi
|
18
comms/predict/files/patch-predict.c
Normal file
18
comms/predict/files/patch-predict.c
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
--- predict.c.orig 2023-08-05 15:33:14 UTC
|
||||||
|
+++ predict.c
|
||||||
|
@@ -30,6 +30,7 @@
|
||||||
|
#include <assert.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
+#include <sys/stat.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
@@ -6839,7 +6840,6 @@ void NewUser (void)
|
||||||
|
|
||||||
|
void NewUser (void)
|
||||||
|
{
|
||||||
|
- int *mkdir();
|
||||||
|
|
||||||
|
Banner();
|
||||||
|
attrset(COLOR_PAIR(3)|A_BOLD);
|
|
@ -1 +0,0 @@
|
||||||
char *predictpath={"%%PREFIX%%/share/predict/"}, soundcard=1, *version={"2.2.3"};
|
|
|
@ -1 +0,0 @@
|
||||||
char *path={"%%PREFIX%%/share/predict/vocalizer/"};
|
|
|
@ -1,9 +1,24 @@
|
||||||
|
bin/earthtrack
|
||||||
|
bin/earthtrack2
|
||||||
|
bin/kepupdate
|
||||||
|
bin/moontracker
|
||||||
bin/predict
|
bin/predict
|
||||||
bin/vocalizer
|
%%PORTDOCS%%%%DOCSDIR%%/predict.html
|
||||||
|
%%PORTDOCS%%%%DOCSDIR%%/predict.pdf
|
||||||
|
%%PORTDOCS%%%%DOCSDIR%%/predict.txt
|
||||||
|
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/samples/README
|
||||||
|
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/samples/build
|
||||||
|
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/samples/demo-i
|
||||||
|
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/samples/demo-i.c
|
||||||
|
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/samples/demo.c
|
||||||
|
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/samples/perl/README
|
||||||
|
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/samples/perl/demo.pl
|
||||||
|
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/samples/perl/kenwood_d700.pl
|
||||||
share/man/man1/predict.1.gz
|
share/man/man1/predict.1.gz
|
||||||
%%DATADIR%%/default/predict.db
|
%%DATADIR%%/default/predict.db
|
||||||
%%DATADIR%%/default/predict.qth
|
%%DATADIR%%/default/predict.qth
|
||||||
%%DATADIR%%/default/predict.tle
|
%%DATADIR%%/default/predict.tle
|
||||||
|
%%DATADIR%%/vocalizer/alarm.wav
|
||||||
%%DATADIR%%/vocalizer/approaching.wav
|
%%DATADIR%%/vocalizer/approaching.wav
|
||||||
%%DATADIR%%/vocalizer/azimuth.wav
|
%%DATADIR%%/vocalizer/azimuth.wav
|
||||||
%%DATADIR%%/vocalizer/eclipse.wav
|
%%DATADIR%%/vocalizer/eclipse.wav
|
||||||
|
|
Loading…
Add table
Reference in a new issue