summaryrefslogtreecommitdiff
path: root/sci-geosciences/foxtrotgps/files
diff options
context:
space:
mode:
Diffstat (limited to 'sci-geosciences/foxtrotgps/files')
-rw-r--r--sci-geosciences/foxtrotgps/files/foxtrotgps-1.2.2-gcc10.patch24
-rw-r--r--sci-geosciences/foxtrotgps/files/foxtrotgps-1.2.2-gpsd-api9.patch37
2 files changed, 61 insertions, 0 deletions
diff --git a/sci-geosciences/foxtrotgps/files/foxtrotgps-1.2.2-gcc10.patch b/sci-geosciences/foxtrotgps/files/foxtrotgps-1.2.2-gcc10.patch
new file mode 100644
index 000000000000..5a67f26de561
--- /dev/null
+++ b/sci-geosciences/foxtrotgps/files/foxtrotgps-1.2.2-gcc10.patch
@@ -0,0 +1,24 @@
+diff -ur a/src/callbacks.c b/src/callbacks.c
+--- a/src/callbacks.c 2019-07-10 08:35:12.000000000 +0300
++++ b/src/callbacks.c 2020-10-16 19:29:48.777271945 +0300
+@@ -46,7 +46,7 @@
+ static gboolean maximized = FALSE;
+
+
+-GtkWidget *dialog10 = NULL;
++static GtkWidget *dialog10 = NULL;
+
+
+ static int local_x = 0;
+diff -ur a/src/tracks.c b/src/tracks.c
+--- a/src/tracks.c 2019-07-10 08:35:12.000000000 +0300
++++ b/src/tracks.c 2020-10-16 19:30:12.205982533 +0300
+@@ -30,7 +30,7 @@
+
+ GSList *loaded_track = NULL;
+ GtkWidget *window12;
+-GtkWidget *dialog10;
++static GtkWidget *dialog10;
+
+
+
diff --git a/sci-geosciences/foxtrotgps/files/foxtrotgps-1.2.2-gpsd-api9.patch b/sci-geosciences/foxtrotgps/files/foxtrotgps-1.2.2-gpsd-api9.patch
new file mode 100644
index 000000000000..87e973c47c8f
--- /dev/null
+++ b/sci-geosciences/foxtrotgps/files/foxtrotgps-1.2.2-gpsd-api9.patch
@@ -0,0 +1,37 @@
+diff -ur a/src/gps_functions.c b/src/gps_functions.c
+--- a/src/gps_functions.c
++++ b/src/gps_functions.c
+@@ -753,12 +753,20 @@
+ {
+ gpsdata->satellites_used = libgps_gpsdata.satellites_used;
+ gpsdata->hdop = libgps_gpsdata.dop.hdop;
++#if GPSD_API_MAJOR_VERSION >= 9 /* API change. gpsd version 3.20 and subsequent. */
++ gpsdata->fix.time = libgps_gpsdata.fix.time.tv_sec + (libgps_gpsdata.fix.time.tv_nsec*1e-9);
++#else
+ gpsdata->fix.time = libgps_gpsdata.fix.time;
++#endif
+ if (isnan(gpsdata->fix.time))
+ {
+ gpsdata->fix.time = (time_t) 0;
+ }
++#if GPSD_API_MAJOR_VERSION >= 9
++ gpsdata->valid = (libgps_gpsdata.fix.status != STATUS_NO_FIX);
++#else
+ gpsdata->valid = (libgps_gpsdata.status != STATUS_NO_FIX);
++#endif
+ if (gpsdata->valid)
+ {
+ gpsdata->seen_valid = TRUE;
+@@ -767,7 +775,11 @@
+ gpsdata->fix.longitude = libgps_gpsdata.fix.longitude;
+ gpsdata->fix.speed = libgps_gpsdata.fix.speed;
+ gpsdata->fix.heading = libgps_gpsdata.fix.track;
++#if GPSD_API_MAJOR_VERSION >= 9
++ gpsdata->fix.altitude = libgps_gpsdata.fix.altMSL;
++#else
+ gpsdata->fix.altitude = libgps_gpsdata.fix.altitude;
++#endif
+ }
+
+ g_source_remove(watchdog);
+