aboutsummaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-08-12 21:40:18 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-08-12 21:40:18 +0000
commit3a9fc0d7afd369baa32b8541356880771c59f0a8 (patch)
tree52a4fd67aa0a034c8ebe15154e5540c606b6edfc /astro
parent1c8766718f2e78fc601f60e7d1cb323995e870ab (diff)
Notes
Diffstat (limited to 'astro')
-rw-r--r--astro/Makefile1
-rw-r--r--astro/aa/Makefile47
-rw-r--r--astro/aa/distinfo3
-rw-r--r--astro/aa/files/patch-aa.c12
-rw-r--r--astro/aa/files/patch-dms.c11
-rw-r--r--astro/aa/files/patch-kfiles.c48
-rw-r--r--astro/aa/files/pkg-message.in17
-rw-r--r--astro/aa/pkg-descr10
8 files changed, 149 insertions, 0 deletions
diff --git a/astro/Makefile b/astro/Makefile
index dd174320b67e..e81cf5bb145f 100644
--- a/astro/Makefile
+++ b/astro/Makefile
@@ -3,6 +3,7 @@
COMMENT = Astronomical ports
+ SUBDIR += aa
SUBDIR += accrete
SUBDIR += boinc-einsteinathome
SUBDIR += boinc-setiathome-enhanced
diff --git a/astro/aa/Makefile b/astro/aa/Makefile
new file mode 100644
index 000000000000..fe352e5f34ee
--- /dev/null
+++ b/astro/aa/Makefile
@@ -0,0 +1,47 @@
+# New ports collection makefile for: aa
+# Date created: 11 August 2006
+# Whom: Frank W. Josellis <frank@dynamical-systems.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= aa
+PORTVERSION= 56
+CATEGORIES= astro
+MASTER_SITES= http://moshier.net/ \
+ http://www.mirrorservice.org/sites/www.moshier.net/
+
+MAINTAINER= frank@dynamical-systems.org
+COMMENT= Self-contained ephemeris calculator
+
+EXTRACT_AFTER_ARGS= -d ${WRKSRC}
+EXTRACT_BEFORE_ARGS= -aqo
+
+USE_ZIP= yes
+MAKEFILE= makefile
+ALL_TARGET= aa
+
+SUB_FILES= pkg-message
+
+PORTDOCS= read.me readme.404 Readme.FreeBSD
+PLIST_FILES= bin/aa etc/aa.ini.default
+
+post-patch:
+ @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/kfiles.c
+ @${REINPLACE_CMD} 's|CFLAGS= -O2|CFLAGS+=|' ${WRKSRC}/makefile
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/aa ${TARGETDIR}/bin
+ @${INSTALL_DATA} ${WRKSRC}/aa.ini ${TARGETDIR}/etc/aa.ini.default
+
+post-install:
+.if !defined(NOPORTDOCS)
+ @${CAT} ${PKGMESSAGE} > ${WRKSRC}/Readme.FreeBSD
+ @${MKDIR} ${DOCSDIR}
+.for i in ${PORTDOCS}
+ @${INSTALL_MAN} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/astro/aa/distinfo b/astro/aa/distinfo
new file mode 100644
index 000000000000..bc7ca8d5652a
--- /dev/null
+++ b/astro/aa/distinfo
@@ -0,0 +1,3 @@
+MD5 (aa-56.zip) = 74dfb091d8a749e6583bfc2880aecd10
+SHA256 (aa-56.zip) = c7b1a3d2bcf46b7e649fbe7858725f80be153668cbb8ce51d9f39ee4567c262b
+SIZE (aa-56.zip) = 415059
diff --git a/astro/aa/files/patch-aa.c b/astro/aa/files/patch-aa.c
new file mode 100644
index 000000000000..7137cb073eb7
--- /dev/null
+++ b/astro/aa/files/patch-aa.c
@@ -0,0 +1,12 @@
+--- aa.c.orig Sun Nov 1 01:35:05 1998
++++ aa.c Fri Aug 11 13:21:19 2006
+@@ -37,9 +37,7 @@
+ */
+ #include "kep.h"
+
+-#ifdef __BORLANDC__
+ #include <stdlib.h>
+-#endif
+
+ #ifdef _MSC_VER
+ #if _MSC_VER >= 1000
diff --git a/astro/aa/files/patch-dms.c b/astro/aa/files/patch-dms.c
new file mode 100644
index 000000000000..ce3626e6c783
--- /dev/null
+++ b/astro/aa/files/patch-dms.c
@@ -0,0 +1,11 @@
+--- dms.c.orig Sun Nov 1 18:59:47 1998
++++ dms.c Fri Aug 11 13:23:07 2006
+@@ -485,7 +485,7 @@
+ else
+ printf( "Illegal input format\n" );
+ printf( ") ? ");
+-gets(s);
++fgets(s, 40, stdin);
+ if( s[0] != '\0' )
+ sscanf( s, format, num );
+ return(0);
diff --git a/astro/aa/files/patch-kfiles.c b/astro/aa/files/patch-kfiles.c
new file mode 100644
index 000000000000..6e07341f3f8d
--- /dev/null
+++ b/astro/aa/files/patch-kfiles.c
@@ -0,0 +1,48 @@
+--- kfiles.c.orig Sat Aug 9 17:01:51 2003
++++ kfiles.c Fri Aug 11 18:51:05 2006
+@@ -3,9 +3,7 @@
+ * or file containing orbital elements.
+ */
+
+-#if __BORLANDC__
+ #include <stdlib.h>
+-#endif
+
+ #include "kep.h"
+
+@@ -67,13 +65,33 @@
+ int kinit()
+ {
+ double a, b, fl, co, si, u;
+-FILE *f, *fopen();
++FILE *f = NULL, *fopen();
+ char s[84];
++char *inifile = NULL, *home = getenv("HOME");
+
+ printf( "\n\tSteve Moshier's Ephemeris Program v5.6\n\n" );
+ printf( "Planetary and lunar positions approximate DE404.\n" );
+
+-f = fopen( "aa.ini", "r" );
++/* User inifile */
++ if(home){
++ inifile = strdup(home);
++ realloc(inifile, strlen(home) + strlen("/.aa.ini") + 1);
++ strcat(inifile,"/.aa.ini");
++ f = fopen( inifile, "r" );
++ }
++
++ /* System inifile */
++ if(!f){
++ inifile = "%%PREFIX%%/etc/aa.ini";
++ f = fopen( inifile, "r" );
++ }
++
++ if (f){
++ printf("\nUsing inifile %s\n", inifile);
++ } else {
++ printf("\nNo inifile.\n");
++ }
++
+ if( f )
+ {
+ fgets( s, 80, f );
diff --git a/astro/aa/files/pkg-message.in b/astro/aa/files/pkg-message.in
new file mode 100644
index 000000000000..a6feb1cac452
--- /dev/null
+++ b/astro/aa/files/pkg-message.in
@@ -0,0 +1,17 @@
+---------------------------------------------------
+NOTE: The program has been set up to read its
+initialization from a dotfile in a user's home,
+
+ ${HOME}/.aa.ini
+
+or from the system's ini file
+
+ %%PREFIX%%/etc/aa.ini
+
+where the latter has the lower priority. The port
+only installs "%%PREFIX%%/etc/aa.ini.default"
+which shows a sample initialization. To configure
+aa properly, this sample file should be copied to
+one of the above ini files which then needs to be
+edited to match the local requirements.
+---------------------------------------------------
diff --git a/astro/aa/pkg-descr b/astro/aa/pkg-descr
new file mode 100644
index 000000000000..bfb1295d7c9c
--- /dev/null
+++ b/astro/aa/pkg-descr
@@ -0,0 +1,10 @@
+This program computes ephemerides of Sun, Moon, planets, comets, and stars
+using rigorous reduction methods from the _Astronomical Almanac_ and related
+sources. Includes PLAN404 series for positions of the planets, and a long-term
+extension of modern Lunar theory for the Moon's position. Reads ASCII file
+catalogues of stars and orbital elements. Displays all adjustments as it finds
+local azimuth and elevation, rise and set times, etc.
+
+Latest update 2005-11-09.
+
+WWW: http://moshier.net/aadoc.html