git: 98d311a8b74e - main - astro/pal: New port: Positional Astronomy Library

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 25 Aug 2022 23:20:39 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=98d311a8b74ed96470e7064b913c2b0a72fb1e7b

commit 98d311a8b74ed96470e7064b913c2b0a72fb1e7b
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-25 23:20:09 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-25 23:20:37 +0000

    astro/pal: New port: Positional Astronomy Library
---
 astro/Makefile      |  1 +
 astro/pal/Makefile  | 36 ++++++++++++++++++++++++++++++++++++
 astro/pal/distinfo  |  3 +++
 astro/pal/pkg-descr | 12 ++++++++++++
 4 files changed, 52 insertions(+)

diff --git a/astro/Makefile b/astro/Makefile
index c75416f2e648..74793fabccd0 100644
--- a/astro/Makefile
+++ b/astro/Makefile
@@ -72,6 +72,7 @@
     SUBDIR += p5-Net-GPSD3
     SUBDIR += p5-Starlink-AST
     SUBDIR += p5-Weather-Underground
+    SUBDIR += pal
     SUBDIR += phd2
     SUBDIR += phoon
     SUBDIR += pp3
diff --git a/astro/pal/Makefile b/astro/pal/Makefile
new file mode 100644
index 000000000000..bbcaccbff909
--- /dev/null
+++ b/astro/pal/Makefile
@@ -0,0 +1,36 @@
+PORTNAME=	pal
+DISTVERSION=	0.9.8
+CATEGORIES=	astro geography
+MASTER_SITES=	https://github.com/Starlink/pal/releases/download/v${DISTVERSION}/
+PKGNAMESUFFIX=	-astronomical
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Positional Astronomy Library
+
+LICENSE=	LGPL3
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+LIB_DEPENDS=	liberfa.so:astro/erfa
+
+USES=		gmake libtool
+USE_LDCONFIG=	yes
+
+GNU_CONFIGURE=	yes
+
+INSTALL_TARGET=	install-strip
+
+PLIST_FILES=	include/star/pal.h \
+		include/star/palmac.h \
+		lib/libpal.a \
+		lib/libpal.so \
+		lib/libpal.so.0 \
+		lib/libpal.so.0.0.0
+
+post-install: # remove manifest file that contains stage dir, news and docs directories, and datadir with licenses
+	@${RM} -r \
+		${STAGEDIR}${PREFIX}/manifests \
+		${STAGEDIR}${PREFIX}/news \
+		${STAGEDIR}${PREFIX}/docs \
+		${STAGEDIR}${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/astro/pal/distinfo b/astro/pal/distinfo
new file mode 100644
index 000000000000..718c6209b8b2
--- /dev/null
+++ b/astro/pal/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1661467182
+SHA256 (pal-0.9.8.tar.gz) = 191fde8c4f45d6807d4b011511344014966bb46e44029a4481d070cd5e7cc697
+SIZE (pal-0.9.8.tar.gz) = 1267834
diff --git a/astro/pal/pkg-descr b/astro/pal/pkg-descr
new file mode 100644
index 000000000000..b882427b2962
--- /dev/null
+++ b/astro/pal/pkg-descr
@@ -0,0 +1,12 @@
+The PAL library is a partial re-implementation of Pat Wallace's popular SLALIB
+library written in C using a Gnu GPL license and layered on top of the IAU's
+SOFA library (or the BSD-licensed ERFA) where appropriate. PAL attempts to stick
+to the SLA C API where possible although palObs() has a more C-like API than the
+equivalent slaObs() function. In most cases it is enough to simply change the
+function prefix of a routine in order to link against PAL rather than SLALIB.
+Routines calling SOFA use modern notation and precession models so will return
+slightly different answers than native SLALIB. PAL functions not available in
+SOFA were ported from the Fortran version of SLALIB that ships as part of the
+Starlink software and uses a GPL licence.
+
+WWW: https://github.com/Starlink/pal