commit 0b4deee831fdb0f24169566ca055234a8b0f4a60
Author: Jakub Bogusz <qbo...@pld-linux.org>
Date:   Sun Jun 23 12:42:14 2024 +0200

    - fixes for gpsd 3.21+ (API 10); release 8

 geoclue-gpsd.patch | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 geoclue.spec       | 11 ++++++-----
 2 files changed, 59 insertions(+), 5 deletions(-)
---
diff --git a/geoclue.spec b/geoclue.spec
index 0c80cc9..77d3558 100644
--- a/geoclue.spec
+++ b/geoclue.spec
@@ -9,16 +9,16 @@ Summary:      A modular geoinformation service
 Summary(pl.UTF-8):     Modularna usługa geoinformacyjna
 Name:          geoclue
 Version:       0.12.99
-Release:       7
+Release:       8
 License:       LGPL v2+
 Group:         Applications
-Source0:       http://freedesktop.org/~hadess/%{name}-%{version}.tar.gz
+Source0:       https://people.freedesktop.org/~hadess/%{name}-%{version}.tar.gz
 # Source0-md5: 779245045bfeeec4853da8baaa3a18e6
 Patch0:                %{name}-libsoup.patch
 Patch1:                %{name}-gpsd.patch
 Patch2:                %{name}-format.patch
 Patch3:                %{name}-nm.patch
-URL:           http://geoclue.freedesktop.org/
+URL:           https://geoclue.freedesktop.org/
 BuildRequires: GConf2-devel >= 2.0
 %{?with_nm:BuildRequires:      NetworkManager-devel >= 1.0}
 BuildRequires: autoconf >= 2.59
@@ -27,7 +27,7 @@ BuildRequires:        automake >= 1:1.9
 BuildRequires: dbus-glib-devel >= 0.86
 BuildRequires: docbook-dtd412-xml
 BuildRequires: glib2-devel >= 1:2.26
-%{?with_gps:BuildRequires:     gpsd-devel >= 3.18}
+%{?with_gps:BuildRequires:     gpsd-devel >= 3.21}
 BuildRequires: gtk+2-devel >= 1:2.0
 BuildRequires: gtk-doc >= 1.0
 BuildRequires: gypsy-devel >= 0.7.1
@@ -37,6 +37,7 @@ BuildRequires:        libtool
 BuildRequires: libxml2-devel >= 2.0
 BuildRequires: libxslt-progs
 BuildRequires: pkgconfig
+BuildRequires: rpm-build >= 4.6
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      dbus
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -110,7 +111,7 @@ Summary:    gpsd provider for geoclue
 Summary(pl.UTF-8):     Interfejs geoclue do gpsd
 Group:         Applications
 Requires:      %{name} = %{version}-%{release}
-Requires:      gpsd >= 3.18
+Requires:      gpsd >= 3.21
 
 %description gpsd
 A gpsd provider for geoclue.
diff --git a/geoclue-gpsd.patch b/geoclue-gpsd.patch
index 51a3b5e..92bf9a9 100644
--- a/geoclue-gpsd.patch
+++ b/geoclue-gpsd.patch
@@ -160,3 +160,56 @@
                        geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR);
                        geoclue_gpsd_stop_gpsd(self);
                        return FALSE;
+--- geoclue-0.12.99/providers/gpsd/geoclue-gpsd.c.orig 2024-06-23 
12:38:55.516440776 +0200
++++ geoclue-0.12.99/providers/gpsd/geoclue-gpsd.c      2024-06-23 
12:39:00.639746354 +0200
+@@ -264,7 +264,7 @@ geoclue_gpsd_update_position (GeoclueGps
+       
+       gc_iface_position_emit_position_changed 
+               (GC_IFACE_POSITION (gpsd), gpsd->last_pos_fields,
+-               (int)(last_fix->time+0.5), 
++               last_fix->time.tv_sec + (last_fix->time.tv_nsec >= 
500000000L), 
+                last_fix->latitude, last_fix->longitude, last_fix->altitude, 
+                gpsd->last_accuracy);
+       
+@@ -323,7 +323,7 @@ geoclue_gpsd_update_velocity (GeoclueGps
+               
+               gc_iface_velocity_emit_velocity_changed 
+                       (GC_IFACE_VELOCITY (gpsd), gpsd->last_velo_fields,
+-                       (int)(last_fix->time+0.5),
++                       last_fix->time.tv_sec + (last_fix->time.tv_nsec >= 
500000000L),
+                        last_fix->speed, last_fix->track, last_fix->climb);
+       }
+ }
+@@ -334,12 +334,12 @@ geoclue_gpsd_update_status (GeoclueGpsd
+       GeoclueStatus status;
+       
+       /* gpsdata->online is supposedly always up-to-date */
+-      if (gpsd->gpsdata->online <= 0) {
++      if (gpsd->gpsdata->online.tv_sec <= 0) {
+               status = GEOCLUE_STATUS_UNAVAILABLE;
+       } else if (gpsd->gpsdata->set & STATUS_SET) {
+               gpsd->gpsdata->set &= ~(STATUS_SET);
+               
+-              if (gpsd->gpsdata->status > 0) {
++              if (gpsd->gpsdata->fix.status > 0) {
+                       status = GEOCLUE_STATUS_AVAILABLE;
+               } else {
+                       status = GEOCLUE_STATUS_ACQUIRING;
+@@ -435,7 +435,7 @@ get_position (GcIfacePosition       *gc,
+ {
+       GeoclueGpsd *gpsd = GEOCLUE_GPSD (gc);
+       
+-      *timestamp = (int)(gpsd->last_fix->time+0.5);
++      *timestamp = gpsd->last_fix->time.tv_sec + 
(gpsd->last_fix->time.tv_nsec >= 500000000L);
+       *latitude = gpsd->last_fix->latitude;
+       *longitude = gpsd->last_fix->longitude;
+       *altitude = gpsd->last_fix->altitude;
+@@ -462,7 +462,7 @@ get_velocity (GcIfaceVelocity       *gc,
+ {
+       GeoclueGpsd *gpsd = GEOCLUE_GPSD (gc);
+       
+-      *timestamp = (int)(gpsd->last_fix->time+0.5);
++      *timestamp = gpsd->last_fix->time.tv_sec + 
(gpsd->last_fix->time.tv_nsec >= 500000000L);
+       *speed = gpsd->last_fix->speed;
+       *direction = gpsd->last_fix->track;
+       *climb = gpsd->last_fix->climb;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/geoclue.git/commitdiff/0b4deee831fdb0f24169566ca055234a8b0f4a60

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to