diff options
author | tcberner <tcberner@FreeBSD.org> | 2016-11-09 03:53:44 +0800 |
---|---|---|
committer | tcberner <tcberner@FreeBSD.org> | 2016-11-09 03:53:44 +0800 |
commit | 5f400eb2e824d6d91e45ae75080c2ddb0b06e92d (patch) | |
tree | e14ce4eddc011d235f9f61078985adac871c6d79 /astro | |
parent | 87a7b35e945e862f9776dd576475d8dec4da8d7d (diff) | |
download | freebsd-ports-gnome-5f400eb2e824d6d91e45ae75080c2ddb0b06e92d.tar.gz freebsd-ports-gnome-5f400eb2e824d6d91e45ae75080c2ddb0b06e92d.tar.zst freebsd-ports-gnome-5f400eb2e824d6d91e45ae75080c2ddb0b06e92d.zip |
Fix build with newer gcc versions.
Add upstream patch [1] that uses
* math.h -> cmath
* isnan() -> std::isnan()
This fixes compilation with gcc5.
[1] https://quickgit.kde.org/?p=marble.git&a=commit&h=486f6181d6fef15c9b6c72504e3588be502bea80
PR: 213995
Reported by: Kenneth Salerno <kennethsalerno@yahoo.com>
Approved by: rakuco (mentor)
Obtained from: https://quickgit.kde.org/?p=marble.git&a=commit&h=486f6181d6fef15c9b6c72504e3588be502bea80
Diffstat (limited to 'astro')
-rw-r--r-- | astro/marble/files/patch-git_486f618 | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/astro/marble/files/patch-git_486f618 b/astro/marble/files/patch-git_486f618 new file mode 100644 index 000000000000..e8b55fb88f61 --- /dev/null +++ b/astro/marble/files/patch-git_486f618 @@ -0,0 +1,63 @@ +Backport of the the commit 486f618 to old marble. + +From 486f6181d6fef15c9b6c72504e3588be502bea80 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dennis=20Nienh=C3=BCser?= <nienhueser@kde.org> +Date: Sun, 20 Mar 2016 17:43:25 +0100 +Subject: [PATCH] Use std::isnan from cmath + +--- src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.cpp.orig 2014-10-23 21:53:08 UTC ++++ src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.cpp +@@ -12,7 +12,7 @@ + + #include "GpsdThread.h" + #include "MarbleDebug.h" +-#include <math.h> ++#include <cmath> + + using namespace Marble; + /* TRANSLATOR Marble::GpsdPositionProviderPlugin */ +@@ -76,7 +76,7 @@ void GpsdPositionProviderPlugin::update( + { + PositionProviderStatus oldStatus = m_status; + GeoDataCoordinates oldPosition = m_position; +- if ( data.status == STATUS_NO_FIX || isnan( data.fix.longitude ) || isnan( data.fix.latitude ) ) ++ if ( data.status == STATUS_NO_FIX || std::isnan( data.fix.longitude ) || std::isnan( data.fix.latitude ) ) + m_status = PositionProviderStatusUnavailable; + else { + m_status = PositionProviderStatusAvailable; +@@ -88,29 +88,29 @@ void GpsdPositionProviderPlugin::update( + + m_accuracy.level = GeoDataAccuracy::Detailed; + #if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) +- if ( !isnan( data.fix.epx ) && !isnan( data.fix.epy ) ) { ++ if ( !std::isnan( data.fix.epx ) && !std::isnan( data.fix.epy ) ) { + m_accuracy.horizontal = qMax( data.fix.epx, data.fix.epy ); + } + #else +- if ( !isnan( data.fix.eph ) ) { ++ if ( !std::isnan( data.fix.eph ) ) { + m_accuracy.horizontal = data.fix.eph; + } + #endif +- if ( !isnan( data.fix.epv ) ) { ++ if ( !std::isnan( data.fix.epv ) ) { + m_accuracy.vertical = data.fix.epv; + } + +- if( !isnan(data.fix.speed ) ) ++ if( !std::isnan(data.fix.speed ) ) + { + m_speed = data.fix.speed; + } + +- if( !isnan( data.fix.track ) ) ++ if( !std::isnan( data.fix.track ) ) + { + m_track = data.fix.track; + } + +- if ( !isnan( data.fix.time ) ) ++ if ( !std::isnan( data.fix.time ) ) + { + m_timestamp = QDateTime::fromMSecsSinceEpoch( data.fix.time * 1000 ); + } |