astro/libnova: Set maintainer, improve and update 0.15.0

ChangeLog: https://sourceforge.net/p/libnova/libnova/ci/v0.16/tree/ChangeLog

Reporter becomes maintainer. Already maintainer of several ports.

PR:		286058
Reported by:	alster@vinterdalen.se
This commit is contained in:
Älven 2025-04-14 08:43:09 +02:00 committed by Fernando Apesteguía
parent c73136bd70
commit 6ce9e2dd2d
7 changed files with 54 additions and 89 deletions

View file

@ -1,24 +1,28 @@
PORTNAME= libnova
PORTVERSION= 0.15.0
PORTREVISION= 1
DISTVERSION= 0.16.0
CATEGORIES= astro
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/v%20${PORTVERSION}
MASTER_SITES= https://sourceforge.net/code-snapshots/git/l/li/${PORTNAME}/${PORTNAME}.git/
DISTNAME= ${PORTNAME}-${PORTNAME}-${GIT_HASH}
MAINTAINER= ports@FreeBSD.org
MAINTAINER= alster@vinterdalen.se
COMMENT= Astronomical Calculation Library
WWW= https://libnova.sourceforge.net/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
USES= autoreconf libtool
GNU_CONFIGURE= yes
USES= autoreconf libtool zip
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
PIE_UNSAFE= yes
PLIST_SUB= SOVERSION=${DISTVERSION:R}
GIT_HASH= edbf65abe27ef1a2520eb9e839daaf58f15a6941
post-patch:
@${REINPLACE_CMD} -e 's|^CFLAGS=|#CFLAGS=|g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|^CFLAGS=|#CFLAGS=|g' ${WRKSRC}/configure.ac
.include <bsd.port.mk>

View file

@ -1,2 +1,3 @@
SHA256 (libnova-0.15.0.tar.gz) = 7c5aa33e45a3e7118d77df05af7341e61784284f1e8d0d965307f1663f415bb1
SIZE (libnova-0.15.0.tar.gz) = 1533794
TIMESTAMP = 1744455361
SHA256 (libnova-libnova-edbf65abe27ef1a2520eb9e839daaf58f15a6941.zip) = 2703497573f949146895dedb6fdf74c8d1f15dbdb831074bbaabc5052bdedc07
SIZE (libnova-libnova-edbf65abe27ef1a2520eb9e839daaf58f15a6941.zip) = 1373439

View file

@ -1,17 +1,19 @@
--- src/hyperbolic_motion.c.orig 2011-07-28 11:02:50 UTC
--- src/hyperbolic_motion.c.orig 2015-03-03 11:16:58 UTC
+++ src/hyperbolic_motion.c
@@ -70,12 +70,12 @@ next_z:
F = Z1 * G1;
Q3 = Q3 + F;
if (Z > 100 || fabs(F) > 10000)
- return nan("0");
+ return strtod("NAN(0)", NULL);
if (fabs(F) > PREC)
goto next_z;
L++;
if (L > 100)
- return nan("0");
+ return strtod("NAN(0)", NULL);
do
{
S1 = S;
@@ -73,14 +73,14 @@ next_z:
Q3 = Q3 + F;
if (Z > 100 || fabs(F) > 10000)
- return nan("0");
+ return strtod("NAN(0)", NULL);
if (fabs(F) > PREC)
goto next_z;
L++;
if (L > 100)
- return nan("0");
+ return strtod("NAN(0)", NULL);
do {
S1 = S;

View file

@ -0,0 +1,11 @@
--- src/libnova/libnova.h.orig 2015-03-03 11:16:58 UTC
+++ src/libnova/libnova.h
@@ -16,7 +16,7 @@
* Copyright (C) 2000 - 2005 Liam Girdwood <lgirdwood@gmail.com>
*/
-#define LIBNOVA_VERSION "0.15.0"
+#define LIBNOVA_VERSION "0.16.0"
/*! \mainpage libnova
* \image html libnova-logo.jpg

View file

@ -1,58 +0,0 @@
--- src/precession.c.orig 2011-07-28 11:02:50 UTC
+++ src/precession.c
@@ -82,21 +82,21 @@ void ln_get_equ_prec (struct ln_equ_posn
theta = ln_deg_to_rad (theta);
/* calc A,B,C equ 20.4 */
- A = cosl (mean_dec) * sinl (mean_ra + zeta);
- B = cosl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) - sinl (theta) * sinl (mean_dec);
- C = sinl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) + cosl (theta) * sinl (mean_dec);
+ A = cos (mean_dec) * sin (mean_ra + zeta);
+ B = cos (theta) * cos (mean_dec) * cos (mean_ra + zeta) - sin (theta) * sin (mean_dec);
+ C = sin (theta) * cos (mean_dec) * cos (mean_ra + zeta) + cos (theta) * sin (mean_dec);
- ra = atan2l (A,B) + eta;
+ ra = atan2 (A,B) + eta;
/* check for object near celestial pole */
if (mean_dec > (0.4 * M_PI) || mean_dec < (-0.4 * M_PI)) {
/* close to pole */
- dec = acosl (sqrt(A * A + B * B));
+ dec = acos (sqrt(A * A + B * B));
if (mean_dec < 0.)
dec *= -1; /* 0 <= acos() <= PI */
} else {
/* not close to pole */
- dec = asinl (C);
+ dec = asin (C);
}
/* change to degrees */
@@ -140,21 +140,21 @@ void ln_get_equ_prec2 (struct ln_equ_pos
theta = ln_deg_to_rad (theta);
/* calc A,B,C equ 20.4 */
- A = cosl (mean_dec) * sinl (mean_ra + zeta);
- B = cosl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) - sinl (theta) * sinl (mean_dec);
- C = sinl (theta) * cosl (mean_dec) * cosl (mean_ra + zeta) + cosl (theta) * sinl (mean_dec);
+ A = cos (mean_dec) * sin (mean_ra + zeta);
+ B = cos (theta) * cos (mean_dec) * cos (mean_ra + zeta) - sin (theta) * sin (mean_dec);
+ C = sin (theta) * cos (mean_dec) * cos (mean_ra + zeta) + cos (theta) * sin (mean_dec);
- ra = atan2l (A,B) + eta;
+ ra = atan2 (A,B) + eta;
/* check for object near celestial pole */
if (mean_dec > (0.4 * M_PI) || mean_dec < (-0.4 * M_PI)) {
/* close to pole */
- dec = acosl (sqrt(A * A + B * B));
+ dec = acos (sqrt(A * A + B * B));
if (mean_dec < 0.)
dec *= -1; /* 0 <= acos() <= PI */
} else {
/* not close to pole */
- dec = asinl (C);
+ dec = asin (C);
}
/* change to degrees */

View file

@ -1,3 +1,7 @@
libnova is a general purpose, double precision, astronomical calculation
library. The intended audience of libnova is C / C++ programmers, astronomers
and anyone else interested in calculating positions of astronomical objects.
libnova is a general purpose, double precision, Celestial Mechanics, Astrometry
and Astrodynamics library.
The intended audience of libnova is C / C++ programmers, astronomers and anyone
else interested in calculating positions of astronomical objects or celestial
mechanics. libnova is the calculation engine used by the Nova project and most
importantly, is Free Software.

View file

@ -5,6 +5,7 @@ include/libnova/angular_separation.h
include/libnova/apparent_position.h
include/libnova/asteroid.h
include/libnova/comet.h
include/libnova/constellation.h
include/libnova/dynamical_time.h
include/libnova/earth.h
include/libnova/elliptic_motion.h
@ -34,7 +35,7 @@ include/libnova/uranus.h
include/libnova/utility.h
include/libnova/venus.h
include/libnova/vsop87.h
lib/libnova-0.15.so.0
lib/libnova-0.15.so.0.0.0
lib/libnova-%%SOVERSION%%.so.0
lib/libnova-%%SOVERSION%%.so.0.0.0
lib/libnova.a
lib/libnova.so