pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/geography/opencpn-plugin-watchdog The compiler on netb...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c6357ce947a7
branches: trunk
changeset: 378509:c6357ce947a7
user: bouyer <bouyer%pkgsrc.org@localhost>
date: Mon Apr 09 14:18:26 2018 +0000
description:
The compiler on netbsd-HEAD/earv7hf wants std::isnan, isnan cause an error.
diffstat:
geography/opencpn-plugin-watchdog/distinfo | 4 +-
geography/opencpn-plugin-watchdog/patches/patch-src_Alarm.cpp | 139 ++++++++++
geography/opencpn-plugin-watchdog/patches/patch-src_watchdog_pi.cpp | 21 +
3 files changed, 163 insertions(+), 1 deletions(-)
diffs (182 lines):
diff -r e6c4101142e3 -r c6357ce947a7 geography/opencpn-plugin-watchdog/distinfo
--- a/geography/opencpn-plugin-watchdog/distinfo Mon Apr 09 12:14:41 2018 +0000
+++ b/geography/opencpn-plugin-watchdog/distinfo Mon Apr 09 14:18:26 2018 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.7 2018/04/05 16:20:40 bouyer Exp $
+$NetBSD: distinfo,v 1.8 2018/04/09 14:18:26 bouyer Exp $
SHA1 (watchdog_pi-20180405-4e79fdba96ccd1a17b81166e6956571bf734597d.tar.gz) = e96b4390349488a41d8ca74203a3316512be84cb
RMD160 (watchdog_pi-20180405-4e79fdba96ccd1a17b81166e6956571bf734597d.tar.gz) = 033f0c65129a811b01ce24655c9bc4ec4435f3d8
SHA512 (watchdog_pi-20180405-4e79fdba96ccd1a17b81166e6956571bf734597d.tar.gz) =
9398cc2663d5acee13022105a98a76eb1b2dc3cf67e7d49bb0554161488125276b181e9e5392654dea23413e167b95b0acfd4600d1f4ed1c72b678e622873c89
Size (watchdog_pi-20180405-4e79fdba96ccd1a17b81166e6956571bf734597d.tar.gz) = 485682 bytes
SHA1 (patch-cmake_PluginConfigure.cmake) = bc2d6409f95cffee145173280c33f9e7fe439864
+SHA1 (patch-src_Alarm.cpp) = 5cbe32ca31ad1ec8407683358e0a5c44ea062e06
+SHA1 (patch-src_watchdog_pi.cpp) = bcae586e09820f80ea34d5c497476b0883742b5b
diff -r e6c4101142e3 -r c6357ce947a7 geography/opencpn-plugin-watchdog/patches/patch-src_Alarm.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/geography/opencpn-plugin-watchdog/patches/patch-src_Alarm.cpp Mon Apr 09 14:18:26 2018 +0000
@@ -0,0 +1,139 @@
+$NetBSD: patch-src_Alarm.cpp,v 1.1 2018/04/09 14:18:26 bouyer Exp $
+
+--- src/Alarm.cpp.orig 2018-04-09 14:38:56.349739590 +0200
++++ src/Alarm.cpp 2018-04-09 14:39:24.526834514 +0200
+@@ -81,7 +81,7 @@
+ bool Test() {
+ PlugIn_Position_Fix_Ex lastfix = g_watchdog_pi->LastFix();
+
+- if(isnan(lastfix.Lat))
++ if(std::isnan(lastfix.Lat))
+ return m_bNoData;
+
+ double lat1 = lastfix.Lat, lon1 = lastfix.Lon, lat2, lon2;
+@@ -188,7 +188,7 @@
+
+ void Render(wdDC &dc, PlugIn_ViewPort &vp) {
+ PlugIn_Position_Fix_Ex lastfix = g_watchdog_pi->LastFix();
+- if(isnan(m_crossinglat1))
++ if(std::isnan(m_crossinglat1))
+ return;
+
+ wxPoint r1, r2, r3, r4;
+@@ -350,7 +350,7 @@
+ bool Test() {
+ PlugIn_Position_Fix_Ex lastfix = g_watchdog_pi->LastFix();
+
+- if(isnan(lastfix.Lat))
++ if(std::isnan(lastfix.Lat))
+ return m_bNoData;
+
+ double lat, lon;
+@@ -1701,7 +1701,7 @@
+ }
+
+ bool Test() {
+- if(isnan(g_watchdog_pi->m_sog))
++ if(std::isnan(g_watchdog_pi->m_sog))
+ return m_bNoData;
+ return Distance() > m_Radius;
+ }
+@@ -1718,7 +1718,7 @@
+
+ double anchordist = Distance();
+ wxString s;
+- if(isnan(anchordist))
++ if(std::isnan(anchordist))
+ s = _T("N/A");
+ else {
+ wxString fmt(_T("%.0f "));
+@@ -1782,7 +1782,7 @@
+
+ private:
+ double Distance() {
+- if(isnan(g_watchdog_pi->m_cog))
++ if(std::isnan(g_watchdog_pi->m_cog))
+ return NAN;
+ PlugIn_Position_Fix_Ex lastfix = g_watchdog_pi->LastFix();
+
+@@ -1820,7 +1820,7 @@
+
+ bool Test() {
+ double error = CourseError();
+- if(isnan(error))
++ if(std::isnan(error))
+ return m_bNoData;
+
+ return error > m_Tolerance;
+@@ -1829,7 +1829,7 @@
+ wxString GetStatus() {
+ double courseerror = CourseError();
+ wxString s;
+- if(isnan(courseerror))
++ if(std::isnan(courseerror))
+ s = _T("N/A");
+ else {
+ wxString fmt(_T("%.0f "));
+@@ -1850,7 +1850,7 @@
+ double lat1 = lastfix.Lat, lon1 = lastfix.Lon, lat2, lon2, lat3, lon3;
+ double dist = lastfix.Sog;
+
+- if(isnan(dist))
++ if(std::isnan(dist))
+ return;
+
+ PositionBearingDistanceMercator_Plugin(lat1, lon1, m_Course+m_Tolerance,
+@@ -1949,7 +1949,7 @@
+
+ wxString GetStatus() {
+ wxString s;
+- if(isnan(g_watchdog_pi->m_sog))
++ if(std::isnan(g_watchdog_pi->m_sog))
+ s = _T("N/A");
+ else {
+ wxString fmt(_T("%.1f"));
+@@ -1983,7 +1983,7 @@
+
+ bool Test() {
+ double knots = Knots();
+- if(isnan(knots))
++ if(std::isnan(knots))
+ return m_bNoData;
+
+ if(m_Mode == UNDERSPEED)
+@@ -2038,7 +2038,7 @@
+ {
+ Alarm::OnTimer( tEvent );
+ double sog = g_watchdog_pi->LastFix().Sog;
+- if(!isnan(sog))
++ if(!std::isnan(sog))
+ m_SOGqueue.push_front(sog) ;
+ return;
+ }
+@@ -2101,7 +2101,7 @@
+ val = 360 - val;
+ }
+
+- if(isnan(val))
++ if(std::isnan(val))
+ s = _T("N/A");
+ else {
+ wxString fmt(_T("%.1f"));
+@@ -2300,7 +2300,7 @@
+ s += _T(" ");
+
+ double val = Value();
+- if(isnan(val))
++ if(std::isnan(val))
+ s += _T("N/A");
+ else {
+ wxString fmt(_T("%.2f"));
+@@ -2439,7 +2439,7 @@
+ value = nmea.Mtw.Temperature;
+ break;
+ }
+- if(isnan(value))
++ if(std::isnan(value))
+ return;
+
+ m_WeatherDataTime = wxDateTime::Now();
diff -r e6c4101142e3 -r c6357ce947a7 geography/opencpn-plugin-watchdog/patches/patch-src_watchdog_pi.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/geography/opencpn-plugin-watchdog/patches/patch-src_watchdog_pi.cpp Mon Apr 09 14:18:26 2018 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_watchdog_pi.cpp,v 1.1 2018/04/09 14:18:26 bouyer Exp $
+
+--- src/watchdog_pi.cpp.orig 2018-04-09 14:24:25.426153922 +0200
++++ src/watchdog_pi.cpp 2018-04-09 14:25:01.452945740 +0200
+@@ -345,14 +345,14 @@
+ {
+ /* calculate course and speed over ground from gps */
+ double dt = m_lastfix.FixTime - m_lasttimerfix.FixTime;
+- if(!isnan(m_lastfix.Lat) && !isnan(m_lasttimerfix.Lat) && dt > 0) {
++ if(!std::isnan(m_lastfix.Lat) && !std::isnan(m_lasttimerfix.Lat) && dt > 0) {
+ /* this way helps avoid surge speed from gps from surfing waves etc... */
+ double cog, sog;
+ DistanceBearingMercator_Plugin(m_lastfix.Lat, m_lastfix.Lon,
+ m_lasttimerfix.Lat, m_lasttimerfix.Lon, &cog, &sog);
+ sog *= (3600.0 / dt);
+
+- if(isnan(m_cog))
++ if(std::isnan(m_cog))
+ m_cog = cog, m_sog = sog;
+ else {
+ m_cog = .25*cog + .75*m_cog;
Home |
Main Index |
Thread Index |
Old Index