Bug 108190

Summary: astro/ephem: fixes for gcc41
Product: Ports & Packages Reporter: Slaven Rezic <slaven>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Slaven Rezic 2007-01-21 20:40:16 UTC
	astro/ephem does not build under FreeBSD 7 because of the new
	gcc.

Fix: Below patch adds all missing static declarations to the source
	code. I also added some "include"s to minimize warnings.

	Also, maintainer's email address was updated.


# 
# 
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# If you have a decent Bourne-type shell:
# STEP 2: Run the shell with this file as input.
# If you don't have such a shell, you may need to manually create
# the files as shown below.
# STEP 3: Run the 'patch' program with this file as input.
#
# These are the commands needed to create/delete files/directories:
#
touch 'files/patch-ba'
chmod 0660 'files/patch-ba'
touch 'files/patch-bb'
chmod 0660 'files/patch-bb'
touch 'files/patch-bc'
chmod 0660 'files/patch-bc'
touch 'files/patch-bd'
chmod 0660 'files/patch-bd'
touch 'files/patch-be'
chmod 0660 'files/patch-be'
touch 'files/patch-bf'
chmod 0660 'files/patch-bf'
touch 'files/patch-bg'
chmod 0660 'files/patch-bg'
touch 'files/patch-bh'
chmod 0660 'files/patch-bh'
touch 'files/patch-bi'
chmod 0660 'files/patch-bi'
touch 'files/patch-bj'
chmod 0660 'files/patch-bj'
touch 'files/patch-bk'
chmod 0660 'files/patch-bk'
touch 'files/patch-bl'
chmod 0660 'files/patch-bl'
touch 'files/patch-bm'
chmod 0660 'files/patch-bm'
touch 'files/patch-bn'
chmod 0660 'files/patch-bn'
touch 'files/patch-bo'
chmod 0660 'files/patch-bo'
#
# This command terminates the shell and need not be executed manually.
exit
#
#### End of Preamble ####

#### Patch data follows ####


#### ApplyPatch data follows ####
# Data version        : 1.0
# Date generated      : Sun Jan 21 21:22:29 2007
# Generated by        : makepatch 2.03
# Recurse directories : Yes
# Excluded files      : (\A|/).*\~\Z
#                       (\A|/).*\.a\Z
#                       (\A|/).*\.bak\Z
#                       (\A|/).*\.BAK\Z
#                       (\A|/).*\.elc\Z
#                       (\A|/).*\.exe\Z
#                       (\A|/).*\.gz\Z
#                       (\A|/).*\.ln\Z
#                       (\A|/).*\.o\Z
#                       (\A|/).*\.obj\Z
#                       (\A|/).*\.olb\Z
#                       (\A|/).*\.old\Z
#                       (\A|/).*\.orig\Z
#                       (\A|/).*\.rej\Z
#                       (\A|/).*\.so\Z
#                       (\A|/).*\.Z\Z
#                       (\A|/)\.del\-.*\Z
#                       (\A|/)\.make\.state\Z
#                       (\A|/)\.nse_depinfo\Z
#                       (\A|/)core\Z
#                       (\A|/)tags\Z
#                       (\A|/)TAGS\Z
# p 'Makefile' 947 1169410869 0100644
# p 'files/patch-ad' 1930 1169408848 0100644
# p 'files/patch-ae' 664 1169408961 0100644
# p 'files/patch-af' 1389 1169409136 0100644
# p 'files/patch-ag' 816 1169409848 0100644
# p 'files/patch-ah' 658 1169410006 0100644
# c 'files/patch-ba' 0 1169408406 0100660
# c 'files/patch-bb' 0 1169408406 0100660
# c 'files/patch-bc' 0 1169408405 0100660
# c 'files/patch-bd' 0 1169408405 0100660
# c 'files/patch-be' 0 1169408404 0100660
# c 'files/patch-bf' 0 1169408615 0100660
# c 'files/patch-bg' 0 1169408629 0100660
# c 'files/patch-bh' 0 1169409226 0100660
# c 'files/patch-bi' 0 1169409286 0100660
# c 'files/patch-bj' 0 1169409901 0100660
# c 'files/patch-bk' 0 1169410151 0100660
# c 'files/patch-bl' 0 1169410222 0100660
# c 'files/patch-bm' 0 1169410321 0100660
# c 'files/patch-bn' 0 1169410462 0100660
# c 'files/patch-bo' 0 1169410606 0100660
#### End of ApplyPatch data ####

#### End of Patch kit [created: Sun Jan 21 21:22:29 2007] ####
#### Patch checksum: 865 25838 342 ####
#### Checksum: 923 27562 13861 ####--Hj0e4TCdBZChmBNaIGdPDmiFcmyvHisDq6eF6WunmPVJAHCc
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff -up 'ephem/Makefile' 'ephem.new/Makefile'
Index: ./Makefile
--- ./Makefile	Fri Mar 12 21:23:01 2004
+++ ./Makefile	Sun Jan 21 21:21:09 2007
@@ -12,7 +12,7 @@ MASTER_SITES=	${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	trevor
 DISTNAME=	${PORTNAME}_${PORTVERSION}_unix
 
-MAINTAINER=	eserte@cs.tu-berlin.de
+MAINTAINER=	slaven@rezic.de
 COMMENT=	An interactive terminal-based astronomical ephemeris program
 
 NO_WRKSUBDIR=	yes
diff -up 'ephem/files/patch-ad' 'ephem.new/files/patch-ad'
Index: ./files/patch-ad
--- ./files/patch-ad	Tue Jun  3 11:14:13 1997
+++ ./files/patch-ad	Sun Jan 21 20:47:28 2007
@@ -1,70 +1,62 @@
-*** io.c.orig	Wed Apr  3 13:26:53 1996
---- io.c	Wed Apr  3 15:13:25 1996
-***************
-*** 35,50 ****
-  /* then if you defined UNIX you must use one of these ways to do non-blocking
-   * tty reads
-   */
-! #define USE_FIONREAD
-! /* #define USE_NDELAY */
-  /* #define USE_ATTSELECT */
-  /* #define USE_BSDSELECT */
-  
-  /* and then if you defined UNIX you must also use one of these ways to control
-   * the tty modes.
-   */
-! #define USE_TERMIO
-! /* #define USE_SGTTY */
-  
-  /* if you defined TURBO_C you might want this too if screen io looks garbled */
-  /* #define USE_ANSISYS */
---- 35,50 ----
-  /* then if you defined UNIX you must use one of these ways to do non-blocking
-   * tty reads
-   */
-! /* #define USE_FIONREAD */
-! #define USE_NDELAY
-  /* #define USE_ATTSELECT */
-  /* #define USE_BSDSELECT */
-  
-  /* and then if you defined UNIX you must also use one of these ways to control
-   * the tty modes.
-   */
-! /* #define USE_TERMIO */
-! #define USE_SGTTY
-  
-  /* if you defined TURBO_C you might want this too if screen io looks garbled */
-  /* #define USE_ANSISYS */
-***************
-*** 199,209 ****
-  	    seqa[0] = c;
-  	    if (l > 1) {
-  		extern unsigned alarm();
-  		/* cautiously read rest of arrow sequence */
-  		got_alrm = 0;
-  		(void) signal (SIGALRM, on_alrm);
-  		alarm(2);
-! 		read (0, seqa+1, l-1);
-  		alarm(0);
-  		if (got_alrm)
-  		    return (c);
---- 199,217 ----
-  	    seqa[0] = c;
-  	    if (l > 1) {
-  		extern unsigned alarm();
-+ 		int ch_read, ch_expected, seqa_i;
-  		/* cautiously read rest of arrow sequence */
-  		got_alrm = 0;
-  		(void) signal (SIGALRM, on_alrm);
-  		alarm(2);
-! 		/* to make the arrow keys work with FreeBSD ... */
-! 		ch_expected = l-1;
-! 		seqa_i = 1;
-! 		while ((ch_read = read (0, seqa+seqa_i, ch_expected)) > 0 &&
-! 			ch_read < ch_expected) {
-! 		    ch_expected -= ch_read;
-! 		    seqa_i += ch_read;
-! 		}
-  		alarm(0);
-  		if (got_alrm)
-  		    return (c);
+--- io.c.orig	Sat Mar 14 23:22:07 1992
++++ io.c	Sun Jan 21 20:46:00 2007
+@@ -28,6 +28,17 @@
+  *     need to #define VMS since it is inherent in the compiler.
+  */
+ 
++#include <signal.h>
++#include <string.h>
++#include <stdlib.h>
++
++static on_alrm();
++static chk_arrow (register char c);
++static tload();
++static char *egetstr (char *name, char **sptr);
++static setuptty();
++
++
+ /* unless you are on VMS define one of these... */
+ #define UNIX
+ /* #define TURBO_C */
+@@ -35,16 +46,16 @@
+ /* then if you defined UNIX you must use one of these ways to do non-blocking
+  * tty reads
+  */
+-#define USE_FIONREAD
+-/* #define USE_NDELAY */
++/* #define USE_FIONREAD */
++#define USE_NDELAY
+ /* #define USE_ATTSELECT */
+ /* #define USE_BSDSELECT */
+ 
+ /* and then if you defined UNIX you must also use one of these ways to control
+  * the tty modes.
+  */
+-#define USE_TERMIO
+-/* #define USE_SGTTY */
++/* #define USE_TERMIO */
++#define USE_SGTTY
+ 
+ /* if you defined TURBO_C you might want this too if screen io looks garbled */
+ /* #define USE_ANSISYS */
+@@ -199,11 +210,19 @@
+ 	    seqa[0] = c;
+ 	    if (l > 1) {
+ 		extern unsigned alarm();
++		int ch_read, ch_expected, seqa_i;
+ 		/* cautiously read rest of arrow sequence */
+ 		got_alrm = 0;
+ 		(void) signal (SIGALRM, on_alrm);
+ 		alarm(2);
+-		read (0, seqa+1, l-1);
++		/* to make the arrow keys work with FreeBSD ... */
++		ch_expected = l-1;
++		seqa_i = 1;
++		while ((ch_read = read (0, seqa+seqa_i, ch_expected)) > 0 &&
++			ch_read < ch_expected) {
++		    ch_expected -= ch_read;
++		    seqa_i += ch_read;
++		}
+ 		alarm(0);
+ 		if (got_alrm)
+ 		    return (c);
diff -up 'ephem/files/patch-ae' 'ephem.new/files/patch-ae'
Index: ./files/patch-ae
--- ./files/patch-ae	Tue Jun  3 11:14:13 1997
+++ ./files/patch-ae	Sun Jan 21 20:49:21 2007
@@ -1,36 +1,41 @@
-*** listing.c.orig	Tue Apr 15 01:07:37 1997
---- listing.c	Tue Apr 15 01:38:22 1997
-***************
-*** 12,22 ****
-  
-  extern char *strcpy();
-  
-  #ifdef VMS
-  #include <perror.h>
-- #include <errno.h>
-  #else
-  extern char *sys_errlist[];
-  extern errno;
-  #endif
-  
---- 12,31 ----
-  
-  extern char *strcpy();
-  
-+ #if (defined(__unix__) || defined(unix)) && !defined(USG)             
-+ #include <sys/param.h>                                                
-+ #endif
-+ 
-+ #if defined(VMS) || defined(unix)
-+ #include <errno.h>
-+ #endif
-+ 
-  #ifdef VMS
-  #include <perror.h>
-  #else
-+ #ifndef BSD
-  extern char *sys_errlist[];
-+ #endif
-  extern errno;
-  #endif
-  
+--- listing.c.orig	Sat Mar 14 23:22:09 1992
++++ listing.c	Sun Jan 21 20:48:40 2007
+@@ -6,21 +6,36 @@
+  * format of the listing file is one line per screen update.
+  */
+ 
++#include <string.h>
+ #include <stdio.h>
+ #include <math.h>
+ #include "screen.h"
+ 
+-extern char *strcpy();
++#if (defined(__unix__) || defined(unix)) && !defined(USG)             
++#include <sys/param.h>                                                
++#endif
++
++#if defined(VMS) || defined(unix)
++#include <errno.h>
++#endif
+ 
+ #ifdef VMS
+ #include <perror.h>
+-#include <errno.h>
+ #else
++#ifndef BSD
+ extern char *sys_errlist[];
++#endif
+ extern errno;
+ #endif
+ 
+ #define	errsys	(sys_errlist[errno])
++
++static lst_reset();
++static lst_select_fields();
++static lst_turn_off();
++static lst_turn_on();
++static lst_file();
++static display_listing_file(FILE *lfp);
+ 
+ 
+ #define	TRACE(x)	{FILE *fp = fopen("trace","a"); fprintf x; fclose(fp);}
diff -up 'ephem/files/patch-af' 'ephem.new/files/patch-af'
Index: ./files/patch-af
--- ./files/patch-af	Sat Jan 29 23:02:01 2000
+++ ./files/patch-af	Sun Jan 21 20:52:16 2007
@@ -1,55 +1,59 @@
-*** main.c.orig	Sat Mar 14 16:22:10 1992
---- main.c	Fri Jan 14 09:56:45 2000
-***************
-*** 16,24 ****
-  #include <signal.h>
-  #include <setjmp.h>
-  #include <math.h>
-! #ifdef VMS
-  #include <stdlib.h>
-  #endif
-  #include "astro.h"
-  #include "circum.h"
-  #include "screen.h"
---- 16,25 ----
-  #include <signal.h>
-  #include <setjmp.h>
-  #include <math.h>
-! #if defined(VMS) || defined(unix)
-  #include <stdlib.h>
-  #endif
-+ #include <time.h>
-  #include "astro.h"
-  #include "circum.h"
-  #include "screen.h"
-***************
-*** 51,57 ****
---- 52,62 ----
-  
-  static jmp_buf fpe_err_jmp;	/* used to recover from SIGFPE */
-  static char *cfgfile;		/* !0 if -c used */
-+ #ifdef unix
-+ static char cfgdef[] = PREFIX "/share/ephem/ephem.cfg"; /* default configuration file name */
-+ #else
-  static char cfgdef[] = "ephem.cfg"; /* default configuration file name */
-+ #endif
-  static Now now;		/* where when and how, right now */
-  static double tminc;	/* hrs to inc time by each loop; RTC means use clock */
-  static int nstep;	/* steps to go before stopping */
-***************
-*** 1006,1012 ****
-   */
-  slp_sync()
-  {
-! 	extern long time();
-  
-  	if (spause > 0 && !plot_ison() && !srch_ison() && !listing_ison()) {
-  	    int n;
---- 1011,1017 ----
-   */
-  slp_sync()
-  {
-! 	/*extern long time();*/
-  
-  	if (spause > 0 && !plot_ison() && !srch_ison() && !listing_ison()) {
-  	    int n;
+--- main.c.orig	Sat Mar 14 23:22:10 1992
++++ main.c	Sun Jan 21 20:51:46 2007
+@@ -16,15 +16,26 @@
+ #include <signal.h>
+ #include <setjmp.h>
+ #include <math.h>
+-#ifdef VMS
++#if defined(VMS) || defined(unix)
+ #include <stdlib.h>
+ #endif
++#include <time.h>
+ #include "astro.h"
+ #include "circum.h"
+ #include "screen.h"
++#include <string.h>
++#include <stdlib.h>
+ 
+-extern char *strncpy();
+-extern char *getenv();
++static read_cfgfile();
++static void on_fpe();
++static read_fieldargs(int ac, char *av[]);
++static crack_fieldset(char *buf);
++static chg_fld(char *bp, int *fld);
++static print_tminc(int force);
++static print_alt(int howmuch);
++static print_nstep(int force);
++static print_spause(int force);
++static toggle_body(int p);
+ 
+ /* shorthands for fields of a Now structure, now.
+  * first undo the ones for a Now pointer from circum.h.
+@@ -51,7 +62,11 @@
+ 
+ static jmp_buf fpe_err_jmp;	/* used to recover from SIGFPE */
+ static char *cfgfile;		/* !0 if -c used */
++#ifdef unix
++static char cfgdef[] = PREFIX "/share/ephem/ephem.cfg"; /* default configuration file name */
++#else
+ static char cfgdef[] = "ephem.cfg"; /* default configuration file name */
++#endif
+ static Now now;		/* where when and how, right now */
+ static double tminc;	/* hrs to inc time by each loop; RTC means use clock */
+ static int nstep;	/* steps to go before stopping */
+@@ -1006,12 +1021,12 @@
+  */
+ slp_sync()
+ {
+-	extern long time();
++	/*extern long time();*/
+ 
+ 	if (spause > 0 && !plot_ison() && !srch_ison() && !listing_ison()) {
+ 	    int n;
+ 	    if (tminc == RTC) {
+-		long t;
++		time_t t;
+ 		(void) time (&t);
+ 		n = spause - (t % spause);
+ 	    } else 
diff -up 'ephem/files/patch-ag' 'ephem.new/files/patch-ag'
Index: ./files/patch-ag
--- ./files/patch-ag	Tue Jun  3 11:14:13 1997
+++ ./files/patch-ag	Sun Jan 21 21:04:08 2007
@@ -1,33 +1,44 @@
-*** objx.c.orig	Tue Apr 15 01:07:37 1997
---- objx.c	Tue Apr 15 01:33:17 1997
-***************
-*** 6,12 ****
-  #include <stdio.h>
-  #include <math.h>
-  #include <ctype.h>
-! #ifdef VMS
-  #include <stdlib.h>
-  #endif
-  #include "astro.h"
---- 6,12 ----
-  #include <stdio.h>
-  #include <math.h>
-  #include <ctype.h>
-! #if defined(VMS) || defined(unix)
-  #include <stdlib.h>
-  #endif
-  #include "astro.h"
-***************
-*** 16,22 ****
---- 16,26 ----
-  extern char *strcat(), *strcpy(), *strncpy(), *getenv();
-  
-  static char *dbfile;			/* !0 if set by -d option */
-+ #ifdef unix
-+ static char dbfdef[] = PREFIX "/share/ephem/ephem.db"; 	/* default database file name */
-+ #else
-  static char dbfdef[] = "ephem.db"; 	/* default database file name */
-+ #endif
-  
-  /* structures to describe objects of various types.
-   */
+--- objx.c.orig	Sat Mar 14 23:22:15 1992
++++ objx.c	Sun Jan 21 20:59:07 2007
+@@ -6,17 +6,20 @@
+ #include <stdio.h>
+ #include <math.h>
+ #include <ctype.h>
+-#ifdef VMS
++#if defined(VMS) || defined(unix)
+ #include <stdlib.h>
+ #endif
++#include <string.h>
+ #include "astro.h"
+ #include "circum.h"
+ #include "screen.h"
+ 
+-extern char *strcat(), *strcpy(), *strncpy(), *getenv();
+-
+ static char *dbfile;			/* !0 if set by -d option */
++#ifdef unix
++static char dbfdef[] = PREFIX "/share/ephem/ephem.db"; 	/* default database file name */
++#else
+ static char dbfdef[] = "ephem.db"; 	/* default database file name */
++#endif
+ 
+ /* structures to describe objects of various types.
+  */
+@@ -95,6 +98,17 @@
+ 
+ #define	DY	0		/* decimal year flag for set_year() */
+ #define	YMD	1		/* year/mon/day flag for set_year() */
++
++static nxt_db(char buf[], int blen, FILE *fp);
++static obj_dfixed(Obj *op, int ac, char *av[]);
++static obj_delliptical(Obj *op, int ac, char *av[]);
++static obj_dhyperbolic(Obj *op, int ac, char *av[]);
++static obj_dparabolic(Obj *op, int ac, char *av[]);
++static set_double(char *av[], int vn, char *pr, double *fp);
++static set_name(char *av[], char *np);
++static set_year(char *av[], int vn, char *pr, int type, double *yp);
++static crack_year(char *bp, double *p);
++static set_mag(char *av[], int vn, Mag *mp);
+ 
+ /* run when Objx or y is picked from menu.
+  * we tell which by the planet code.
diff -up 'ephem/files/patch-ah' 'ephem.new/files/patch-ah'
Index: ./files/patch-ah
--- ./files/patch-ah	Tue Jun  3 11:14:13 1997
+++ ./files/patch-ah	Sun Jan 21 21:06:46 2007
@@ -1,36 +1,36 @@
-*** plot.c.orig	Tue Apr 15 01:07:37 1997
---- plot.c	Tue Apr 15 02:42:45 1997
-***************
-*** 15,25 ****
-  
-  extern char *strcpy();
-  
-  #ifdef VMS
-  #include <perror.h>
-- #include <errno.h>
-  #else
-  extern char *sys_errlist[];
-  extern errno;
-  #endif
-  
---- 15,34 ----
-  
-  extern char *strcpy();
-  
-+ #if (defined(__unix__) || defined(unix)) && !defined(USG)             
-+ #include <sys/param.h>                                                
-+ #endif
-+ 
-+ #if defined(VMS) || defined(unix)
-+ #include <errno.h>
-+ #endif
-+ 
-  #ifdef VMS
-  #include <perror.h>
-  #else
-+ #ifndef BSD
-  extern char *sys_errlist[];
-+ #endif
-  extern errno;
-  #endif
-  
+--- plot.c.orig	Sat Mar 14 23:22:20 1992
++++ plot.c	Sun Jan 21 21:06:06 2007
+@@ -10,16 +10,31 @@
+  */
+ 
+ #include <stdio.h>
++#include <string.h>
+ #include <math.h>
+ #include "screen.h"
+ 
+-extern char *strcpy();
++static plt_select_fields();
++static plt_turn_off();
++static plt_turn_on();
++static plt_file();
++static plot_cartesian(FILE *pfp);
++static plot_polar(FILE *pfp);
++
++#if (defined(__unix__) || defined(unix)) && !defined(USG)             
++#include <sys/param.h>                                                
++#endif
++
++#if defined(VMS) || defined(unix)
++#include <errno.h>
++#endif
+ 
+ #ifdef VMS
+ #include <perror.h>
+-#include <errno.h>
+ #else
++#ifndef BSD
+ extern char *sys_errlist[];
++#endif
+ extern errno;
+ #endif
+ 
diff -up /dev/null 'ephem.new/files/patch-ba'
Index: ./files/patch-ba
--- ./files/patch-ba	Thu Jan  1 01:00:00 1970
+++ ./files/patch-ba	Sun Jan 21 20:40:06 2007
@@ -0,0 +1,12 @@
+diff -u aa_hadec.c.orig aa_hadec.c
+--- aa_hadec.c.orig	Sat Mar 14 23:21:50 1992
++++ aa_hadec.c	Sun Jan 21 20:33:08 2007
+@@ -2,6 +2,8 @@
+ #include <math.h>
+ #include "astro.h"
+ 
++static aaha_aux (double lat, double x, double y, double *p, double *q);
++
+ /* given latitude (n+, radians), lat, altitude (up+, radians), alt, and
+  * azimuth (angle round to the east from north+, radians),
+  * return hour angle (radians), ha, and declination (radians), dec.
diff -up /dev/null 'ephem.new/files/patch-bb'
Index: ./files/patch-bb
--- ./files/patch-bb	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bb	Sun Jan 21 20:40:06 2007
@@ -0,0 +1,16 @@
+diff -u altj.c.orig altj.c
+--- altj.c.orig	Sat Mar 14 23:21:51 1992
++++ altj.c	Sun Jan 21 20:32:47 2007
+@@ -6,6 +6,12 @@
+ #include "circum.h"
+ #include "screen.h"
+ 
++static jupinfo (double d,
++		double *ix, double *ex, double *gx, double *cx,
++		double *iy, double *ey, double *gy, double *cy,
++		double *iz, double *ez, double *gz, double *cz,
++		double *sIcml, double *sIIcml);
++
+ altj_labels()
+ {
+ 	static char grs[] = "(GRS is at approximately 30 degs in System II)";
diff -up /dev/null 'ephem.new/files/patch-bc'
Index: ./files/patch-bc
--- ./files/patch-bc	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bc	Sun Jan 21 20:40:05 2007
@@ -0,0 +1,17 @@
+diff -u altmenus.c.orig altmenus.c
+--- altmenus.c.orig	Sat Mar 14 23:21:53 1992
++++ altmenus.c	Sun Jan 21 20:31:43 2007
+@@ -8,6 +8,13 @@
+ #include "circum.h"
+ #include "screen.h"
+ 
++static alt1_labels();
++static alt2_labels();
++static alt3_labels();
++static alt1_body (int p, int force, Now *np);
++static alt2_body (int p, int force, Now *np);
++static alt3_body (int p, int force, Now *np);
++
+ static int altmenu = F_MNU1;	/* which alternate menu is up; one of F_MNUi */
+ static int alt2_stdhzn;	/* whether to use STDHZN (aot ADPHZN) horizon algthm  */
+ static int alt3_geoc;	/* whether to use geocentric (aot topocentric) vantage*/
diff -up /dev/null 'ephem.new/files/patch-bd'
Index: ./files/patch-bd
--- ./files/patch-bd	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bd	Sun Jan 21 20:40:05 2007
@@ -0,0 +1,12 @@
+diff -u circum.c.orig circum.c
+--- circum.c.orig	Sat Mar 14 23:21:56 1992
++++ circum.c	Sun Jan 21 20:33:31 2007
+@@ -8,6 +8,8 @@
+ #include "circum.h"
+ #include "screen.h"	/* just for SUN and MOON */
+ 
++static about_now (Now *n1, Now *n2, double dt);
++
+ /* find body p's circumstances now.
+  * to save some time the caller may specify a desired accuracy, in arc seconds.
+  * if, based on its mean motion, it would not have moved this much since the
diff -up /dev/null 'ephem.new/files/patch-be'
Index: ./files/patch-be
--- ./files/patch-be	Thu Jan  1 01:00:00 1970
+++ ./files/patch-be	Sun Jan 21 20:40:04 2007
@@ -0,0 +1,18 @@
+diff -u compiler.c.orig compiler.c
+--- compiler.c.orig	Sun Jan 21 20:26:09 2007
++++ compiler.c	Sun Jan 21 20:33:59 2007
+@@ -13,6 +13,14 @@
+ #include <stdlib.h>
+ #endif
+ #include "screen.h"
++#include <stdio.h>
++#include <string.h>
++
++static next_token();
++static skip_double();
++static compile(int prec);
++static execute(double *result);
++static parse_fieldname();
+ 
+ /* parser tokens and opcodes, as necessary */
+ #define	HALT	0	/* good value for HALT since program is inited to 0 */
diff -up /dev/null 'ephem.new/files/patch-bf'
Index: ./files/patch-bf
--- ./files/patch-bf	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bf	Sun Jan 21 20:43:35 2007
@@ -0,0 +1,11 @@
+--- constel.c.orig	Sun Jan 21 20:40:59 2007
++++ constel.c	Sun Jan 21 20:41:27 2007
+@@ -3,6 +3,8 @@
+ #include "screen.h"
+ #include "circum.h"
+ 
++static confnd(double r, double d, double e, char **name);
++
+ /* print the constellation object p is in now as a prompt message.
+  */
+ constellation_msg (p, np)
diff -up /dev/null 'ephem.new/files/patch-bg'
Index: ./files/patch-bg
--- ./files/patch-bg	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bg	Sun Jan 21 20:43:49 2007
@@ -0,0 +1,11 @@
+--- eq_ecl.c.orig	Sun Jan 21 20:41:41 2007
++++ eq_ecl.c	Sun Jan 21 20:42:16 2007
+@@ -2,6 +2,8 @@
+ #include <math.h>
+ #include "astro.h"
+ 
++static ecleq_aux (int sw, double mjd, double x, double y, double *p, double *q);
++
+ #define	EQtoECL	1
+ #define	ECLtoEQ	(-1)
+ 
diff -up /dev/null 'ephem.new/files/patch-bh'
Index: ./files/patch-bh
--- ./files/patch-bh	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bh	Sun Jan 21 20:53:46 2007
@@ -0,0 +1,17 @@
+--- mainmenu.c.orig	Sun Jan 21 20:52:22 2007
++++ mainmenu.c	Sun Jan 21 20:53:27 2007
+@@ -2,10 +2,14 @@
+  */
+ 
+ #include <stdio.h>
++#include <string.h>
+ #include <math.h>
+ #include "astro.h"
+ #include "circum.h"
+ #include "screen.h"
++
++static mm_calendar(Now *np, int force);
++static mm_nfmoon(double jd, double tzone, int m, int f);
+ 
+ /* #define PC_GRAPHICS */
+ #ifdef PC_GRAPHICS
diff -up /dev/null 'ephem.new/files/patch-bi'
Index: ./files/patch-bi
--- ./files/patch-bi	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bi	Sun Jan 21 20:54:46 2007
@@ -0,0 +1,11 @@
+--- moonnf.c.orig	Sun Jan 21 20:53:58 2007
++++ moonnf.c	Sun Jan 21 20:54:21 2007
+@@ -2,6 +2,8 @@
+ #include <math.h>
+ #include "astro.h"
+ 
++static m(double t, double k, double *mjd);
++
+ #define	unw(w,z)	((w)-floor((w)/(z))*(z))
+ 
+ /* given a modified Julian date, mjd, return the mjd of the new
diff -up /dev/null 'ephem.new/files/patch-bj'
Index: ./files/patch-bj
--- ./files/patch-bj	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bj	Sun Jan 21 21:05:01 2007
@@ -0,0 +1,26 @@
+--- plans.c.orig	Sun Jan 21 21:00:06 2007
++++ plans.c	Sun Jan 21 21:04:04 2007
+@@ -2,6 +2,23 @@
+ #include <math.h>
+ #include "astro.h"
+ 
++static masun(double mjd, double *mas);
++static p_mercury(double map[], double *dl, double *dr);
++static p_venus(double t, double mas, double map[],
++	       double *dl, double *dr, double *dml, double *dm);
++static p_mars(double mas, double map[],
++	      double *dl, double *dr, double *dml, double *dm);
++static p_jupiter(double t, double s,
++		 double *dml, double *ds, double *dm, double *da);
++static p_saturn(double t, double s,
++		double *dml, double *ds, double *dm, double *da, double *dhl);
++static p_uranus(double t, double s,
++		double *dl, double* dr, double* dml, double* ds,
++		double* dm, double* da, double* dhl);
++static p_neptune(double t, double s,
++		 double* dl, double* dr, double* dml, double* ds,
++		 double* dm, double* da, double* dhl);
++
+ #define	TWOPI		(2*PI)
+ #define	mod2PI(x)	((x) - (long)((x)/TWOPI)*TWOPI)
+ 
diff -up /dev/null 'ephem.new/files/patch-bk'
Index: ./files/patch-bk
--- ./files/patch-bk	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bk	Sun Jan 21 21:09:11 2007
@@ -0,0 +1,19 @@
+--- riset_c.c.orig	Sun Jan 21 21:07:04 2007
++++ riset_c.c	Sun Jan 21 21:08:51 2007
+@@ -6,6 +6,16 @@
+ #include "circum.h"
+ #include "screen.h"	/* just for SUN and MOON */
+ 
++static iterative_riset(int p, Now *np, int hzn,
++		       double *ltr, double *lts, double *ltt,
++		       double *azr, double *azs, double *altt,
++		       int *status);
++static stationary_riset(int p, double mjd0, Now *np, int hzn,
++			double *lstr, double *lsts, double *lstt,
++			double *azr, double *azs, double *altt,
++			int *status);
++static transit(double r, double d, Now *np, double *lstt, double *altt);
++
+ #define	TRACE(x)	{FILE *fp = fopen("trace","a"); fprintf x; fclose(fp);}
+ 
+ #define	STDREF	degrad(34./60.)	/* nominal horizon refraction amount */
diff -up /dev/null 'ephem.new/files/patch-bl'
Index: ./files/patch-bl
--- ./files/patch-bl	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bl	Sun Jan 21 21:10:22 2007
@@ -0,0 +1,12 @@
+--- sel_fld.c.orig	Sun Jan 21 21:09:19 2007
++++ sel_fld.c	Sun Jan 21 21:10:03 2007
+@@ -1,6 +1,9 @@
+ #include <stdio.h>
+ #include "screen.h"
+ 
++static move_cur(char dirchar, int flag, int *rp, int *cp);
++static int nearestfld(int r, int c, int flag);
++
+ /* define BANG if and only if your system supports the system() function.
+  */
+ #define	BANG
diff -up /dev/null 'ephem.new/files/patch-bm'
Index: ./files/patch-bm
--- ./files/patch-bm	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bm	Sun Jan 21 21:12:01 2007
@@ -0,0 +1,18 @@
+--- srch.c.orig	Sun Jan 21 21:10:29 2007
++++ srch.c	Sun Jan 21 21:11:37 2007
+@@ -6,9 +6,14 @@
+ 
+ #include <stdio.h>
+ #include <math.h>
++#include <string.h>
+ #include "screen.h"
+ 
+-extern char *strcpy();
++static set_function();
++static set_accuracy();
++static srch_minmax(double mjd, double v, double *tmincp);
++static srch_solve0(double mjd, double v, double *tmincp);
++static srch_binary(double mjd, double v, double *tmincp);
+ 
+ static int (*srch_f)();
+ static int srch_tmscalled;
diff -up /dev/null 'ephem.new/files/patch-bn'
Index: ./files/patch-bn
--- ./files/patch-bn	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bn	Sun Jan 21 21:14:22 2007
@@ -0,0 +1,10 @@
+--- utc_gst.c.orig	Sun Jan 21 21:13:45 2007
++++ utc_gst.c	Sun Jan 21 21:14:05 2007
+@@ -1,5 +1,7 @@
+ #include "astro.h"
+ 
++static double tnaught(double mjd);
++
+ /* given a modified julian date, mjd, and a universally coordinated time, utc,
+  * return greenwich mean siderial time, *gst.
+  */
diff -up /dev/null 'ephem.new/files/patch-bo'
Index: ./files/patch-bo
--- ./files/patch-bo	Thu Jan  1 01:00:00 1970
+++ ./files/patch-bo	Sun Jan 21 21:16:46 2007
@@ -0,0 +1,16 @@
+--- watch.c.orig	Sun Jan 21 21:14:29 2007
++++ watch.c	Sun Jan 21 21:16:30 2007
+@@ -51,6 +51,13 @@
+ 
+ static int trails;	/* !0 if want to leave trails */
+ 
++static watch_sky(int style, Now *np, double tminc, int wbodies);
++static watch_solarsystem(Now *np, double tminc, int wbodies);
++static set_ss(LastDraw *lp, double dist, double lg, double lt, char tag);
++static set_screencoords(LastDraw lp[], int np);
++static safe_f_char(int r, int c, char tag);
++static int readwcmd(double tminc0, double *tminc, int *once);
++
+ watch (np, tminc, wbodies)
+ Now *np;	/* time now and on each step */
+ double tminc;	/* hrs to increment time by each step */
#### End of Patch data ####
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-01-21 20:40:32 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Slaven Rezic 2007-01-22 20:23:29 UTC
Edwin Groothuis <edwin@FreeBSD.ORG> writes:

> Maintainer of astro/ephem,
> 
> Please note that PR ports/108190 has just been submitted.
> 
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
> 
> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/108190
> 

The author of the patch <slaven@rezic.de> and me
<eserte@cs.tu-berlin.de> is the same person.

-- 
Slaven Rezic - slaven <at> rezic <dot> de

    tkrevdiff - graphical display of diffs between revisions (RCS, CVS or SVN)
    http://ptktools.sourceforge.net/#tkrevdiff
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2007-01-22 21:24:45 UTC
State Changed
From-To: feedback->open

Submitter is maintainer. 


Comment 4 Mark Linimon freebsd_committer freebsd_triage 2007-01-22 21:24:45 UTC
Class Changed
From-To: change-request->maintainer-update
Comment 5 Pav Lucistnik freebsd_committer freebsd_triage 2007-01-24 23:10:29 UTC
State Changed
From-To: open->closed

Committed with minor change (used modern naming of patch files)
Comment 6 dfilter service freebsd_committer freebsd_triage 2007-01-24 23:18:11 UTC
pav         2007-01-24 23:18:05 UTC

  FreeBSD ports repository

  Modified files:
    astro/ephem          Makefile 
    astro/ephem/files    patch-ad patch-ae patch-af patch-ag 
                         patch-ah 
  Added files:
    astro/ephem/files    patch-aa_hadec.c patch-altj.c 
                         patch-altmenus.c patch-circum.c 
                         patch-compiler.c patch-constel.c 
                         patch-eq_ecl.c patch-mainmenu.c 
                         patch-moonnf.c patch-plans.c 
                         patch-riset_c.c patch-sel_fld.c 
                         patch-srch.c patch-utc_gst.c 
                         patch-watch.c 
  Log:
  - Fix build with gcc41
  - Update maintainer's address
  
  PR:             ports/108190
  Submitted by:   Slaven Rezic <slaven@rezic.de> (maintainer)
  
  Revision  Changes    Path
  1.9       +1 -1      ports/astro/ephem/Makefile
  1.1       +12 -0     ports/astro/ephem/files/patch-aa_hadec.c (new)
  1.2       +62 -70    ports/astro/ephem/files/patch-ad
  1.2       +41 -36    ports/astro/ephem/files/patch-ae
  1.3       +59 -55    ports/astro/ephem/files/patch-af
  1.2       +44 -33    ports/astro/ephem/files/patch-ag
  1.2       +36 -36    ports/astro/ephem/files/patch-ah
  1.1       +16 -0     ports/astro/ephem/files/patch-altj.c (new)
  1.1       +17 -0     ports/astro/ephem/files/patch-altmenus.c (new)
  1.1       +12 -0     ports/astro/ephem/files/patch-circum.c (new)
  1.1       +18 -0     ports/astro/ephem/files/patch-compiler.c (new)
  1.1       +11 -0     ports/astro/ephem/files/patch-constel.c (new)
  1.1       +11 -0     ports/astro/ephem/files/patch-eq_ecl.c (new)
  1.1       +17 -0     ports/astro/ephem/files/patch-mainmenu.c (new)
  1.1       +11 -0     ports/astro/ephem/files/patch-moonnf.c (new)
  1.1       +26 -0     ports/astro/ephem/files/patch-plans.c (new)
  1.1       +19 -0     ports/astro/ephem/files/patch-riset_c.c (new)
  1.1       +12 -0     ports/astro/ephem/files/patch-sel_fld.c (new)
  1.1       +18 -0     ports/astro/ephem/files/patch-srch.c (new)
  1.1       +10 -0     ports/astro/ephem/files/patch-utc_gst.c (new)
  1.1       +16 -0     ports/astro/ephem/files/patch-watch.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"