Gentoo Archives: gentoo-commits

From: "Alexey Shvetsov (alexxy)" <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in kde-base/marble/files: marble-4.5.5-gpsd.patch
Date: Thu, 28 Jul 2011 20:02:23
Message-Id: 20110728200213.DE2A42004B@flycatcher.gentoo.org
1 alexxy 11/07/28 20:02:13
2
3 Added: marble-4.5.5-gpsd.patch
4 Log:
5 [kde-base/marble] Fix bug #367571
6
7 (Portage version: 2.2.0_alpha47/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 kde-base/marble/files/marble-4.5.5-gpsd.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/marble/files/marble-4.5.5-gpsd.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/marble/files/marble-4.5.5-gpsd.patch?rev=1.1&content-type=text/plain
14
15 Index: marble-4.5.5-gpsd.patch
16 ===================================================================
17 Index: kdeedu-4.5.5/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp
18 ===================================================================
19 --- kdeedu-4.5.5.orig/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp
20 +++ kdeedu-4.5.5/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp
21 @@ -18,6 +18,9 @@ using namespace Marble;
22
23 GpsdConnection::GpsdConnection( QObject* parent )
24 : QObject( parent ),
25 +#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
26 + m_gpsd("localhost", DEFAULT_GPSD_PORT),
27 +#endif
28 m_timer( 0 )
29 {
30 connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) );
31 @@ -26,7 +29,11 @@ GpsdConnection::GpsdConnection( QObject*
32 void GpsdConnection::initialize()
33 {
34 m_timer.stop();
35 +#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
36 + gps_data_t* data;
37 +#else
38 gps_data_t* data = m_gpsd.open();
39 +#endif
40 if ( data ) {
41 m_status = PositionProviderStatusAcquiring;
42 emit statusChanged( m_status );
43 @@ -73,8 +80,16 @@ void GpsdConnection::initialize()
44 void GpsdConnection::update()
45 {
46 #if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( PACKET_SET )
47 +#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
48 + if ( m_gpsd.waiting(0) ) {
49 +#else
50 if ( m_gpsd.waiting() ) {
51 +#endif
52 +#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
53 + gps_data_t* data = m_gpsd.read();
54 +#else
55 gps_data_t* data = m_gpsd.poll();
56 +#endif
57 if ( data && data->set & PACKET_SET ) {
58 emit gpsdInfo( *data );
59 }