aboutsummaryrefslogtreecommitdiff
path: root/astro/foxtrotgps
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2011-03-25 20:30:55 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2011-03-25 20:30:55 +0000
commitcb25c93663ce2b1ef7cf43ae5024ef1e564a2637 (patch)
tree8f03c26168d2f117f52656dbc1db8cdd4093db0d /astro/foxtrotgps
parentb63f41276692b62ab052c6673a8fe0c0ca1d9092 (diff)
downloadports-cb25c93663ce2b1ef7cf43ae5024ef1e564a2637.tar.gz
ports-cb25c93663ce2b1ef7cf43ae5024ef1e564a2637.zip
- Chase astro/gpsd shlib version bump
- Add patches required for compatibility with new version of libgps Submitted by: glebius Tested by: glebius
Notes
Notes: svn path=/head/; revision=271753
Diffstat (limited to 'astro/foxtrotgps')
-rw-r--r--astro/foxtrotgps/Makefile4
-rw-r--r--astro/foxtrotgps/files/patch-src-gps_functions.c94
2 files changed, 96 insertions, 2 deletions
diff --git a/astro/foxtrotgps/Makefile b/astro/foxtrotgps/Makefile
index 9f61a39c8806..db8a9eebfdbb 100644
--- a/astro/foxtrotgps/Makefile
+++ b/astro/foxtrotgps/Makefile
@@ -7,7 +7,7 @@
PORTNAME= foxtrotgps
PORTVERSION= 1.0.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= astro geography
MASTER_SITES= http://www.foxtrotgps.org/releases/
@@ -17,7 +17,7 @@ COMMENT= A lightweight opensource gps moving map application
LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl \
exif.12:${PORTSDIR}/graphics/libexif \
soup-2.4.1:${PORTSDIR}/devel/libsoup \
- gps.19:${PORTSDIR}/astro/gpsd
+ gps.20:${PORTSDIR}/astro/gpsd
USE_AUTOTOOLS= automake aclocal libtool autoconf
ACLOCAL_ARGS= --force
diff --git a/astro/foxtrotgps/files/patch-src-gps_functions.c b/astro/foxtrotgps/files/patch-src-gps_functions.c
new file mode 100644
index 000000000000..8af3e957381c
--- /dev/null
+++ b/astro/foxtrotgps/files/patch-src-gps_functions.c
@@ -0,0 +1,94 @@
+--- src/gps_functions.c.orig 2011-03-22 21:11:33.000000000 +0300
++++ src/gps_functions.c 2011-03-22 21:58:20.000000000 +0300
+@@ -31,7 +31,8 @@
+
+
+ static GIOChannel *gpsd_io_channel =NULL;
+-static struct gps_data_t *libgps_gpsdata = NULL;
++static struct gps_data_t libgps_gpsdata;
++static int libgps_initialized = 0;
+
+ static guint sid1, sid3;
+ guint watchdog;
+@@ -699,9 +700,7 @@
+ gpsdata = NULL;
+ g_source_remove(sid1);
+ g_source_remove(sid3);
+- gps_close(libgps_gpsdata);
+- libgps_gpsdata = NULL;
+-
++ gps_close(&libgps_gpsdata);
+
+ return FALSE;
+ }
+@@ -713,28 +712,28 @@
+ {
+ int ret;
+
+- if (libgps_gpsdata == NULL)
++ if (libgps_initialized == 0)
+ return FALSE;
+
+- ret = gps_poll(libgps_gpsdata);
+- if (ret == 0)
++ ret = gps_read(&libgps_gpsdata);
++ if (ret > 0)
+ {
+- gpsdata->satellites_used = libgps_gpsdata->satellites_used;
+- gpsdata->hdop = libgps_gpsdata->dop.hdop;
+- gpsdata->fix.time = libgps_gpsdata->fix.time;
++ gpsdata->satellites_used = libgps_gpsdata.satellites_used;
++ gpsdata->hdop = libgps_gpsdata.dop.hdop;
++ gpsdata->fix.time = libgps_gpsdata.fix.time;
+ if (isnan(gpsdata->fix.time))
+ {
+ gpsdata->fix.time = (time_t) 0;
+ }
+- gpsdata->valid = (libgps_gpsdata->status != STATUS_NO_FIX);
++ gpsdata->valid = (libgps_gpsdata.status != STATUS_NO_FIX);
+ if (gpsdata->valid)
+ {
+ gpsdata->seen_vaild = TRUE;
+- gpsdata->fix.latitude = libgps_gpsdata->fix.latitude;
+- gpsdata->fix.longitude = libgps_gpsdata->fix.longitude;
+- gpsdata->fix.speed = libgps_gpsdata->fix.speed;
+- gpsdata->fix.heading = libgps_gpsdata->fix.track;
+- gpsdata->fix.altitude = libgps_gpsdata->fix.altitude;
++ gpsdata->fix.latitude = libgps_gpsdata.fix.latitude;
++ gpsdata->fix.longitude = libgps_gpsdata.fix.longitude;
++ gpsdata->fix.speed = libgps_gpsdata.fix.speed;
++ gpsdata->fix.heading = libgps_gpsdata.fix.track;
++ gpsdata->fix.altitude = libgps_gpsdata.fix.altitude;
+ }
+
+ g_source_remove(watchdog);
+@@ -758,11 +757,11 @@
+ void *
+ get_gps_thread(void *ptr)
+ {
+- libgps_gpsdata = gps_open(global_server, global_port);
+- if (libgps_gpsdata)
++ if (gps_open(global_server, global_port, &libgps_gpsdata) == 0)
+ {
+ fprintf(stderr, "connection to gpsd SUCCEEDED \n");
+-
++
++ libgps_initialized = 1;
+ global_reconnect_gpsd = FALSE;
+
+ if(!gpsdata)
+@@ -771,12 +770,12 @@
+ }
+
+
+- gps_stream(libgps_gpsdata, WATCH_ENABLE | POLL_NONBLOCK, NULL);
++ gps_stream(&libgps_gpsdata, WATCH_ENABLE, NULL);
+
+ watchdog = g_timeout_add_seconds_full(G_PRIORITY_DEFAULT_IDLE,60,reset_gpsd_io,NULL,NULL);
+
+
+- gpsd_io_channel = g_io_channel_unix_new(libgps_gpsdata->gps_fd);
++ gpsd_io_channel = g_io_channel_unix_new(libgps_gpsdata.gps_fd);
+ g_io_channel_set_flags(gpsd_io_channel, G_IO_FLAG_NONBLOCK, NULL);
+
+