]> git.pld-linux.org Git - packages/geoclue.git/commitdiff
- updated versioned dependencies
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 30 Aug 2013 14:56:51 +0000 (16:56 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 30 Aug 2013 14:56:51 +0000 (16:56 +0200)
- added gpsd patch (update to libgps 5.0 API/gpsd 3.x)

geoclue-gpsd.patch [new file with mode: 0644]
geoclue.spec

diff --git a/geoclue-gpsd.patch b/geoclue-gpsd.patch
new file mode 100644 (file)
index 0000000..e5e6877
--- /dev/null
@@ -0,0 +1,60 @@
+--- geoclue-0.12.99/providers/gpsd/geoclue-gpsd.c.orig 2012-07-31 18:47:05.000000000 +0200
++++ geoclue-0.12.99/providers/gpsd/geoclue-gpsd.c      2013-08-30 16:49:28.898513583 +0200
+@@ -33,6 +33,7 @@
+ #include <math.h>
+ #include <gps.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <geoclue/geoclue-error.h>
+@@ -40,7 +41,6 @@
+ #include <geoclue/gc-iface-position.h>
+ #include <geoclue/gc-iface-velocity.h>
+-typedef struct gps_data_t gps_data;
+ typedef struct gps_fix_t gps_fix;
+ /* only listing used tags */
+@@ -59,7 +59,7 @@
+       char *host;
+       char *port;
+       
+-      gps_data *gpsdata;
++      struct gps_data_t *gpsdata;
+       
+       gps_fix *last_fix;
+       
+@@ -397,12 +397,13 @@
+ static gboolean
+ geoclue_gpsd_start_gpsd (GeoclueGpsd *self)
+ {
+-      self->gpsdata = gps_open (self->host, self->port);
+-      if (self->gpsdata) {
+-              gps_stream(self->gpsdata, WATCH_ENABLE | WATCH_NMEA | POLL_NONBLOCK, NULL);
+-              gps_set_raw_hook (self->gpsdata, gpsd_raw_hook);
++      struct gps_data_t *gd = calloc (1, sizeof(struct gps_data_t));
++      if (gd && (gps_open (self->host, self->port, gd) >= 0)) {
++              self->gpsdata = gd;
++              gps_stream(self->gpsdata, WATCH_ENABLE | WATCH_NMEA | WATCH_RAW, NULL);
+               return TRUE;
+       } else {
++              free (gd);
+               g_warning ("gps_open() failed, is gpsd running (host=%s,port=%s)?", self->host, self->port);
+               return FALSE;
+       }
+@@ -413,10 +414,13 @@
+ {
+       GeoclueGpsd *self = (GeoclueGpsd*)data;
+       if (self->gpsdata) {
+-              if (gps_poll(self->gpsdata) < 0) {
++              if (gps_read(self->gpsdata) < 0) {
+                       geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR);
+                       geoclue_gpsd_stop_gpsd(self);
+                       return FALSE;
++              } else if(self->gpsdata->set) {
++                      gpsd_raw_hook(self->gpsdata, NULL, 0);
++                      self->gpsdata->set = 0;
+               }
+       }
+       return TRUE;
index eee00cb9f92a07377cc4ddfdd471c3491ac83110..21f9bb91c9110b3fad8b489b74eaf07402be2cfd 100644 (file)
@@ -1,26 +1,30 @@
-%bcond_with    gps
+#
+# Conditional build:
+%bcond_without gps     # GPS support via gpsd
+#
 Summary:       A modular geoinformation service
 Summary(pl.UTF-8):     Modularna usługa geoinformacyjna
 Name:          geoclue
 Version:       0.12.99
 Release:       2
-License:       LGPL v2
+License:       LGPL v2+
 Group:         Applications
 Source0:       http://freedesktop.org/~hadess/%{name}-%{version}.tar.gz
 # Source0-md5: 779245045bfeeec4853da8baaa3a18e6
 Patch0:                %{name}-libsoup.patch
+Patch1:                %{name}-gpsd.patch
 URL:           http://geoclue.freedesktop.org/
 BuildRequires: GConf2-devel >= 2.0
 BuildRequires: NetworkManager-devel
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake >= 1:1.9
-BuildRequires: dbus-glib-devel >= 0.60
+BuildRequires: dbus-glib-devel >= 0.86
 BuildRequires: docbook-dtd412-xml
-BuildRequires: glib2-devel >= 1:2.0
-%{?with_gps:BuildRequires:     gpsd-devel >= 2.91}
+BuildRequires: glib2-devel >= 1:2.26
+%{?with_gps:BuildRequires:     gpsd-devel >= 3}
 BuildRequires: gtk+2-devel >= 1:2.0
 BuildRequires: gtk-doc >= 1.0
-BuildRequires: gypsy-devel
+BuildRequires: gypsy-devel >= 0.7.1
 BuildRequires: libsoup-devel >= 2.4.0
 BuildRequires: libtool
 BuildRequires: libxml2-devel >= 2.0
@@ -43,7 +47,8 @@ ułatwienie tworzenia aplikacji uwzględniających lokalizację.
 Summary:       Geoclue modular geoinformation service library
 Summary(pl.UTF-8):     Biblioteka geoclue - modularnej usługi geoinformacyjnej
 Group:         Libraries
-Requires:      dbus-glib >= 0.60
+Requires:      dbus-glib >= 0.86
+Requires:      glib2 >= 1:2.26
 Conflicts:     geoclue < 0.12.0-3
 
 %description libs
@@ -57,7 +62,8 @@ Summary:      Development package for geoclue
 Summary(pl.UTF-8):     Pakiet programistyczny geoclue
 Group:         Development/Libraries
 Requires:      %{name}-libs = %{version}-%{release}
-Requires:      dbus-glib-devel >= 0.60
+Requires:      dbus-glib-devel >= 0.86
+Requires:      glib2-devel >= 1:2.26
 Requires:      libxml2-devel >= 2.0
 
 %description devel
@@ -95,7 +101,7 @@ Summary:     gpsd provider for geoclue
 Summary(pl.UTF-8):     Interfejs geoclue do gpsd
 Group:         Applications
 Requires:      %{name} = %{version}-%{release}
-Requires:      gpsd >= 2.91
+Requires:      gpsd >= 3
 
 %description gpsd
 A gpsd provider for geoclue.
@@ -108,7 +114,7 @@ Summary:    gypsy provider for geoclue
 Summary(pl.UTF-8):     Interfejs geoclue do gypsy
 Group:         Applications
 Requires:      %{name} = %{version}-%{release}
-Requires:      gypsy
+Requires:      gypsy >= 0.7.1
 
 %description gypsy
 A gypsy provider for geoclue.
@@ -119,6 +125,7 @@ Interfejs geoclue do gypsy.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__gtkdocize}
@@ -130,9 +137,10 @@ Interfejs geoclue do gypsy.
 %configure \
        --enable-gtk-doc \
        --disable-conic \
-       --enable-gpsd%{?!with_gps:=no} \
+       --enable-gpsd%{!?with_gps:=no} \
        --enable-gypsy \
        --enable-networkmanager \
+       --disable-silent-rules \
        --enable-skyhook \
        --with-html-dir=%{_gtkdocdir}
 
This page took 0.076471 seconds and 4 git commands to generate.