Index: head/astro/foxtrotgps/Makefile =================================================================== --- head/astro/foxtrotgps/Makefile (revision 546923) +++ head/astro/foxtrotgps/Makefile (revision 546924) @@ -1,41 +1,41 @@ # Created by: crwhipp@gmail.com # $FreeBSD$ PORTNAME= foxtrotgps -PORTVERSION= 1.2.0 -PORTREVISION= 6 +PORTVERSION= 1.2.2 CATEGORIES= astro geography MASTER_SITES= http://www.foxtrotgps.org/releases/ MAINTAINER= crwhipp@gmail.com COMMENT= Lightweight opensource gps moving map application LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libcurl.so:ftp/curl \ libexif.so:graphics/libexif \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ - libsoup-2.4.so:devel/libsoup \ - libgps.so:astro/gpsd + libgps.so:astro/gpsd \ + libsoup-2.4.so:devel/libsoup -INFO= foxtrotgps -GNU_CONFIGURE= yes -CONFIGURE_ENV= DATADIRNAME=share -CONFIGURE_ARGS= --disable-schemas-install USES= compiler:c++11-lang gettext gmake gnome pkgconfig python \ shebangfix sqlite:3 +USE_GNOME= cairo gconf2 gtk20 intltool libglade2 libxml2 +GLIB_SCHEMAS= org.foxtrotgps.gschema.xml +INSTALLS_ICONS= yes + SHEBANG_FILES= contrib/convert2gpx \ contrib/convert2osm \ contrib/georss2foxtrotgps-poi\ contrib/gpx2osm \ - contrib/poi2osm \ contrib/osb2foxtrot \ + contrib/poi2osm -USE_GNOME= gtk20 gconf2 libxml2 intltool libglade2 -INSTALLS_ICONS= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-schemas-install +CONFIGURE_ENV= DATADIRNAME=share -GCONF_SCHEMAS= apps_foxtrotgps.schemas +INFO= foxtrotgps .include Index: head/astro/foxtrotgps/distinfo =================================================================== --- head/astro/foxtrotgps/distinfo (revision 546923) +++ head/astro/foxtrotgps/distinfo (revision 546924) @@ -1,2 +1,3 @@ -SHA256 (foxtrotgps-1.2.0.tar.gz) = aa1ffbbf299b7b0f305a0bdbe395266e18305bb9449d621fb88bf8760b55505a -SIZE (foxtrotgps-1.2.0.tar.gz) = 2115329 +TIMESTAMP = 1598361882 +SHA256 (foxtrotgps-1.2.2.tar.gz) = 1773d591ec5cc57a0695b9f9d909aa0b37f6fa577b1eb1753b3eb8a275e1290a +SIZE (foxtrotgps-1.2.2.tar.gz) = 2165187 Index: head/astro/foxtrotgps/files/patch-src_tracks.c =================================================================== --- head/astro/foxtrotgps/files/patch-src_tracks.c (revision 546923) +++ head/astro/foxtrotgps/files/patch-src_tracks.c (nonexistent) @@ -1,123 +0,0 @@ ---- src/tracks.c.orig 2014-10-24 04:57:10 UTC -+++ src/tracks.c -@@ -41,8 +41,10 @@ bbox_t get_track_bbox(GSList *track); - GSList * load_log_file_into_list(char *file); - GSList * load_gpx_file_into_list(char *file); - GSList * load_ols_XML_file_into_list(char *file); -+GSList * load_kml_XML_file_into_list(char *file); - GSList * parse_gpx_nodes(xmlNode *node); - GSList * parse_ols_XML_nodes(xmlNode *node); -+GSList * parse_kml_XML_nodes(xmlNode *node); - - void * fetch_track_thread(void *ptr); - void * fetch_openrouteservice_track_thread(void *ptr); -@@ -662,6 +664,30 @@ load_ols_XML_string_into_list(char *ols_ - } - - GSList * -+load_kml_XML_string_into_list(char *kml_string) -+{ -+ GSList *list = NULL; -+ xmlDoc *doc = NULL; -+ xmlNode *root_element = NULL; -+ -+ if(!kml_string) return NULL; -+ -+ LIBXML_TEST_VERSION -+ -+ doc = xmlReadMemory(kml_string, strlen(kml_string), "noname.xml", NULL, 0); -+ -+ if (doc == NULL) { -+ fprintf (stderr, _("Failed to parse document\n")); -+ } else { -+ root_element = xmlDocGetRootElement(doc); -+ list = parse_kml_XML_nodes(root_element); -+ xmlFreeDoc(doc); -+ } -+ -+ return list; -+} -+ -+GSList * - parse_gpx_nodes(xmlNode *node) - { - xmlNode *cur_node = NULL; -@@ -754,6 +780,60 @@ parse_ols_XML_nodes(xmlNode *node) - return list; - } - -+GSList * -+parse_kml_XML_nodes(xmlNode *node) -+{ -+ xmlNode *cur_node = NULL; -+ GSList *list = NULL; -+ -+ for (cur_node = node; cur_node; cur_node = cur_node->next) -+ { -+ if (xmlStrEqual(cur_node->name, BAD_CAST "Placemark")) -+ { -+ xmlNode *geometry_node = cur_node->children; -+ while (geometry_node != NULL) -+ { -+ if (xmlStrEqual(geometry_node->name, BAD_CAST "LineString")) -+ { -+ xmlNode *inner_cur_node = geometry_node->children; -+ while (inner_cur_node != NULL) -+ { -+ if (xmlStrEqual(inner_cur_node->name, BAD_CAST "coordinates")) { -+ char** lonlatlist; -+ lonlatlist = g_strsplit(xmlNodeGetContent(inner_cur_node), "\n", -1); -+ for(unsigned int i = 0; lonlatlist[i]; i++){ -+ g_strchug(lonlatlist[i]); -+ g_strchomp(lonlatlist[i]); -+ char** lonlat = g_strsplit(lonlatlist[i], ",", 2); -+ if (lonlat[0]) -+ { -+ double lat, lon; -+ lon = atof(lonlat[0]); -+ if (lonlat[1]) -+ { -+ trackpoint_t *tp = g_new0(trackpoint_t,1); -+ lat = atof(lonlat[1]); -+ tp->lat = deg2rad(lat); -+ tp->lon = deg2rad(lon); -+ list = g_slist_append(list, tp); -+ } -+ } -+ g_strfreev (lonlat); -+ } -+ g_strfreev (lonlatlist); -+ } -+ inner_cur_node = inner_cur_node->next; -+ } -+ } -+ geometry_node = geometry_node->next; -+ } -+ } -+ list = g_slist_concat(list, parse_kml_XML_nodes(cur_node->children)); -+ } -+ -+ return list; -+} -+ - - void - fetch_track(GtkWidget *widget, char *service, char *start, char *end) -@@ -796,7 +876,7 @@ void fetch_yournavigation_track(GtkWidge - dialog10 = widget; - printf("%s(): %s, %s\n",__PRETTY_FUNCTION__, start, end); - -- url = g_strdup_printf("http://www.yournavigation.org/api/dev/gosmore.php?format=gpx&flat=%s&flon=%s&tlat=%s&tlon=%s&v=motorcar&fast=1&layer=mapnik",startlatstr, startlonstr, endlatstr, endlonstr); -+ url = g_strdup_printf("http://www.yournavigation.org/api/1.0/gosmore.php?format=kml&flat=%s&flon=%s&tlat=%s&tlon=%s&v=motorcar&fast=1&layer=mapnik",startlatstr, startlonstr, endlatstr, endlonstr); - if (!g_thread_create(&fetch_track_thread, (void *)url, FALSE, NULL) != 0) - g_warning("### can't create route thread\n"); - } -@@ -1002,7 +1082,7 @@ fetch_track_thread(void *ptr) - - printf("HTTP-GET: size: %d, statuscode %d \n", (int)reply->size, (int)reply->status_code); - -- loaded_track = load_gpx_string_into_list(reply->data); -+ loaded_track = load_kml_XML_string_into_list(reply->data); - process_fetched_track(reply, true); - - return NULL; Property changes on: head/astro/foxtrotgps/files/patch-src_tracks.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/astro/foxtrotgps/files/patch-src_gps__functions.c =================================================================== --- head/astro/foxtrotgps/files/patch-src_gps__functions.c (revision 546923) +++ head/astro/foxtrotgps/files/patch-src_gps__functions.c (revision 546924) @@ -1,32 +1,23 @@ --- src/gps_functions.c.orig 2020-03-05 17:21:38 UTC +++ src/gps_functions.c @@ -735,6 +735,11 @@ cb_gpsd_io_error(GIOChannel *src, GIOCondition conditi } +static double +timespec_to_double(struct timespec ts) +{ + return ((double)(ts.tv_sec) + ((double)(ts.tv_nsec) / 1e9)); +} static gboolean cb_gpsd_data(GIOChannel *src, GIOCondition condition, gpointer data) -@@ -744,7 +749,7 @@ cb_gpsd_data(GIOChannel *src, GIOCondition condition, - if (!libgps_initialized) - return FALSE; - -- ret = gps_read(&libgps_gpsdata); -+ ret = gps_read(&libgps_gpsdata, NULL, 0); - /* Note that gps_read() will never actually return 0 - (zero-length reads are converted internally to a -1 return, - since they mean that the connection to the daemon has closed), @@ -755,7 +760,7 @@ cb_gpsd_data(GIOChannel *src, GIOCondition condition, { gpsdata->satellites_used = libgps_gpsdata.satellites_used; gpsdata->hdop = libgps_gpsdata.dop.hdop; - gpsdata->fix.time = libgps_gpsdata.fix.time; + gpsdata->fix.time = timespec_to_double(libgps_gpsdata.fix.time); if (isnan(gpsdata->fix.time)) { gpsdata->fix.time = (time_t) 0; Index: head/astro/foxtrotgps/pkg-plist =================================================================== --- head/astro/foxtrotgps/pkg-plist (revision 546923) +++ head/astro/foxtrotgps/pkg-plist (revision 546924) @@ -1,52 +1,53 @@ bin/convert2gpx bin/convert2osm bin/foxtrotgps bin/georss2foxtrotgps-poi bin/gpx2osm bin/osb2foxtrot bin/poi2osm share/locale/bg/LC_MESSAGES/foxtrotgps.mo share/locale/cs/LC_MESSAGES/foxtrotgps.mo share/locale/de/LC_MESSAGES/foxtrotgps.mo share/locale/es/LC_MESSAGES/foxtrotgps.mo share/locale/fi/LC_MESSAGES/foxtrotgps.mo share/locale/fr/LC_MESSAGES/foxtrotgps.mo share/locale/hu/LC_MESSAGES/foxtrotgps.mo share/locale/it/LC_MESSAGES/foxtrotgps.mo share/locale/ja/LC_MESSAGES/foxtrotgps.mo share/locale/nl/LC_MESSAGES/foxtrotgps.mo share/locale/pl/LC_MESSAGES/foxtrotgps.mo share/locale/pt_BR/LC_MESSAGES/foxtrotgps.mo share/locale/ru/LC_MESSAGES/foxtrotgps.mo share/locale/sk/LC_MESSAGES/foxtrotgps.mo share/locale/sr/LC_MESSAGES/foxtrotgps.mo man/man1/convert2gpx.1.gz man/man1/convert2osm.1.gz man/man1/foxtrotgps.1.gz share/applications/foxtrotgps.desktop %%DOCSDIR%%/cc-by-sa.png %%DOCSDIR%%/cc-by-sa_small.png %%DOCSDIR%%/foxtrotgps-logo.png %%DOCSDIR%%/foxtrotgps.html %%DOCSDIR%%/screenshots/found-route.png %%DOCSDIR%%/screenshots/get-route.png %%DOCSDIR%%/screenshots/main-window.png %%DOCSDIR%%/screenshots/map-download.png %%DOCSDIR%%/screenshots/route-planning.png %%DOCSDIR%%/screenshots/tracking.png %%DOCSDIR%%/AUTHORS %%DOCSDIR%%/COPYING %%DOCSDIR%%/ChangeLog %%DOCSDIR%%/HACKING %%DOCSDIR%%/INSTALL %%DOCSDIR%%/NEWS %%DOCSDIR%%/README %%DOCSDIR%%/README.osb2foxtrot %%DOCSDIR%%/TODO %%DATADIR%%/foxtrotgps.glade share/pixmaps/foxtrotgps-friend.png share/pixmaps/foxtrotgps-myposition.png share/pixmaps/foxtrotgps-photo.png share/pixmaps/foxtrotgps-poi.png share/pixmaps/foxtrotgps-wp.png share/pixmaps/foxtrotgps.png +share/GConf/gsettings/org.foxtrotgps.convert