[126403] trunk/dports/kde/kstars

nicos at macports.org nicos at macports.org
Thu Oct 9 09:07:15 PDT 2014


Revision: 126403
          https://trac.macports.org/changeset/126403
Author:   nicos at macports.org
Date:     2014-10-09 09:07:15 -0700 (Thu, 09 Oct 2014)
Log Message:
-----------
kstars: fix build on older platforms

Modified Paths:
--------------
    trunk/dports/kde/kstars/Portfile

Added Paths:
-----------
    trunk/dports/kde/kstars/files/patch-isnan.diff

Modified: trunk/dports/kde/kstars/Portfile
===================================================================
--- trunk/dports/kde/kstars/Portfile	2014-10-09 12:32:11 UTC (rev 126402)
+++ trunk/dports/kde/kstars/Portfile	2014-10-09 16:07:15 UTC (rev 126403)
@@ -37,6 +37,10 @@
 patchfiles-append   patch-CMakeLists.txt.diff \
                     patch-starobject.diff
 
+if {${os.major} < 13 && ${os.platform} eq "darwin"} {
+    patchfiles-append   patch-isnan.diff
+}
+
 variant x11 {
     depends_lib-append  port:xplanet
 }

Added: trunk/dports/kde/kstars/files/patch-isnan.diff
===================================================================
--- trunk/dports/kde/kstars/files/patch-isnan.diff	                        (rev 0)
+++ trunk/dports/kde/kstars/files/patch-isnan.diff	2014-10-09 16:07:15 UTC (rev 126403)
@@ -0,0 +1,48 @@
+diff -ur ../kstars-4.13.3-orig/kstars/skycomponents/asteroidscomponent.cpp ./kstars/skycomponents/asteroidscomponent.cpp
+--- ../kstars-4.13.3-orig/kstars/skycomponents/asteroidscomponent.cpp	2014-06-25 16:24:16.000000000 +0900
++++ ./kstars/skycomponents/asteroidscomponent.cpp	2014-10-10 00:57:41.000000000 +0900
+@@ -194,7 +194,7 @@
+         // FIXME: God help us!
+         KSAsteroid *ast = (KSAsteroid*) so;
+ 
+-        if ( ast->mag() > Options::magLimitAsteroid() || isnan(ast->mag()) != 0)
++        if ( ast->mag() > Options::magLimitAsteroid() || std::isnan(ast->mag()) != 0)
+             continue;
+ 
+         bool drawn = skyp->drawPointSource(ast,ast->mag());
+diff -ur ../kstars-4.13.3-orig/kstars/skycomponents/cometscomponent.cpp ./kstars/skycomponents/cometscomponent.cpp
+--- ../kstars-4.13.3-orig/kstars/skycomponents/cometscomponent.cpp	2014-06-25 16:24:16.000000000 +0900
++++ ./kstars/skycomponents/cometscomponent.cpp	2014-10-10 00:57:49.000000000 +0900
+@@ -191,7 +191,7 @@
+     foreach ( SkyObject *so, m_ObjectList ) {
+         KSComet *com = (KSComet*)so;
+         double mag= com->mag();
+-        if (isnan(mag) == 0)
++        if (std::isnan(mag) == 0)
+         {
+             bool drawn = skyp->drawPointSource(com,mag);
+             if ( drawn && !(hideLabels || com->rsun() >= rsunLabelLimit) )
+diff -ur ../kstars-4.13.3-orig/kstars/skyobjects/ksmoon.cpp ./kstars/skyobjects/ksmoon.cpp
+--- ../kstars-4.13.3-orig/kstars/skyobjects/ksmoon.cpp	2014-06-25 16:24:16.000000000 +0900
++++ ./kstars/skyobjects/ksmoon.cpp	2014-10-10 00:58:25.000000000 +0900
+@@ -226,7 +226,7 @@
+     // relevant data put into ksplanetbase.h) was taken from
+     // SkyChart v3 Beta
+     double phd = phase().Degrees();
+-    if( isnan( phd ) ) // Avoid nanny phases.
++    if( std::isnan( phd ) ) // Avoid nanny phases.
+         return;
+     int p = floor( phd );
+     if( p > 180 )
+diff -ur ../kstars-4.13.3-orig/kstars/skyobjects/starobject.cpp ./kstars/skyobjects/starobject.cpp
+--- ../kstars-4.13.3-orig/kstars/skyobjects/starobject.cpp	2014-06-25 16:24:16.000000000 +0900
++++ ./kstars/skyobjects/starobject.cpp	2014-10-10 00:58:31.000000000 +0900
+@@ -282,7 +282,7 @@
+ 
+     pmms = pmMagnitudeSquared();
+ 
+-    if( isnan( pmms ) || pmms * num->julianMillenia() * num->julianMillenia() < 1. ) {
++    if( std::isnan( pmms ) || pmms * num->julianMillenia() * num->julianMillenia() < 1. ) {
+         // Ignore corrections
+         *ra = ra0().Degrees();
+         *dec = dec0().Degrees();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141009/093b35ed/attachment.html>


More information about the macports-changes mailing list