diff --git a/geo/gpx-viewer/Makefile b/geo/gpx-viewer/Makefile index 497a53199af..2854c4ad667 100644 --- a/geo/gpx-viewer/Makefile +++ b/geo/gpx-viewer/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.12 2010/11/17 08:05:12 espie Exp $ +# $OpenBSD: Makefile,v 1.13 2011/01/17 12:49:35 jasper Exp $ COMMENT = gpx file viewer VERSION = 0.2.0 DISTNAME = gpx-viewer-${VERSION} -REVISION = 2 +REVISION = 3 CATEGORIES = geo x11 diff --git a/geo/gpx-viewer/patches/patch-src_gpx-parser_c b/geo/gpx-viewer/patches/patch-src_gpx-parser_c deleted file mode 100644 index 96572428de9..00000000000 --- a/geo/gpx-viewer/patches/patch-src_gpx-parser_c +++ /dev/null @@ -1,38 +0,0 @@ -$OpenBSD: patch-src_gpx-parser_c,v 1.2 2010/09/30 07:32:54 jasper Exp $ - -Remove leading second digits, and adjust strptime() call -ours doesn't support %z nor %F, GNU extensions - ---- src/gpx-parser.c.orig Tue Sep 28 13:30:21 2010 -+++ src/gpx-parser.c Tue Sep 28 13:33:06 2010 -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -234,6 +235,7 @@ void gpx_point_set_position (GpxPoint* self, double la - - time_t gpx_point_get_time (GpxPoint* self) { - time_t result; -+ char *c; - struct tm ta = {0}; - if (self->time == NULL) { - result = (time_t) 0; -@@ -244,7 +246,13 @@ time_t gpx_point_get_time (GpxPoint* self) { - return result; - } - memset (&ta, 0, sizeof (struct tm)); -- strptime (self->time, "%FT%T%z", &ta); -+ /* remove trailing non-digits, strptime doesn't support %z */ -+ for (c = self->time + strlen(self->time); !isdigit(*c); *c='\0', c--); -+ /* now remove trailing .000 if found */ -+ c = strrchr(self->time,'.'); -+ if (c != NULL); -+ *c = '\0'; -+ strptime (self->time, "%Y-%m-%dT%T", &ta); - self->priv->utime = mktime (&ta); - result = self->priv->utime; - return result;