aboutsummaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2005-10-14 10:05:58 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2005-10-14 10:05:58 +0000
commit7f44731a81d306207aa7dee128a42d3385bb094e (patch)
tree298ac73a226ad3cd464bba42feafc33183a4eb92 /astro
parent6524cf265635a5e5efe9476dbb2dc8d03ecfb2dd (diff)
downloadports-7f44731a81d306207aa7dee128a42d3385bb094e.tar.gz
ports-7f44731a81d306207aa7dee128a42d3385bb094e.zip
Fix build of astro/mymoon
Notes
Notes: svn path=/head/; revision=145355
Diffstat (limited to 'astro')
-rw-r--r--astro/mymoon/Makefile3
-rw-r--r--astro/mymoon/distinfo4
-rw-r--r--astro/mymoon/files/patch-configure37
-rw-r--r--astro/mymoon/files/patch-grapher.h26
-rw-r--r--astro/mymoon/files/patch-mymoon.c57
5 files changed, 101 insertions, 26 deletions
diff --git a/astro/mymoon/Makefile b/astro/mymoon/Makefile
index bf2f736cfa95..a49113a8a04f 100644
--- a/astro/mymoon/Makefile
+++ b/astro/mymoon/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= mymoon
-PORTVERSION= 1.0
-PORTREVISION= 1
+DISTVERSION= 1.2a
CATEGORIES= astro
MASTER_SITES= http://makemebad.net/geek/codes/${PORTNAME}/ \
${MASTER_SITE_LOCAL}
diff --git a/astro/mymoon/distinfo b/astro/mymoon/distinfo
index 19fefd080a2a..92bc6e5f3de8 100644
--- a/astro/mymoon/distinfo
+++ b/astro/mymoon/distinfo
@@ -1,2 +1,2 @@
-MD5 (mymoon-1.0.tar.gz) = 3b49f37575a7c5a907a7c5eb86f0d6a8
-SIZE (mymoon-1.0.tar.gz) = 28488
+MD5 (mymoon-1.2a.tar.gz) = 4516da85246dec5420a85430c3e733ab
+SIZE (mymoon-1.2a.tar.gz) = 31847
diff --git a/astro/mymoon/files/patch-configure b/astro/mymoon/files/patch-configure
new file mode 100644
index 000000000000..4e83da2d07f8
--- /dev/null
+++ b/astro/mymoon/files/patch-configure
@@ -0,0 +1,37 @@
+--- configure.orig Sat May 24 06:09:38 2003
++++ configure Fri Oct 14 19:51:18 2005
+@@ -849,7 +849,7 @@
+
+ PACKAGE=mymoon
+ VERSION=1.0
+-for ac_hdr in ncurses.h curses.h libnova.h math.h
++for ac_hdr in ncurses.h curses.h libnova/libnova.h math.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+@@ -890,9 +890,9 @@
+ done
+
+ LNOVA_LIB_NAME=""
+-echo $ac_n "checking for get_ln_version in -lnova""... $ac_c" 1>&6
+-echo "configure:895: checking for get_ln_version in -lnova" >&5
+-ac_lib_var=`echo nova'_'get_ln_version | sed 'y%./+-%__p_%'`
++echo $ac_n "checking for ln_get_version in -lnova""... $ac_c" 1>&6
++echo "configure:895: checking for ln_get_version in -lnova" >&5
++ac_lib_var=`echo nova'_'ln_get_version | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -904,10 +904,10 @@
+ /* Override any gcc2 internal prototype to avoid an error. */
+ /* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+-char get_ln_version();
++char ln_get_version();
+
+ int main() {
+-get_ln_version()
++ln_get_version()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
diff --git a/astro/mymoon/files/patch-grapher.h b/astro/mymoon/files/patch-grapher.h
new file mode 100644
index 000000000000..0d84ed14adad
--- /dev/null
+++ b/astro/mymoon/files/patch-grapher.h
@@ -0,0 +1,26 @@
+--- grapher.h.orig Fri Oct 14 19:54:56 2005
++++ grapher.h Fri Oct 14 19:55:14 2005
+@@ -13,15 +13,14 @@
+ for (z=0;z<=progress;z++) {arrow[z]=bar;}for (k=z;k<=max/4;k++) {arrow[k]=empty;}
+
+ mvprintw(row/4,0,
+-"
+- Moon's situation at: %d/%d/%d %d:%d:%d
+- Age: +- %d days
+- Rise: %d/%d/%d %d:%d:%d
+- Set: %d/%d/%d %d:%d:%d
+- Illuminated: %.4f%%
+- Moon->Earth distance: %.3f Km
+- Distance meter: %s (%d%%)
+-",
++ "Moon's situation at: %d/%d/%d %d:%d:%d\n"
++ "Age: +- %d days\n"
++ "Rise: %d/%d/%d %d:%d:%d\n"
++ "Set: %d/%d/%d %d:%d:%d\n"
++ "Illuminated: %.4f%% \n"
++ "Moon->Earth distance: %.3f Km\n"
++ "Distance meter: %s (%d%%)\n"
++,
+ date3.days,date3.months,date3.years,date3.hours,date3.minutes,(int)date3.seconds,(int)age,
+ date1.days,date1.months,date1.years,date1.hours,date1.minutes,(int)date1.seconds,
+ date2.days,date2.months,date2.years,date2.hours,date2.minutes,(int)date2.seconds,light,distance,arrow,progress*4);
diff --git a/astro/mymoon/files/patch-mymoon.c b/astro/mymoon/files/patch-mymoon.c
index f6bb0da8788a..2288dffaa3c1 100644
--- a/astro/mymoon/files/patch-mymoon.c
+++ b/astro/mymoon/files/patch-mymoon.c
@@ -1,23 +1,36 @@
---- mymoon.c.orig Fri Jul 18 09:25:58 2003
-+++ mymoon.c Fri Jul 18 09:26:35 2003
-@@ -122,14 +122,12 @@
- getmaxyx(stdscr,row,cols);
+--- mymoon.c.orig Wed Jul 16 21:13:55 2003
++++ mymoon.c Fri Oct 14 19:55:31 2005
+@@ -1,4 +1,4 @@
+-#include <libnova.h>
++#include <libnova/libnova.h>
+ #include <curses.h>
+ #include <time.h>
+ #include <stdlib.h>
+@@ -59,7 +59,7 @@
+ memset(&date3, 0, sizeof(date3));
+
+ while (1) {
+-julian=get_julian_from_sys();
++julian=ln_get_julian_from_sys();
+ age=moonphase();
- mvprintw(row/4,0,
--"
-- Moon's situation at: %d/%d/%d %d:%d:%d
-- Age: +- %d days
-- Rise: %d/%d/%d %d:%d:%d
-- Set: %d/%d/%d %d:%d:%d
-- Illuminated: %.4f%%
-- Moon->Earth distance: %.3f Km\n\n
--",
-+ "Moon's situation at: %d/%d/%d %d:%d:%d\n"
-+ "Age: +- %d days\n"
-+ "Rise: %d/%d/%d %d:%d:%d\n"
-+ "Set: %d/%d/%d %d:%d:%d\n"
-+ "Illuminated: %.4f%%\n"
-+ "Moon->Earth distance: %.3f Km\n\n",
- date3.days,date3.months,date3.years,date3.hours,date3.minutes,(int)date3.seconds,(int)age,
- date1.days,date1.months,date1.years,date1.hours,date1.minutes,(int)date1.seconds,
- date2.days,date2.months,date2.years,date2.hours,date2.minutes,(int)date2.seconds,light,dist);
+
+@@ -67,12 +67,12 @@
+ observer.lng=latitude;
+ observer.lat=longitude;
+ } else {observer.lng=45.12;observer.lat=8.42;}
+-light=100*get_lunar_disk(julian);
+-dist=get_lunar_earth_dist(julian);
+-get_lunar_rst(julian,&observer,&rst);
+-get_date(rst.rise,&date1);
+-get_date(rst.set,&date2);
+-get_date(julian,&date3);
++light=100*ln_get_lunar_disk(julian);
++dist=ln_get_lunar_earth_dist(julian);
++ln_get_lunar_rst(julian,&observer,&rst);
++ln_get_date(rst.rise,&date1);
++ln_get_date(rst.set,&date2);
++ln_get_date(julian,&date3);
+ getmaxyx(stdscr,row,cols);
+ grapher(dist,row,date1,date2,date3,age,light);
+ napms(update * 1000);