diff options
author | piernov <piernov@piernov.org> | 2011-11-09 14:28:03 +0100 |
---|---|---|
committer | piernov <piernov@piernov.org> | 2011-11-09 14:28:03 +0100 |
commit | 583fc42ddc4214e901db552eaf1778359b00d774 (patch) | |
tree | fee726de6cd6369d1a23e7c493831dc0787fde34 /geoclue | |
parent | 7159b31b45a271d42bd960a96a8d88bf4a0d48c8 (diff) | |
download | gnome3-583fc42ddc4214e901db552eaf1778359b00d774.tar.gz gnome3-583fc42ddc4214e901db552eaf1778359b00d774.tar.bz2 gnome3-583fc42ddc4214e901db552eaf1778359b00d774.tar.xz gnome3-583fc42ddc4214e901db552eaf1778359b00d774.zip |
geoclue 0.12-2 ajout patch gpsd-3.3
Diffstat (limited to 'geoclue')
-rw-r--r-- | geoclue/.footprint.i686 | 28 | ||||
-rw-r--r-- | geoclue/.footprint.x86_64 | 28 | ||||
-rw-r--r-- | geoclue/.md5sum.i686 | 1 | ||||
-rw-r--r-- | geoclue/.md5sum.x86_64 | 1 | ||||
-rw-r--r-- | geoclue/Pkgfile | 7 | ||||
-rw-r--r-- | geoclue/gpsd-3.3.patch | 181 |
6 files changed, 216 insertions, 30 deletions
diff --git a/geoclue/.footprint.i686 b/geoclue/.footprint.i686 index 6a2f7c0..d78912c 100644 --- a/geoclue/.footprint.i686 +++ b/geoclue/.footprint.i686 @@ -1,4 +1,18 @@ drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/geoclue-example +-rwxr-xr-x root/root usr/bin/geoclue-geonames +-rwxr-xr-x root/root usr/bin/geoclue-gpsd +-rwxr-xr-x root/root usr/bin/geoclue-gsmloc +-rwxr-xr-x root/root usr/bin/geoclue-gypsy +-rwxr-xr-x root/root usr/bin/geoclue-hostip +-rwxr-xr-x root/root usr/bin/geoclue-localnet +-rwxr-xr-x root/root usr/bin/geoclue-manual +-rwxr-xr-x root/root usr/bin/geoclue-master +-rwxr-xr-x root/root usr/bin/geoclue-nominatim +-rwxr-xr-x root/root usr/bin/geoclue-plazes +-rwxr-xr-x root/root usr/bin/geoclue-skyhook +-rwxr-xr-x root/root usr/bin/geoclue-yahoo drwxr-xr-x root/root usr/include/ drwxr-xr-x root/root usr/include/geoclue/ -rw-r--r-- root/root usr/include/geoclue/gc-iface-address.h @@ -30,20 +44,6 @@ lrwxrwxrwx root/root usr/lib/libgeoclue.so.0 -> libgeoclue.so.0.0.0 -rwxr-xr-x root/root usr/lib/libgeoclue.so.0.0.0 drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/geoclue.pc -drwxr-xr-x root/root usr/libexec/ --rwxr-xr-x root/root usr/libexec/geoclue-example --rwxr-xr-x root/root usr/libexec/geoclue-geonames --rwxr-xr-x root/root usr/libexec/geoclue-gpsd --rwxr-xr-x root/root usr/libexec/geoclue-gsmloc --rwxr-xr-x root/root usr/libexec/geoclue-gypsy --rwxr-xr-x root/root usr/libexec/geoclue-hostip --rwxr-xr-x root/root usr/libexec/geoclue-localnet --rwxr-xr-x root/root usr/libexec/geoclue-manual --rwxr-xr-x root/root usr/libexec/geoclue-master --rwxr-xr-x root/root usr/libexec/geoclue-nominatim --rwxr-xr-x root/root usr/libexec/geoclue-plazes --rwxr-xr-x root/root usr/libexec/geoclue-skyhook --rwxr-xr-x root/root usr/libexec/geoclue-yahoo drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/dbus-1/ drwxr-xr-x root/root usr/share/dbus-1/services/ diff --git a/geoclue/.footprint.x86_64 b/geoclue/.footprint.x86_64 index 6a2f7c0..d78912c 100644 --- a/geoclue/.footprint.x86_64 +++ b/geoclue/.footprint.x86_64 @@ -1,4 +1,18 @@ drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/geoclue-example +-rwxr-xr-x root/root usr/bin/geoclue-geonames +-rwxr-xr-x root/root usr/bin/geoclue-gpsd +-rwxr-xr-x root/root usr/bin/geoclue-gsmloc +-rwxr-xr-x root/root usr/bin/geoclue-gypsy +-rwxr-xr-x root/root usr/bin/geoclue-hostip +-rwxr-xr-x root/root usr/bin/geoclue-localnet +-rwxr-xr-x root/root usr/bin/geoclue-manual +-rwxr-xr-x root/root usr/bin/geoclue-master +-rwxr-xr-x root/root usr/bin/geoclue-nominatim +-rwxr-xr-x root/root usr/bin/geoclue-plazes +-rwxr-xr-x root/root usr/bin/geoclue-skyhook +-rwxr-xr-x root/root usr/bin/geoclue-yahoo drwxr-xr-x root/root usr/include/ drwxr-xr-x root/root usr/include/geoclue/ -rw-r--r-- root/root usr/include/geoclue/gc-iface-address.h @@ -30,20 +44,6 @@ lrwxrwxrwx root/root usr/lib/libgeoclue.so.0 -> libgeoclue.so.0.0.0 -rwxr-xr-x root/root usr/lib/libgeoclue.so.0.0.0 drwxr-xr-x root/root usr/lib/pkgconfig/ -rw-r--r-- root/root usr/lib/pkgconfig/geoclue.pc -drwxr-xr-x root/root usr/libexec/ --rwxr-xr-x root/root usr/libexec/geoclue-example --rwxr-xr-x root/root usr/libexec/geoclue-geonames --rwxr-xr-x root/root usr/libexec/geoclue-gpsd --rwxr-xr-x root/root usr/libexec/geoclue-gsmloc --rwxr-xr-x root/root usr/libexec/geoclue-gypsy --rwxr-xr-x root/root usr/libexec/geoclue-hostip --rwxr-xr-x root/root usr/libexec/geoclue-localnet --rwxr-xr-x root/root usr/libexec/geoclue-manual --rwxr-xr-x root/root usr/libexec/geoclue-master --rwxr-xr-x root/root usr/libexec/geoclue-nominatim --rwxr-xr-x root/root usr/libexec/geoclue-plazes --rwxr-xr-x root/root usr/libexec/geoclue-skyhook --rwxr-xr-x root/root usr/libexec/geoclue-yahoo drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/dbus-1/ drwxr-xr-x root/root usr/share/dbus-1/services/ diff --git a/geoclue/.md5sum.i686 b/geoclue/.md5sum.i686 index efbf70e..8c71218 100644 --- a/geoclue/.md5sum.i686 +++ b/geoclue/.md5sum.i686 @@ -1,3 +1,4 @@ f6b6030c085ad61cbe66b7cd02a84b56 geoclue-0.12.tar.bz2 a659858b9661dc49bf6dc9ffecf860ab geoclue-NMCrash.patch fbc5a7d43c7010aab592622543044d08 geoclue-nm08.patch +c09c8875bee9f397f71061c8f41c5fdd gpsd-3.3.patch diff --git a/geoclue/.md5sum.x86_64 b/geoclue/.md5sum.x86_64 index efbf70e..8c71218 100644 --- a/geoclue/.md5sum.x86_64 +++ b/geoclue/.md5sum.x86_64 @@ -1,3 +1,4 @@ f6b6030c085ad61cbe66b7cd02a84b56 geoclue-0.12.tar.bz2 a659858b9661dc49bf6dc9ffecf860ab geoclue-NMCrash.patch fbc5a7d43c7010aab592622543044d08 geoclue-nm08.patch +c09c8875bee9f397f71061c8f41c5fdd gpsd-3.3.patch diff --git a/geoclue/Pkgfile b/geoclue/Pkgfile index 78e123d..5050d19 100644 --- a/geoclue/Pkgfile +++ b/geoclue/Pkgfile @@ -7,18 +7,21 @@ name=geoclue version=0.12 -release=1 +release=2 source=(http://cgit.freedesktop.org/$name/snapshot/$name-$version.tar.bz2 geoclue-NMCrash.patch - geoclue-nm08.patch) + geoclue-nm08.patch + gpsd-3.3.patch) build() { cd $name-$version patch -p1 < ../geoclue-NMCrash.patch patch -p1 < ../geoclue-nm08.patch + patch -p0 < ../gpsd-3.3.patch ./autogen.sh sed "s/-Werror//g" -i configure ./configure --prefix=/usr \ + --libexecdir=/usr/bin \ --disable-gtk-doc \ --enable-gtk=yes \ --enable-networkmanager=yes \ diff --git a/geoclue/gpsd-3.3.patch b/geoclue/gpsd-3.3.patch new file mode 100644 index 0000000..965aa1d --- /dev/null +++ b/geoclue/gpsd-3.3.patch @@ -0,0 +1,181 @@ +--- providers/gpsd/geoclue-gpsd.c.bak 2011-11-06 00:43:28.832224036 +0100 ++++ providers/gpsd/geoclue-gpsd.c 2011-11-06 01:59:54.512878539 +0100 +@@ -40,7 +40,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 +58,7 @@ + char *host; + char *port; + +- gps_data *gpsdata; ++ struct gps_data_t gpsdata; + + gps_fix *last_fix; + +@@ -152,6 +151,10 @@ + port = DEFAULT_GPSD_PORT; + } + ++ if (host == NULL) { ++ host = "localhost"; ++ } ++ + /* new values? */ + if (g_strcmp0 (host, gpsd->host) != 0 || + g_strcmp0 (port, gpsd->port) != 0) { +@@ -228,16 +231,16 @@ + static void + geoclue_gpsd_update_position (GeoclueGpsd *gpsd, NmeaTag nmea_tag) + { +- gps_fix *fix = &gpsd->gpsdata->fix; ++ gps_fix *fix = &gpsd->gpsdata.fix; + gps_fix *last_fix = gpsd->last_fix; + + last_fix->time = fix->time; + + /* If a flag is not set, bail out.*/ +- if (!((gpsd->gpsdata->set & LATLON_SET) || (gpsd->gpsdata->set & ALTITUDE_SET))) { ++ if (!((gpsd->gpsdata.set & LATLON_SET) || (gpsd->gpsdata.set & ALTITUDE_SET))) { + return; + } +- gpsd->gpsdata->set &= ~(LATLON_SET | ALTITUDE_SET); ++ gpsd->gpsdata.set &= ~(LATLON_SET | ALTITUDE_SET); + + if (equal_or_nan (fix->latitude, last_fix->latitude) && + equal_or_nan (fix->longitude, last_fix->longitude) && +@@ -279,7 +282,7 @@ + static void + geoclue_gpsd_update_velocity (GeoclueGpsd *gpsd, NmeaTag nmea_tag) + { +- gps_fix *fix = &gpsd->gpsdata->fix; ++ gps_fix *fix = &gpsd->gpsdata.fix; + gps_fix *last_fix = gpsd->last_fix; + gboolean changed = FALSE; + +@@ -290,10 +293,10 @@ + * couldn't think of an smart way to handle this, I don't think there is one + */ + +- if (((gpsd->gpsdata->set & TRACK_SET) || (gpsd->gpsdata->set & SPEED_SET)) && ++ if (((gpsd->gpsdata.set & TRACK_SET) || (gpsd->gpsdata.set & SPEED_SET)) && + nmea_tag == NMEA_RMC) { + +- gpsd->gpsdata->set &= ~(TRACK_SET | SPEED_SET); ++ gpsd->gpsdata.set &= ~(TRACK_SET | SPEED_SET); + + last_fix->time = fix->time; + +@@ -305,12 +308,12 @@ + last_fix->track = fix->track; + last_fix->speed = fix->speed; + } +- } else if ((gpsd->gpsdata->set & CLIMB_SET) && ++ } else if ((gpsd->gpsdata.set & CLIMB_SET) && + (nmea_tag == NMEA_GGA || + nmea_tag == NMEA_GSA || + nmea_tag == NMEA_GSV)) { + +- gpsd->gpsdata->set &= ~(CLIMB_SET); ++ gpsd->gpsdata.set &= ~(CLIMB_SET); + + last_fix->time = fix->time; + +@@ -344,12 +347,12 @@ + GeoclueStatus status; + + /* gpsdata->online is supposedly always up-to-date */ +- if (gpsd->gpsdata->online <= 0) { ++ if (gpsd->gpsdata.online <= 0) { + status = GEOCLUE_STATUS_UNAVAILABLE; +- } else if (gpsd->gpsdata->set & STATUS_SET) { +- gpsd->gpsdata->set &= ~(STATUS_SET); ++ } else if (gpsd->gpsdata.set & STATUS_SET) { ++ gpsd->gpsdata.set &= ~(STATUS_SET); + +- if (gpsd->gpsdata->status > 0) { ++ if (gpsd->gpsdata.status > 0) { + status = GEOCLUE_STATUS_AVAILABLE; + } else { + status = GEOCLUE_STATUS_ACQUIRING; +@@ -362,9 +365,9 @@ + } + + static void +-gpsd_raw_hook (struct gps_data_t *gpsdata, char *message, size_t len) ++gpsd_raw_hook (struct gps_data_t gpsdata) + { +- char *tag_str = gpsd->gpsdata->tag; ++ char *tag_str = gpsd->gpsdata.tag; + NmeaTag nmea_tag = NMEA_NONE; + + if (tag_str[0] == 'G' && tag_str[1] == 'S' && tag_str[2] == 'A') { +@@ -385,23 +388,22 @@ + static void + geoclue_gpsd_stop_gpsd (GeoclueGpsd *self) + { +- if (self->gpsdata) { +- gps_close (self->gpsdata); +- self->gpsdata = NULL; ++ struct gps_data_t *gpsdata = &self->gpsdata; ++ if (gpsdata) { ++ gps_close (gpsdata); ++ gpsdata = NULL; + } + } + + 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); +- return TRUE; +- } else { ++ if (gps_open(self->host, self->port, &self->gpsdata) != 0) { + g_warning ("gps_open() failed, is gpsd running (host=%s,port=%s)?", self->host, self->port); + return FALSE; ++ } else { ++ gps_stream(&self->gpsdata, WATCH_ENABLE | WATCH_NMEA, NULL); ++ return TRUE; + } + } + +@@ -409,12 +411,13 @@ + gpsd_poll(gpointer data) + { + GeoclueGpsd *self = (GeoclueGpsd*)data; +- if (self->gpsdata) { +- if (gps_poll(self->gpsdata) < 0) { ++ if (&self->gpsdata) { ++ if (gps_read(&self->gpsdata) < 0) { + geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR); + geoclue_gpsd_stop_gpsd(self); + return FALSE; + } ++ gpsd_raw_hook(self->gpsdata); + } + return TRUE; + } +@@ -422,7 +425,6 @@ + static void + geoclue_gpsd_init (GeoclueGpsd *self) + { +- self->gpsdata = NULL; + self->last_fix = g_new0 (gps_fix, 1); + + self->last_pos_fields = GEOCLUE_POSITION_FIELDS_NONE; +@@ -435,7 +437,7 @@ + "Gpsd", "Gpsd provider"); + + self->port = g_strdup (DEFAULT_GPSD_PORT); +- self->host = NULL; ++ self->host = "localhost"; + geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ACQUIRING); + if (!geoclue_gpsd_start_gpsd (self)) { + geoclue_gpsd_set_status (self, GEOCLUE_STATUS_ERROR); |