aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2011-05-14 23:09:40 +0800
committerarved <arved@FreeBSD.org>2011-05-14 23:09:40 +0800
commit80ae0fd2b00a12dc9ec00af8fbc8734e1b3a809d (patch)
tree4e3b1f38ef51b2f2d6ae6bf5c99589649db61f6f /astro
parent24d911abe3c567cec2db919d810e9f2e3105e283 (diff)
downloadfreebsd-ports-gnome-80ae0fd2b00a12dc9ec00af8fbc8734e1b3a809d.tar.gz
freebsd-ports-gnome-80ae0fd2b00a12dc9ec00af8fbc8734e1b3a809d.tar.zst
freebsd-ports-gnome-80ae0fd2b00a12dc9ec00af8fbc8734e1b3a809d.zip
Fix build after libgps API change
PR: 156489 Submitted by: Christoph Moench-Tegeder <cmt@burggraben.net> Approved by: maintainer timeout
Diffstat (limited to 'astro')
-rw-r--r--astro/qlandkartegt/files/patch-src-CDeviceGPSD.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/astro/qlandkartegt/files/patch-src-CDeviceGPSD.cpp b/astro/qlandkartegt/files/patch-src-CDeviceGPSD.cpp
new file mode 100644
index 000000000000..94fa67203790
--- /dev/null
+++ b/astro/qlandkartegt/files/patch-src-CDeviceGPSD.cpp
@@ -0,0 +1,47 @@
+Index: src/CDeviceGPSD.cpp
+===================================================================
+--- src/CDeviceGPSD.cpp (revision 2719)
++++ src/CDeviceGPSD.cpp (working copy)
+@@ -138,6 +138,7 @@
+ log_mutex( new QMutex() ),
+ pipe_fd( _pipe_fd )
+ {
++ gpsdata = NULL;
+ }
+
+
+@@ -149,7 +150,14 @@
+
+ void CGPSDThread::run()
+ {
++#if GPSD_API_MAJOR_VERSION >= 5
++ int socket;
++
++ if( gpsdata = new gps_data_t )
++ socket = gps_open( "localhost", DEFAULT_GPSD_PORT, gpsdata );
++#else
+ gpsdata = gps_open( "localhost", DEFAULT_GPSD_PORT );
++#endif
+ if( !gpsdata )
+ {
+ // TODO: message box (from other thread)
+@@ -187,13 +195,20 @@
+ } // if
+ else if( FD_ISSET( gpsdata->gps_fd, &fds ) )
+ {
++#if GPSD_API_MAJOR_VERSION >= 5
++ gps_read( gpsdata );
++#else
+ gps_poll( gpsdata );
++#endif
+ if( !decodeData() ) break;
+ } // else if
+ } // else if
+ } // while
+
+ gps_close( gpsdata );
++#if GPSD_API_MAJOR_VERSION >= 5
++ delete gpsdata;
++#endif
+ qDebug() << "thread done";
+ }