From 4d91fc9a2dc38054b8748f27193dc3a6950bda3c Mon Sep 17 00:00:00 2001 From: root Date: Tue, 7 Jun 2011 22:47:46 +0000 Subject: Tue Jun 7 22:47:46 UTC 2011 --- staging/kdeedu/gpsd-2.96.patch | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 staging/kdeedu/gpsd-2.96.patch (limited to 'staging/kdeedu/gpsd-2.96.patch') diff --git a/staging/kdeedu/gpsd-2.96.patch b/staging/kdeedu/gpsd-2.96.patch new file mode 100644 index 000000000..ec515e99d --- /dev/null +++ b/staging/kdeedu/gpsd-2.96.patch @@ -0,0 +1,43 @@ +Index: kdeedu-4.5.5/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp +=================================================================== +--- kdeedu-4.5.5.orig/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp ++++ kdeedu-4.5.5/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp +@@ -18,6 +18,9 @@ using namespace Marble; + + GpsdConnection::GpsdConnection( QObject* parent ) + : QObject( parent ), ++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) ++ m_gpsd("localhost", DEFAULT_GPSD_PORT), ++#endif + m_timer( 0 ) + { + connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) ); +@@ -26,7 +29,11 @@ GpsdConnection::GpsdConnection( QObject* + void GpsdConnection::initialize() + { + m_timer.stop(); ++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) ++ gps_data_t* data; ++#else + gps_data_t* data = m_gpsd.open(); ++#endif + if ( data ) { + m_status = PositionProviderStatusAcquiring; + emit statusChanged( m_status ); +@@ -73,8 +80,16 @@ void GpsdConnection::initialize() + void GpsdConnection::update() + { + #if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( PACKET_SET ) ++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) ++ if ( m_gpsd.waiting(0) ) { ++#else + if ( m_gpsd.waiting() ) { ++#endif ++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 ) ++ gps_data_t* data = m_gpsd.read(); ++#else + gps_data_t* data = m_gpsd.poll(); ++#endif + if ( data && data->set & PACKET_SET ) { + emit gpsdInfo( *data ); + } -- cgit v1.2.3-54-g00ecf