svn commit: r528219 - in head: astro/foxtrotgps astro/foxtrotgps/files astro/gpsd astro/gpsd/files astro/gpxloggerd astro/gpxloggerd/files comms/direwolf comms/direwolf/files
Loïc Bartoletti
lbartoletti at FreeBSD.org
Wed Mar 11 08:26:09 UTC 2020
Author: lbartoletti
Date: Wed Mar 11 08:26:04 2020
New Revision: 528219
URL: https://svnweb.freebsd.org/changeset/ports/528219
Log:
astro/gpsd: Update to 3.20
- Update to 3.20 (welcome ubxtool and gpsrinex!)
- Fix SConstruct per python3 [1]
- Replace spaces by tabs (pet portlint)
- Fixes astro/foxtrotgps, astro/gpxloggerd and comms/direwolf
Changelog:
- https://gitlab.com/gpsd/gpsd/-/blob/master/NEWS#L16
[1] scons is py27 only and check py27 packages for a py37 port. I commented these tests in SConstruct since we already do it in our Makefile.
PR: 243980
Reviewed by: tcberner (mentor)
Approved by: tcberner (mentor), maintainer timeout (z7dr6ut7gs at snkmail.com, > 2 weeks)
Differential Revision: https://reviews.freebsd.org/D23920
Added:
head/astro/foxtrotgps/files/patch-src_gps__functions.c (contents, props changed)
head/astro/gpsd/files/patch-SConstruct (contents, props changed)
head/astro/gpxloggerd/files/patch-gpxloggerd.c (contents, props changed)
head/comms/direwolf/files/patch-dwgpsd.c (contents, props changed)
Modified:
head/astro/foxtrotgps/Makefile
head/astro/gpsd/Makefile
head/astro/gpsd/distinfo
head/astro/gpsd/pkg-plist
head/astro/gpxloggerd/Makefile
head/comms/direwolf/Makefile
Modified: head/astro/foxtrotgps/Makefile
==============================================================================
--- head/astro/foxtrotgps/Makefile Wed Mar 11 08:21:40 2020 (r528218)
+++ head/astro/foxtrotgps/Makefile Wed Mar 11 08:26:04 2020 (r528219)
@@ -3,7 +3,7 @@
PORTNAME= foxtrotgps
PORTVERSION= 1.2.0
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= astro geography
MASTER_SITES= http://www.foxtrotgps.org/releases/
Added: head/astro/foxtrotgps/files/patch-src_gps__functions.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/astro/foxtrotgps/files/patch-src_gps__functions.c Wed Mar 11 08:26:04 2020 (r528219)
@@ -0,0 +1,32 @@
+--- 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;
Modified: head/astro/gpsd/Makefile
==============================================================================
--- head/astro/gpsd/Makefile Wed Mar 11 08:21:40 2020 (r528218)
+++ head/astro/gpsd/Makefile Wed Mar 11 08:26:04 2020 (r528219)
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= gpsd
-PORTVERSION= 3.17
-PORTREVISION= 1
+PORTVERSION= 3.20
CATEGORIES= astro geography
MASTER_SITES= SAVANNAH
@@ -13,12 +12,13 @@ COMMENT= Daemon that monitors one or more GPSes attach
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
-USES= cpe pathfix pkgconfig python:2.7 scons shebangfix
+USES= cpe pathfix pkgconfig python:3.7 scons shebangfix
CPE_VENDOR= gpsd_project
USE_PYTHON= flavors
+USE_LDCONFIG= yes
USE_RC_SUBR= gpsd
SHEBANG_FILES= *.py gps/*.py gegps xgps gpscat xgpsspeed gpsprof \
- gpsfake
+ gpsfake ubxtool zerk
MAKE_ARGS= prefix="${PREFIX}" mandir="man" pkgconfig="libdata/pkgconfig" \
manbuild=no target_python="${PYTHON_CMD}" qt=no
@@ -31,11 +31,11 @@ OPTIONS_DEFINE= AIVDM ASHTECH CPPBIND DBUS EARTHMATE E
PASSTHROUGH PPS PROFILING RECONFIGURE RTCM104V2 RTCM104V3 \
SHMEXPORT SIRF SOCKEXPORT SUPERSTARII TIMING TNT TRIPMATE \
TSIP UBLOX USB X11
-OPTIONS_DEFAULT= AIVDM ASHTECH CPPBIND EARTHMATE EVERMORE FURY FV18 GARMIN \
- GARMINTXT GEOSTAR GPSCLOCK ITRAX NAVCOM NCURSES NETFEED \
- NMEA0183 NTP NTPSHM NTRIP OCEANSERVER ONCORE PASSTHROUGH \
- RECONFIGURE RTCM104V2 RTCM104V3 SHMEXPORT SIRF SOCKEXPORT \
- SUPERSTARII TIMING TNT TRIPMATE TSIP UBLOX USB X11
+OPTIONS_DEFAULT= AIVDM ASHTECH CPPBIND EARTHMATE EVERMORE FURY FV18 GARMIN \
+ GARMINTXT GEOSTAR GPSCLOCK ITRAX NAVCOM NCURSES NETFEED \
+ NMEA0183 NTP NTPSHM NTRIP OCEANSERVER ONCORE PASSTHROUGH \
+ RECONFIGURE RTCM104V2 RTCM104V3 SHMEXPORT SIRF SOCKEXPORT \
+ SUPERSTARII TIMING TNT TRIPMATE TSIP UBLOX USB X11
OPTIONS_SUB= yes
AIVDM_DESC= Aivdm support
@@ -134,10 +134,11 @@ NCURSES_USES= ncurses
RECONFIGURE_MAKE_ARGS_OFF= reconfigure=no
CPPBIND_MAKE_ARGS_OFF= libgpsmm=no
X11_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cairo>=0:graphics/py-cairo@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}gobject3>=0:devel/py-gobject3@${PY_FLAVOR}
-#X11_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cairo>=0:graphics/py-cairo@${PY_FLAVOR}
+ ${PYTHON_PKGNAMEPREFIX}gobject3>=0:devel/py-gobject3@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}serial>=0:comms/py-serial@${PY_FLAVOR}
X11_USES= gnome
X11_USE= GNOME=gtk30
+X11_MAKE_ARGS_OFF= xgps=no
# Build control
PROFILING_MAKE_ARGS= profiling=yes
@@ -151,5 +152,6 @@ post-install:
-d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} && \
${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
-d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})
+ ${RM} -r ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/gps/__pycache__
.include <bsd.port.mk>
Modified: head/astro/gpsd/distinfo
==============================================================================
--- head/astro/gpsd/distinfo Wed Mar 11 08:21:40 2020 (r528218)
+++ head/astro/gpsd/distinfo Wed Mar 11 08:26:04 2020 (r528219)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1516146278
-SHA256 (gpsd-3.17.tar.gz) = 68e0dbecfb5831997f8b3d6ba48aed812eb465d8c0089420ab68f9ce4d85e77a
-SIZE (gpsd-3.17.tar.gz) = 8755304
+TIMESTAMP = 1581144632
+SHA256 (gpsd-3.20.tar.gz) = 172a7805068eacb815a3c5225436fcb0be46e7e49a5001a94034eac43df85e50
+SIZE (gpsd-3.20.tar.gz) = 3600835
Added: head/astro/gpsd/files/patch-SConstruct
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/astro/gpsd/files/patch-SConstruct Wed Mar 11 08:26:04 2020 (r528219)
@@ -0,0 +1,56 @@
+--- SConstruct.orig 2020-02-08 06:51:40 UTC
++++ SConstruct
+@@ -1267,32 +1267,32 @@ else:
+ config.env['aiogps'] = True
+
+ # check for pyserial
+- try:
+- imp.find_module('serial')
+- announce("Python module serial (pyserial) found.")
+- except ImportError:
+- # no pycairo, don't build xgps, xgpsspeed
+- announce("WARNING: Python module serial (pyserial) not found.")
+- config.env['xgps'] = False
++ #try:
++ # imp.find_module('serial')
++ # announce("Python module serial (pyserial) found.")
++ #except ImportError:
++ # # no pycairo, don't build xgps, xgpsspeed
++ # announce("WARNING: Python module serial (pyserial) not found.")
++ # config.env['xgps'] = False
+
+ if config.env['xgps']:
+ # check for pycairo
+- try:
+- imp.find_module('cairo')
+- announce("Python module cairo (pycairo) found.")
+- except ImportError:
+- # no pycairo, don't build xgps, xgpsspeed
+- announce("WARNING: Python module cairo (pycairo) not found.")
+- config.env['xgps'] = False
++ #try:
++ # imp.find_module('cairo')
++ # announce("Python module cairo (pycairo) found.")
++ #except ImportError:
++ # # no pycairo, don't build xgps, xgpsspeed
++ # announce("WARNING: Python module cairo (pycairo) not found.")
++ # config.env['xgps'] = False
+
+ # check for pygobject
+- try:
+- imp.find_module('gi')
+- announce("Python module gi (pygobject) found.")
+- except ImportError:
+- # no pygobject, don't build xgps, xgpsspeed
+- announce("WARNING: Python module gi (pygobject) not found.")
+- config.env['xgps'] = False
++ #try:
++ # imp.find_module('gi')
++ # announce("Python module gi (pygobject) found.")
++ #except ImportError:
++ # # no pygobject, don't build xgps, xgpsspeed
++ # announce("WARNING: Python module gi (pygobject) not found.")
++ # config.env['xgps'] = False
+
+ if not config.CheckPKG('gtk+-3.0'):
+ config.env['xgps'] = False
Modified: head/astro/gpsd/pkg-plist
==============================================================================
--- head/astro/gpsd/pkg-plist Wed Mar 11 08:21:40 2020 (r528218)
+++ head/astro/gpsd/pkg-plist Wed Mar 11 08:26:04 2020 (r528219)
@@ -8,16 +8,19 @@ bin/gpsfake
%%NCURSES%%bin/gpsmon
bin/gpspipe
bin/gpsprof
+bin/gpsrinex
bin/gpxlogger
bin/lcdgps
%%PPS%%bin/ntpshmmon
+bin/ubxtool
%%X11%%bin/xgps
%%X11%%bin/xgpsspeed
+bin/zerk
include/gps.h
include/libgpsmm.h
lib/libgps.so
-lib/libgps.so.23
-lib/libgps.so.23.0.0
+lib/libgps.so.25
+lib/libgps.so.25.0.0
man/man1/cgps.1.gz
man/man1/gegps.1.gz
man/man1/gps.1.gz
@@ -29,9 +32,12 @@ man/man1/gpsfake.1.gz
man/man1/gpsmon.1.gz
man/man1/gpspipe.1.gz
man/man1/gpsprof.1.gz
+man/man1/gpsrinex.1.gz
man/man1/gpxlogger.1.gz
man/man1/lcdgps.1.gz
man/man1/ntpshmmon.1.gz
+man/man1/ubxtool.1.gz
+man/man1/zerk.1.gz
%%X11%%man/man1/xgps.1.gz
%%X11%%man/man1/xgpsspeed.1.gz
man/man3/libQgpsmm.3.gz
@@ -44,22 +50,13 @@ man/man8/gpsdctl.8.gz
man/man8/gpsinit.8.gz
%%PYTHON_SITELIBDIR%%/%%PYTHON_EGGINFO%%
%%PYTHON_SITELIBDIR%%/gps/__init__.py
-%%PYTHON_SITELIBDIR%%/gps/__init__.pyc
-%%PYTHON_SITELIBDIR%%/gps/__init__.pyo
%%PYTHON_SITELIBDIR%%/gps/client.py
-%%PYTHON_SITELIBDIR%%/gps/client.pyc
-%%PYTHON_SITELIBDIR%%/gps/client.pyo
-%%PYTHON_SITELIBDIR%%/gps/clienthelpers.so
+%%PYTHON_SITELIBDIR%%/gps/clienthelpers.py
%%PYTHON_SITELIBDIR%%/gps/fake.py
-%%PYTHON_SITELIBDIR%%/gps/fake.pyc
-%%PYTHON_SITELIBDIR%%/gps/fake.pyo
%%PYTHON_SITELIBDIR%%/gps/gps.py
-%%PYTHON_SITELIBDIR%%/gps/gps.pyc
-%%PYTHON_SITELIBDIR%%/gps/gps.pyo
%%PYTHON_SITELIBDIR%%/gps/misc.py
-%%PYTHON_SITELIBDIR%%/gps/misc.pyc
-%%PYTHON_SITELIBDIR%%/gps/misc.pyo
%%PYTHON_SITELIBDIR%%/gps/packet.so
+%%PYTHON_SITELIBDIR%%/gps/watch_options.py
libdata/pkgconfig/libgps.pc
sbin/gpsd
sbin/gpsdctl
Modified: head/astro/gpxloggerd/Makefile
==============================================================================
--- head/astro/gpxloggerd/Makefile Wed Mar 11 08:21:40 2020 (r528218)
+++ head/astro/gpxloggerd/Makefile Wed Mar 11 08:26:04 2020 (r528219)
@@ -3,6 +3,7 @@
PORTNAME= gpxloggerd
PORTVERSION= 0.2.3
+PORTREVISION= 1
CATEGORIES= astro
USE_GITHUB= yes
GH_ACCOUNT= glebius
Added: head/astro/gpxloggerd/files/patch-gpxloggerd.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/astro/gpxloggerd/files/patch-gpxloggerd.c Wed Mar 11 08:26:04 2020 (r528219)
@@ -0,0 +1,48 @@
+--- gpxloggerd.c.orig 2020-03-05 17:50:39 UTC
++++ gpxloggerd.c
+@@ -114,7 +114,9 @@ print_fix(struct gps_data_t *gpsdata)
+ fix->latitude, fix->longitude);
+ if (!isnan(fix->altitude))
+ fprintf(logfile, " <ele>%.f</ele>\n", fix->altitude);
+- fprintf(logfile, " <time>%s</time>\n", unix_to_iso8601(fix->time,
++// See https://gitlab.com/gpsd/gpsd/-/blob/master/gps.h#L70
++// Replaced by now_to_iso8601
++ fprintf(logfile, " <time>%s</time>\n", now_to_iso8601(
+ tbuf, sizeof(tbuf)));
+ if (verbose) {
+ switch (fix->mode) {
+@@ -171,6 +173,11 @@ opennewfile(char *template)
+ print_gpx_header();
+ }
+
++static double timespec_to_double(struct timespec ts)
++{
++ return ((double)(ts.tv_sec) + ((double)(ts.tv_nsec) / 1e9));
++}
++
+ static void
+ process(struct gps_data_t *gpsdata)
+ {
+@@ -189,10 +196,10 @@ process(struct gps_data_t *gpsdata)
+ return;
+
+ move = 0; /* stupid old gcc */
+- t = (time_t )floor(fix->time);
+- ot = (time_t )floor(ofix.time);
++ t = (time_t )floor(timespec_to_double(fix->time));
++ ot = (time_t )floor(timespec_to_double(ofix.time));
+ if (minbearing)
+- pt = (time_t )floor(pfix.time);
++ pt = (time_t )floor(timespec_to_double(pfix.time));
+ else
+ pt = ot;
+
+@@ -521,7 +528,7 @@ reopen:
+ if (FD_ISSET(signal_fd[0], &fds))
+ process_signal();
+ if (FD_ISSET(gpsdata.gps_fd, &fds)) {
+- n = gps_read(&gpsdata);
++ n = gps_read(&gpsdata, NULL, 0);
+ if (n < 0) {
+ syslog(LOG_ERR, "gps_read(): %m, reopening");
+ gps_close(&gpsdata);
Modified: head/comms/direwolf/Makefile
==============================================================================
--- head/comms/direwolf/Makefile Wed Mar 11 08:21:40 2020 (r528218)
+++ head/comms/direwolf/Makefile Wed Mar 11 08:26:04 2020 (r528219)
@@ -2,6 +2,7 @@
PORTNAME= direwolf
DISTVERSION= 1.5
+PORTREVISION= 1
CATEGORIES= comms hamradio
MAINTAINER= hamradio at FreeBSD.org
Added: head/comms/direwolf/files/patch-dwgpsd.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/comms/direwolf/files/patch-dwgpsd.c Wed Mar 11 08:26:04 2020 (r528219)
@@ -0,0 +1,34 @@
+--- dwgpsd.c.orig 2020-03-05 16:59:08 UTC
++++ dwgpsd.c
+@@ -57,7 +57,10 @@
+ // Debian bug report: direwolf (1.2-1) FTBFS with libgps22 as part of the gpsd transition (#803605):
+ // dwgps.c claims to only support GPSD_API_MAJOR_VERSION 5, but also builds successfully with
+ // GPSD_API_MAJOR_VERSION 6 provided by libgps22 when the attached patch is applied.
+-#if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 6
++
++// Also compatible with API 9 with conditional compilation later.
++
++#if GPSD_API_MAJOR_VERSION < 5 || GPSD_API_MAJOR_VERSION > 9
+ #error libgps API version might be incompatible.
+ #endif
+
+@@ -257,7 +260,19 @@ static void * read_gpsd_thread (void *arg)
+ /* Fall thru to read which should get error and bail out. */
+ }
+
++// https://github.com/wb2osz/direwolf/issues/196
++// https://bugzilla.redhat.com/show_bug.cgi?id=1674812
++
++// gps_read has two new parameters in API version 7.
++// It looks like this could be used to obtain the JSON message from the daemon.
++// Specify NULL, instead of message buffer space, if this is not desired.
++// Why couldn't they add a new function instead of introducing incompatibility?
++
++#if GPSD_API_MAJOR_VERSION >= 7
++ if (gps_read (&gpsdata, NULL, 0) == -1) {
++#else
+ if (gps_read (&gpsdata) == -1) {
++#endif
+ text_color_set(DW_COLOR_ERROR);
+
+ dw_printf ("------------------------------------------\n");
More information about the svn-ports-head
mailing list