libgeoclue0[-devel]: obsolete libgeoclue[-devel] [release 0.12.99-7mamba;Mon Apr 21 2014]
This commit is contained in:
parent
12a9fe95af
commit
191026a512
@ -1,2 +1,4 @@
|
|||||||
# geoclue0
|
# geoclue0
|
||||||
|
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
|
||||||
|
300
geoclue0.spec
Normal file
300
geoclue0.spec
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
Name: geoclue0
|
||||||
|
Version: 0.12.99
|
||||||
|
Release: 7mamba
|
||||||
|
Summary: A modular geoinformation service
|
||||||
|
Group: System/Libraries
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
|
URL: http://www.freedesktop.org/wiki/Software/GeoClue
|
||||||
|
Source0: http://freedesktop.org/~hadess/geoclue-%{version}.tar.gz
|
||||||
|
Patch0: libgeoclue-0.11.1.1-nm08.patch
|
||||||
|
Patch1: libgeoclue-0.12.0-NMCrash.patch
|
||||||
|
Patch2: libgeoclue-0.12.0-gcc-4.7.patch
|
||||||
|
Patch3: libgeoclue-0.12.99-gpsd-3.7.patch
|
||||||
|
License: LGPL
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libatk-devel
|
||||||
|
BuildRequires: libbzip2-devel
|
||||||
|
BuildRequires: libcairo-devel
|
||||||
|
BuildRequires: libdbus-devel
|
||||||
|
BuildRequires: libdbus-glib-devel
|
||||||
|
BuildRequires: libexpat-devel
|
||||||
|
BuildRequires: libffi-devel
|
||||||
|
BuildRequires: libfontconfig-devel
|
||||||
|
BuildRequires: libfreetype-devel
|
||||||
|
BuildRequires: libgdk-pixbuf-devel
|
||||||
|
BuildRequires: libglib-devel
|
||||||
|
BuildRequires: libgps-devel
|
||||||
|
BuildRequires: libgraphite2-devel
|
||||||
|
BuildRequires: libgtk2-devel
|
||||||
|
BuildRequires: libgypsy-devel
|
||||||
|
BuildRequires: libharfbuzz-devel
|
||||||
|
BuildRequires: liblzma-devel
|
||||||
|
BuildRequires: libnm-devel
|
||||||
|
BuildRequires: libnspr-devel
|
||||||
|
BuildRequires: libnss-devel
|
||||||
|
BuildRequires: libpango-devel
|
||||||
|
BuildRequires: libpng-devel
|
||||||
|
BuildRequires: libselinux-devel
|
||||||
|
BuildRequires: libsoup-devel
|
||||||
|
BuildRequires: libsqlite-devel
|
||||||
|
BuildRequires: libudev-devel
|
||||||
|
BuildRequires: libuuid-devel
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: libz-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
BuildRequires: libgps-devel >= 3.7
|
||||||
|
BuildRequires: libgammu-devel
|
||||||
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
# checking for CONIC... no MAEMO libraries
|
||||||
|
|
||||||
|
%description
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
|
||||||
|
%package apidocs
|
||||||
|
Group: Documentation
|
||||||
|
Summary: %{name} API documentation
|
||||||
|
Provides: libgeoclue-apidocs
|
||||||
|
Obsoletes: libgeoclue-apidocs
|
||||||
|
|
||||||
|
%description apidocs
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
|
||||||
|
This package contains %{name} API documentation.
|
||||||
|
|
||||||
|
%package -n lib%{name}
|
||||||
|
Group: System/Libraries
|
||||||
|
Summary: Shared libraries for %{name}
|
||||||
|
Provides: libgeoclue
|
||||||
|
Obsoletes: libgeoclue
|
||||||
|
|
||||||
|
%description -n lib%{name}
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
This package contains shared libraries for %{name}.
|
||||||
|
|
||||||
|
%package -n lib%{name}-devel
|
||||||
|
Group: Development/Libraries
|
||||||
|
Summary: Libraries and headers for %{name}
|
||||||
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
Provides: libgeoclue-devel
|
||||||
|
Obsoletes: libgeoclue-devel
|
||||||
|
|
||||||
|
%description -n lib%{name}-devel
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
This package contains libraries and header files need for development.
|
||||||
|
|
||||||
|
%package -n lib%{name}-static
|
||||||
|
Group: Development/Libraries
|
||||||
|
Summary: Static libraries for %{name}
|
||||||
|
Requires: lib%{name}-devel = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
Provides: libgeoclue-static
|
||||||
|
Obsoletes: libgeoclue-static
|
||||||
|
|
||||||
|
%description -n lib%{name}-static
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
This package contains static libraries need for development.
|
||||||
|
|
||||||
|
%package gpsd
|
||||||
|
Summary: gpsd provider for %{name}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
Requires: gpsd
|
||||||
|
Provides: libgeoclue-gpsd
|
||||||
|
Obsoletes: libgeoclue-gpsd
|
||||||
|
|
||||||
|
%description gpsd
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
|
||||||
|
This package contains a gpsd provider for %{name}
|
||||||
|
|
||||||
|
%package gsmloc
|
||||||
|
Summary: gsmloc provider for %{name}
|
||||||
|
Group: System/Libraries
|
||||||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
Provides: libgeoclue-gsmloc
|
||||||
|
Obsoletes: libgeoclue-gsmloc
|
||||||
|
|
||||||
|
%description gsmloc
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
|
||||||
|
This package contains a gsmloc provider for %{name}
|
||||||
|
|
||||||
|
%package gui
|
||||||
|
Summary: Testing gui for %{name}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
Provides: libgeoclue-gui
|
||||||
|
Obsoletes: libgeoclue-gui
|
||||||
|
|
||||||
|
%description gui
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
|
||||||
|
This package contains a testing gui for %{name}
|
||||||
|
|
||||||
|
%package gypsy
|
||||||
|
Summary: gypsy provider for %{name}
|
||||||
|
Group: System/Libraries
|
||||||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
Requires: libgypsy
|
||||||
|
Provides: libgeoclue-gypsy
|
||||||
|
Obsoletes: libgeoclue-gypsy
|
||||||
|
|
||||||
|
%description gypsy
|
||||||
|
Geoclue is a modular geoinformation service built on top of the D-Bus messaging system. The goal of the Geoclue project is to make creating location-aware applications as simple as possible.
|
||||||
|
|
||||||
|
This package contains a libgypsy provider for %{name}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n geoclue-%{version}
|
||||||
|
#%patch0 -p1 -b .nm08
|
||||||
|
#%patch1 -p1 -b .nmCrash
|
||||||
|
#%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
|
#
|
||||||
|
#libtoolize
|
||||||
|
#gtkdocize
|
||||||
|
#autoreconf
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure \
|
||||||
|
--enable-gtk-doc \
|
||||||
|
--enable-networkmanager=yes \
|
||||||
|
--enable-gypsy=yes \
|
||||||
|
--enable-skyhook=yes \
|
||||||
|
--enable-gsmloc=yes
|
||||||
|
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
%makeinstall
|
||||||
|
|
||||||
|
mkdir %{buildroot}%{_bindir}
|
||||||
|
install -pm 755 test/.libs/geoclue-test-gui %{buildroot}%{_bindir}/
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%post -n lib%{name} -p /sbin/ldconfig
|
||||||
|
%postun -n lib%{name} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libexecdir}/geoclue-example
|
||||||
|
%{_libexecdir}/geoclue-geonames
|
||||||
|
%{_libexecdir}/geoclue-hostip
|
||||||
|
%{_libexecdir}/geoclue-localnet
|
||||||
|
%{_libexecdir}/geoclue-manual
|
||||||
|
%{_libexecdir}/geoclue-master
|
||||||
|
%{_libexecdir}/geoclue-nominatim
|
||||||
|
%{_libexecdir}/geoclue-plazes
|
||||||
|
%{_libexecdir}/geoclue-skyhook
|
||||||
|
%{_libexecdir}/geoclue-yahoo
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Master.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Example.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Geonames.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Hostip.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Localnet.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Manual.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Nominatim.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Plazes.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Skyhook.service
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Yahoo.service
|
||||||
|
%dir %{_datadir}/geoclue-providers
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-example.provider
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-geonames.provider
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-hostip.provider
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-localnet.provider
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-manual.provider
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-nominatim.provider
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-plazes.provider
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-skyhook.provider
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-yahoo.provider
|
||||||
|
%{_datadir}/GConf/gsettings/geoclue
|
||||||
|
%{_datadir}/glib-2.0/schemas/org.freedesktop.Geoclue.gschema.xml
|
||||||
|
|
||||||
|
%files apidocs
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_datadir}/gtk-doc/html/geoclue
|
||||||
|
%{_datadir}/gtk-doc/html/geoclue/*
|
||||||
|
|
||||||
|
%files -n lib%{name}
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/libgeoclue.so.*
|
||||||
|
%doc AUTHORS COPYING
|
||||||
|
|
||||||
|
%files -n lib%{name}-devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_includedir}/geoclue
|
||||||
|
%{_includedir}/geoclue/*.h
|
||||||
|
%{_libdir}/libgeoclue.so
|
||||||
|
%{_libdir}/pkgconfig/geoclue.pc
|
||||||
|
%doc README
|
||||||
|
|
||||||
|
%files -n lib%{name}-static
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/libgeoclue.*a
|
||||||
|
|
||||||
|
%files gpsd
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libexecdir}/geoclue-gpsd
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Gpsd.service
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-gpsd.provider
|
||||||
|
|
||||||
|
%files gsmloc
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libexecdir}/geoclue-gsmloc
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-gsmloc.provider
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Gsmloc.service
|
||||||
|
|
||||||
|
%files gui
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_bindir}/geoclue-test-gui
|
||||||
|
|
||||||
|
%files gypsy
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libexecdir}/geoclue-gypsy
|
||||||
|
%{_datadir}/dbus-1/services/org.freedesktop.Geoclue.Providers.Gypsy.service
|
||||||
|
%{_datadir}/geoclue-providers/geoclue-gypsy.provider
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Apr 21 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.99-7mamba
|
||||||
|
- libgeoclue0[-devel]: obsolete libgeoclue[-devel]
|
||||||
|
|
||||||
|
* Sat Apr 12 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.99-6mamba
|
||||||
|
- provide libgeoclue-devel and libgeoclue-static
|
||||||
|
|
||||||
|
* Fri Apr 11 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.99-5mamba
|
||||||
|
- libgeoclue0-static: fix requirement for libgeoclue0-devel
|
||||||
|
|
||||||
|
* Fri Apr 11 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.99-4mamba
|
||||||
|
- rename to geoclue0 (geoclue is version 2)
|
||||||
|
|
||||||
|
* Fri Apr 11 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.99-3mamba
|
||||||
|
- rename source to geoclue, keep only shared library in libgeoclue, other changes as a consequence
|
||||||
|
|
||||||
|
* Sun Jun 02 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.99-2mamba
|
||||||
|
- rebuild with gpsd 3.7
|
||||||
|
|
||||||
|
* Sat Apr 27 2013 Automatic Build System <autodist@mambasoft.it> 0.12.99-1mamba
|
||||||
|
- update to 0.12.99
|
||||||
|
|
||||||
|
* Wed Sep 05 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.0-4mamba
|
||||||
|
- added gcc 4.7 patch
|
||||||
|
|
||||||
|
* Mon Sep 19 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.0-3mamba
|
||||||
|
- rebuilt with NetworkManager 0.9
|
||||||
|
|
||||||
|
* Fri Feb 25 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.0-2mamba
|
||||||
|
- rebuilt in devel
|
||||||
|
|
||||||
|
* Tue Nov 09 2010 gil <puntogil@libero.it> 0.12.0-1mamba
|
||||||
|
- update to 0.12.0
|
||||||
|
|
||||||
|
* Wed Apr 01 2009 gil <puntogil@libero.it> 0.11.1-1mamba
|
||||||
|
- package created by autospec
|
11
libgeoclue-0.11.1.1-nm08.patch
Normal file
11
libgeoclue-0.11.1.1-nm08.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- geoclue-0.11.1.1/configure.ac.orig 2009-10-26 10:49:36.000000000 +0000
|
||||||
|
+++ geoclue-0.11.1.1/configure.ac 2009-10-26 10:50:03.000000000 +0000
|
||||||
|
@@ -123,7 +123,7 @@
|
||||||
|
if test "x$enable_networkmanager" != "xno"; then
|
||||||
|
PKG_CHECK_MODULES(NETWORK_MANAGER,
|
||||||
|
[
|
||||||
|
- NetworkManager libnm_glib
|
||||||
|
+ NetworkManager libnm-glib
|
||||||
|
], have_networkmanager="yes", have_networkmanager="no")
|
||||||
|
|
||||||
|
if test "x$have_networkmanager" = "xyes"; then
|
31
libgeoclue-0.12.0-NMCrash.patch
Normal file
31
libgeoclue-0.12.0-NMCrash.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From bcf9ee4f44625eddad4c267fedc507d9eeeaf3f4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bastien Nocera <hadess@hadess.net>
|
||||||
|
Date: Tue, 29 Jun 2010 18:47:21 +0000
|
||||||
|
Subject: Fix crasher when NetworkManager has no devices
|
||||||
|
|
||||||
|
https://bugs.freedesktop.org/show_bug.cgi?id=28066
|
||||||
|
---
|
||||||
|
diff --git a/src/connectivity-networkmanager.c b/src/connectivity-networkmanager.c
|
||||||
|
index 1061201..a7b8971 100644
|
||||||
|
--- a/src/connectivity-networkmanager.c
|
||||||
|
+++ b/src/connectivity-networkmanager.c
|
||||||
|
@@ -248,16 +248,12 @@ cache_ap_mac (GeoclueNetworkManager *self)
|
||||||
|
guint i;
|
||||||
|
|
||||||
|
devices = nm_client_get_devices (self->client);
|
||||||
|
- if (devices == NULL) {
|
||||||
|
- g_free (self->cache_ap_mac);
|
||||||
|
- self->cache_ap_mac = NULL;
|
||||||
|
- }
|
||||||
|
|
||||||
|
g_free (self->cache_ap_mac);
|
||||||
|
self->cache_ap_mac = NULL;
|
||||||
|
self->ap_strength = 0;
|
||||||
|
|
||||||
|
- for (i = 0; i < devices->len; i++) {
|
||||||
|
+ for (i = 0; devices != NULL && i < devices->len; i++) {
|
||||||
|
NMDevice *device = g_ptr_array_index (devices, i);
|
||||||
|
if (NM_IS_DEVICE_WIFI (device)) {
|
||||||
|
get_best_ap (self, device);
|
||||||
|
--
|
||||||
|
cgit v0.8.3-6-g21f6
|
23
libgeoclue-0.12.0-gcc-4.7.patch
Normal file
23
libgeoclue-0.12.0-gcc-4.7.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From 90669619d1d621080ef00dcb8db1c3d206ee0bfe Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dan Williams <dcbw@redhat.com>
|
||||||
|
Date: Mon, 07 Mar 2011 23:46:15 +0000
|
||||||
|
Subject: master: Fix warning with GCC 4.6
|
||||||
|
|
||||||
|
---
|
||||||
|
diff --git a/src/master-provider.c b/src/master-provider.c
|
||||||
|
index 790c043..e4ea053 100644
|
||||||
|
--- a/src/master-provider.c
|
||||||
|
+++ b/src/master-provider.c
|
||||||
|
@@ -846,10 +846,6 @@ gc_master_provider_initialize_interfaces (GcMasterProvider *provider)
|
||||||
|
static gboolean
|
||||||
|
gc_master_provider_initialize (GcMasterProvider *provider)
|
||||||
|
{
|
||||||
|
- GcMasterProviderPrivate *priv;
|
||||||
|
-
|
||||||
|
- priv = GET_PRIVATE (provider);
|
||||||
|
-
|
||||||
|
if (!gc_master_provider_initialize_interfaces (provider)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2-2-gbebe
|
76
libgeoclue-0.12.99-gpsd-3.7.patch
Normal file
76
libgeoclue-0.12.99-gpsd-3.7.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
|
||||||
|
Date: 2013-01-19
|
||||||
|
Initial Package Version: 0.12.0
|
||||||
|
Upstream Status: Unsure
|
||||||
|
Origin: https://bugs.freedesktop.org/attachment.cgi?id=54418
|
||||||
|
Description: Fixes building against GPSD-3.7
|
||||||
|
|
||||||
|
|
||||||
|
--- geoclue-0.12.0.orig/providers/gpsd/geoclue-gpsd.c 2011-12-14 10:57:44.000000000 +0000
|
||||||
|
+++ geoclue-0.12.0/providers/gpsd/geoclue-gpsd.c 2011-12-14 11:03:11.271878045 +0000
|
||||||
|
@@ -40,7 +40,12 @@
|
||||||
|
#include <geoclue/gc-iface-position.h>
|
||||||
|
#include <geoclue/gc-iface-velocity.h>
|
||||||
|
|
||||||
|
+#if GPSD_API_MAJOR_VERSION >= 5
|
||||||
|
+/* gps_data conflicts with gps_data function */
|
||||||
|
+typedef struct gps_data_t gps_data_l;
|
||||||
|
+#else
|
||||||
|
typedef struct gps_data_t gps_data;
|
||||||
|
+#endif
|
||||||
|
typedef struct gps_fix_t gps_fix;
|
||||||
|
|
||||||
|
/* only listing used tags */
|
||||||
|
@@ -59,7 +64,11 @@
|
||||||
|
char *host;
|
||||||
|
char *port;
|
||||||
|
|
||||||
|
+#if GPSD_API_MAJOR_VERSION >= 5
|
||||||
|
+ gps_data_l *gpsdata;
|
||||||
|
+#else
|
||||||
|
gps_data *gpsdata;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
gps_fix *last_fix;
|
||||||
|
|
||||||
|
@@ -394,10 +403,16 @@
|
||||||
|
static gboolean
|
||||||
|
geoclue_gpsd_start_gpsd (GeoclueGpsd *self)
|
||||||
|
{
|
||||||
|
+#if GPSD_API_MAJOR_VERSION >= 5
|
||||||
|
+ int status = gps_open (self->host, self->port, self->gpsdata);
|
||||||
|
+ if (status == 0) {
|
||||||
|
+ gps_stream(self->gpsdata, WATCH_ENABLE | WATCH_NMEA, NULL);
|
||||||
|
+#else
|
||||||
|
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);
|
||||||
|
+#endif
|
||||||
|
return TRUE;
|
||||||
|
} else {
|
||||||
|
g_warning ("gps_open() failed, is gpsd running (host=%s,port=%s)?", self->host, self->port);
|
||||||
|
@@ -410,10 +425,23 @@
|
||||||
|
{
|
||||||
|
GeoclueGpsd *self = (GeoclueGpsd*)data;
|
||||||
|
if (self->gpsdata) {
|
||||||
|
+#if GPSD_API_MAJOR_VERSION >= 5
|
||||||
|
+ /* gps_poll and gps_set_raw_hook no longer present in this API version */
|
||||||
|
+ if (gps_waiting(self->gpsdata, 500)) {
|
||||||
|
+ if (gps_read(self->gpsdata) == -1) {
|
||||||
|
+ geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR);
|
||||||
|
+ geoclue_gpsd_stop_gpsd(self);
|
||||||
|
+ return FALSE;
|
||||||
|
+ } else {
|
||||||
|
+ /* Call existing raw_hook to process the data */
|
||||||
|
+ gpsd_raw_hook(self->gpsdata, NULL, 0);
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
if (gps_poll(self->gpsdata) < 0) {
|
||||||
|
geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR);
|
||||||
|
geoclue_gpsd_stop_gpsd(self);
|
||||||
|
return FALSE;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
Reference in New Issue
Block a user