[148366] trunk/dports/sysutils/sunwait

mps at macports.org mps at macports.org
Thu May 5 07:59:35 PDT 2016


Revision: 148366
          https://trac.macports.org/changeset/148366
Author:   mps at macports.org
Date:     2016-05-05 07:59:35 -0700 (Thu, 05 May 2016)
Log Message:
-----------
sunwait: fix compile and link issues.

Modified Paths:
--------------
    trunk/dports/sysutils/sunwait/Portfile

Added Paths:
-----------
    trunk/dports/sysutils/sunwait/files/
    trunk/dports/sysutils/sunwait/files/patch-makefile.diff
    trunk/dports/sysutils/sunwait/files/patch-sunriset.cpp.diff

Modified: trunk/dports/sysutils/sunwait/Portfile
===================================================================
--- trunk/dports/sysutils/sunwait/Portfile	2016-05-05 14:51:23 UTC (rev 148365)
+++ trunk/dports/sysutils/sunwait/Portfile	2016-05-05 14:59:35 UTC (rev 148366)
@@ -34,6 +34,9 @@
 
 worksrcdir          ${name}/${version}
 
+patchfiles          patch-makefile.diff \
+                    patch-sunriset.cpp.diff
+
 use_configure       no
 
 build.target        sunwait

Added: trunk/dports/sysutils/sunwait/files/patch-makefile.diff
===================================================================
--- trunk/dports/sysutils/sunwait/files/patch-makefile.diff	                        (rev 0)
+++ trunk/dports/sysutils/sunwait/files/patch-makefile.diff	2016-05-05 14:59:35 UTC (rev 148366)
@@ -0,0 +1,11 @@
+--- makefile.orig	2015-06-01 08:25:41.000000000 -0500
++++ makefile	2016-05-05 09:55:42.000000000 -0500
+@@ -8,7 +8,7 @@
+ C=gcc
+ CFLAGS=-c -Wall 
+ LDFLAGS= -lm -lstdc++
+-SOURCES=sunwait.cpp sunriset.cpp print.cpp sunwait.h sunriset.h print.h
++SOURCES=sunwait.cpp sunriset.cpp print.cpp
+ OBJECTS=$(SOURCES:.cpp=.o)
+ EXECUTABLE=sunwait
+ 

Added: trunk/dports/sysutils/sunwait/files/patch-sunriset.cpp.diff
===================================================================
--- trunk/dports/sysutils/sunwait/files/patch-sunriset.cpp.diff	                        (rev 0)
+++ trunk/dports/sysutils/sunwait/files/patch-sunriset.cpp.diff	2016-05-05 14:59:35 UTC (rev 148366)
@@ -0,0 +1,11 @@
+--- sunriset.cpp.orig	2015-06-01 08:25:41.000000000 -0500
++++ sunriset.cpp	2016-05-05 08:11:03.000000000 -0500
+@@ -92,7 +92,7 @@
+   /* compute the diurnal arc that the sun traverses to reach the specified altitide altit: */
+   double cost = (sind(altitude) - sind(pRun->latitude) * sind(sdec)) / (cosd(pRun->latitude) * cosd(sdec));
+ 
+-  if (abs(cost) < 1.0)
++  if (fabs(cost) < 1.0)
+     diurnalArc = 2*acosd(cost)/15.0;    /* Diurnal arc, hours */
+   else if (cost>=1.0)
+     diurnalArc =  0.0; // Polar Night
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160505/e7e03b7a/attachment-0001.html>


More information about the macports-changes mailing list