diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2011-03-25 20:30:55 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2011-03-25 20:30:55 +0000 |
commit | cb25c93663ce2b1ef7cf43ae5024ef1e564a2637 (patch) | |
tree | 8f03c26168d2f117f52656dbc1db8cdd4093db0d /astro/marble | |
parent | b63f41276692b62ab052c6673a8fe0c0ca1d9092 (diff) | |
download | ports-cb25c93663ce2b1ef7cf43ae5024ef1e564a2637.tar.gz ports-cb25c93663ce2b1ef7cf43ae5024ef1e564a2637.zip |
Notes
Diffstat (limited to 'astro/marble')
-rw-r--r-- | astro/marble/Makefile | 3 | ||||
-rw-r--r-- | astro/marble/files/patch-marble-src-plugins-positionprovider-gpsd-GpsdConnection.cpp | 64 |
2 files changed, 66 insertions, 1 deletions
diff --git a/astro/marble/Makefile b/astro/marble/Makefile index bad76caccdce..99159668483f 100644 --- a/astro/marble/Makefile +++ b/astro/marble/Makefile @@ -7,6 +7,7 @@ PORTNAME= marble PORTVERSION= ${KDE4_VERSION} +PORTREVISION= 1 CATEGORIES= astro kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= ${KDE4_BRANCH}/${PORTVERSION}/src @@ -16,7 +17,7 @@ DIST_SUBDIR= KDE MAINTAINER= kde@FreeBSD.org COMMENT= Virtual globe and world atlas for KDE -LIB_DEPENDS= gps.19:${PORTSDIR}/astro/gpsd +LIB_DEPENDS= gps.20:${PORTSDIR}/astro/gpsd CONFLICTS= kdeedu-4.5.[0-5] diff --git a/astro/marble/files/patch-marble-src-plugins-positionprovider-gpsd-GpsdConnection.cpp b/astro/marble/files/patch-marble-src-plugins-positionprovider-gpsd-GpsdConnection.cpp new file mode 100644 index 000000000000..68a5b9dea204 --- /dev/null +++ b/astro/marble/files/patch-marble-src-plugins-positionprovider-gpsd-GpsdConnection.cpp @@ -0,0 +1,64 @@ +--- ./marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp.orig 2011-03-22 18:32:49.000000000 +0300 ++++ ./marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp 2011-03-22 19:24:18.000000000 +0300 +@@ -18,7 +18,8 @@ + + GpsdConnection::GpsdConnection( QObject* parent ) + : QObject( parent ), +- m_timer( 0 ) ++ m_timer( 0 ), ++ m_gpsd("localhost", DEFAULT_GPSD_PORT) + { + connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) ); + } +@@ -26,15 +27,15 @@ + void GpsdConnection::initialize() + { + m_timer.stop(); +- gps_data_t* data = m_gpsd.open(); +- if ( data ) { ++#if 0 /* I don't see error handling in the new libgpsmm API */ ++ if ( m_gpsd.to_user != NULL ) { ++#endif + m_status = PositionProviderStatusAcquiring; + emit statusChanged( m_status ); + +-#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( WATCH_ENABLE ) + m_gpsd.stream( WATCH_ENABLE ); +-#endif + m_timer.start( 1000 ); ++#if 0 + } + else { + // There is also gps_errstr() for libgps version >= 2.90, +@@ -68,28 +69,17 @@ + + mDebug() << "Connection to gpsd failed, no position info available: " << m_error; + } ++#endif + } + + void GpsdConnection::update() + { +-#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( PACKET_SET ) +- if ( m_gpsd.waiting() ) { +- gps_data_t* data = m_gpsd.poll(); ++ if ( m_gpsd.waiting(5000000) ) { ++ gps_data_t* data = m_gpsd.read(); + if ( data && data->set & PACKET_SET ) { + emit gpsdInfo( *data ); + } + } +-#else +- gps_data_t* data = m_gpsd.query( "o" ); +- +- if ( data ) { +- emit gpsdInfo( *data ); +- } +- else if ( m_status != PositionProviderStatusAcquiring ) { +- mDebug() << "Lost connection to gpsd, trying to re-open."; +- initialize(); +- } +-#endif + } + + QString GpsdConnection::error() const |