From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from eddie.linux-mips.org ([148.251.95.138] helo=cvs.linux-mips.org) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1iNzTG-0001sk-LI for ptxdist@pengutronix.de; Fri, 25 Oct 2019 15:17:42 +0200 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990396AbfJYNRhKtkQD (ORCPT ); Fri, 25 Oct 2019 15:17:37 +0200 Date: Fri, 25 Oct 2019 15:17:36 +0200 From: Ladislav Michl Message-ID: <20191025131736.GA9062@lenoch> References: <20191025073326.GB26830@lenoch> <20191025073553.GD26830@lenoch> <20191025081637.GG30823@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191025081637.GG30823@pengutronix.de> Subject: [ptxdist] [PATCH v2] gpsd: version bump 2.39 -> 3.19 List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Signed-off-by: Ladislav Michl --- ...still work in progress... CHANGES: -v1: regenerate patches, fix kconfig, drop cross path and pkg-config env, fix python version, fix python bindings install rule ...ix-core-compiling-with-nmea-disabled.patch | 29 --- ...kage-if-some-drivers-are-not-enabled.patch | 48 ----- .../0003-fix-a-simple-compile-error.patch | 28 --- patches/gpsd-2.39/0004-Fix-autotool-bug.patch | 53 ----- ...-on-AM_PATH_PYTHON-to-work-propperly.patch | 104 --------- .../gpsd-2.39/0006-fix-parallel-build.patch | 38 ---- patches/gpsd-2.39/autogen.sh | 4 - patches/gpsd-2.39/series | 9 - .../0001-Search-for-ncursesw-pkgconfig.patch | 25 +++ patches/gpsd-3.19/series | 4 + rules/gpsd.in | 135 +++++++++--- rules/gpsd.make | 199 +++++++++++------- 12 files changed, 259 insertions(+), 417 deletions(-) delete mode 100644 patches/gpsd-2.39/0001-fix-core-compiling-with-nmea-disabled.patch delete mode 100644 patches/gpsd-2.39/0002-fix-link-breakage-if-some-drivers-are-not-enabled.patch delete mode 100644 patches/gpsd-2.39/0003-fix-a-simple-compile-error.patch delete mode 100644 patches/gpsd-2.39/0004-Fix-autotool-bug.patch delete mode 100644 patches/gpsd-2.39/0005-just-rely-on-AM_PATH_PYTHON-to-work-propperly.patch delete mode 100644 patches/gpsd-2.39/0006-fix-parallel-build.patch delete mode 100755 patches/gpsd-2.39/autogen.sh delete mode 100644 patches/gpsd-2.39/series create mode 100644 patches/gpsd-3.19/0001-Search-for-ncursesw-pkgconfig.patch create mode 100644 patches/gpsd-3.19/series diff --git a/patches/gpsd-2.39/0001-fix-core-compiling-with-nmea-disabled.patch b/patches/gpsd-2.39/0001-fix-core-compiling-with-nmea-disabled.patch deleted file mode 100644 index e3e166be3..000000000 --- a/patches/gpsd-2.39/0001-fix-core-compiling-with-nmea-disabled.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Luotao Fu -Date: Sun, 30 Oct 2011 22:33:40 +0100 -Subject: [PATCH] fix core compiling with nmea disabled - -struct nmea is only defined in the driver union if NMEA_ENABLED is set. -libpgsd_core however acquires if the ignore_trailing_edge in nmea is set -or not carelessly if NMEA_ENABLED is set. Add an additional ifdef of -NMEA_ENABLE to fix this. - -Signed-off-by: Luotao Fu ---- -# 20110222 wsa: fixed in master meanwhile - - libgpsd_core.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/libgpsd_core.c b/libgpsd_core.c -index 28f787d..4109369 100644 ---- a/libgpsd_core.c -+++ b/libgpsd_core.c -@@ -206,7 +206,7 @@ static /*@null@*/void *gpsd_ppsmonitor(void *arg) - } else if (cycle > 999000 && cycle < 1001000 ) { - /* looks like PPS pulse or square wave */ - if (duration > 499000 && duration < 501000 --#ifdef GPSCLOCK_ENABLE -+#if defined(NMEA_ENABLE) && defined(GPSCLOCK_ENABLE) - && session->driver.nmea.ignore_trailing_edge - #endif /* GPSCLOCK_ENABLE */ - ) { diff --git a/patches/gpsd-2.39/0002-fix-link-breakage-if-some-drivers-are-not-enabled.patch b/patches/gpsd-2.39/0002-fix-link-breakage-if-some-drivers-are-not-enabled.patch deleted file mode 100644 index b39161ec1..000000000 --- a/patches/gpsd-2.39/0002-fix-link-breakage-if-some-drivers-are-not-enabled.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Luotao Fu -Date: Thu, 23 Apr 2009 18:18:54 +0200 -Subject: [PATCH] fix link breakage if some drivers are not enabled - -rtcm*_unpack and rtcm*_dump functions are only declared if the rtcm drivers are -enabled during configuration. The same for aivdm. If these drivers are not -enabled, linking will fail due to unknow reference. Add some ifdefs to avoid -this. This is ugly ifdef hell. It'd be way eleganter to change the structures in -driver code and put some function pointer checking in here. Due to lack of time -I only did this quick hack. Better ideas are highly welcome. - -Signed-off-by: Luotao Fu ---- -# 20110222 wsa: fixed in master meanwhile. Like this. - - gpsdecode.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/gpsdecode.c b/gpsdecode.c -index ffe898b..e18c698 100644 ---- a/gpsdecode.c -+++ b/gpsdecode.c -@@ -57,19 +57,25 @@ static void decode(FILE *fpin, FILE *fpout) - else if (lexer.type == COMMENT_PACKET) - continue; - else if (lexer.type == RTCM2_PACKET) { -+#if defined(RTCM104V2_ENABLE) - rtcm2_unpack(&rtcm2, (char *)lexer.isgps.buf); - rtcm2_dump(&rtcm2, buf, sizeof(buf)); - (void)fputs(buf, fpout); -+#endif - } - else if (lexer.type == RTCM3_PACKET) { -+#if defined(RTCM104V3_ENABLE) - rtcm3_unpack(&rtcm3, (char *)lexer.outbuffer); - rtcm3_dump(&rtcm3, stdout); -+#endif - } - else if (lexer.type == AIVDM_PACKET) { -+#if defined(aivdm_dump) - /*@ -uniondef */ - if (aivdm_decode((char *)lexer.outbuffer, lexer.outbuflen, &aivdm)) - aivdm_dump(&aivdm.decoded, scaled, labeled, stdout); - /*@ +uniondef */ -+#endif - } - } - } diff --git a/patches/gpsd-2.39/0003-fix-a-simple-compile-error.patch b/patches/gpsd-2.39/0003-fix-a-simple-compile-error.patch deleted file mode 100644 index 312102d75..000000000 --- a/patches/gpsd-2.39/0003-fix-a-simple-compile-error.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Juergen Beisert -Date: Sun, 30 Oct 2011 22:33:40 +0100 -Subject: [PATCH] fix a simple compile error - -This fixes the following compile error: - -.libs/drivers.o drivers.c:938: error: expected '}' before ';' token - -Signed-off-by: Juergen Beisert ---- -# 20110222 wsa: fixed in master meanwhile - - drivers.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/drivers.c b/drivers.c -index 89cd772..373476f 100644 ---- a/drivers.c -+++ b/drivers.c -@@ -935,7 +935,7 @@ static gps_mask_t garmintxt_parse_input(struct gps_device_t *session) - - static const struct gps_type_t garmintxt = { - .type_name = "Garmin Simple Text", /* full name of type */ -- .packet_type = RTCM2_PACKET; /* associated lexer packet type */ -+ .packet_type = RTCM2_PACKET, /* associated lexer packet type */ - .trigger = NULL, /* no recognition string */ - .channels = 0, /* not used */ - .probe_wakeup = NULL, /* no wakeup to be done before hunt */ diff --git a/patches/gpsd-2.39/0004-Fix-autotool-bug.patch b/patches/gpsd-2.39/0004-Fix-autotool-bug.patch deleted file mode 100644 index d1054186f..000000000 --- a/patches/gpsd-2.39/0004-Fix-autotool-bug.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: Luotao Fu -Date: Thu, 23 Apr 2009 15:15:21 +0200 -Subject: [PATCH] Fix autotool bug - -Original by Richard Hansen: -Autoconf has a longstanding bug in AC_REQUIRE that causes out-of-order -macro expansion problems. This patch works around the Autoconf bug. - -lfu: -This one fixes the configure script fails if run with --disable-python. -Some macro needed by dependency tracker is errorneously expanded inside the -python check condition, which cause that these will be failed to be set if -python is not enabled. - -Signed-off-by: FIXME ---- -# 20110222 wsa: fixed in master meanwhile - - configure.ac | 21 +++++++++++++++++++++ - 1 files changed, 21 insertions(+), 0 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7db2a6c..67e9253 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -5,6 +5,27 @@ dnl AC_PREFIX_PROGRAM(gcc) - AM_CONFIG_HEADER(gpsd_config.h) - AC_LANG([C]) - -+# ACREQUIRE_BUGFIX -+# ---------------- -+# Due to a longstanding Autoconf bug (Autoconf 2.50 to at least 2.63), -+# any macro that is AC_REQUIREd at any point must be AC_REQUIREd -+# *before* it is directly expanded. The macros below were being -+# directly expanded before being AC_REQUIREd, so we AC_REQUIRE them -+# early to prevent out-of-order expansion problems. See the threads -+# at: -+# http://lists.gnu.org/archive/html/bug-autoconf/2008-12/msg00039.html -+# http://lists.gnu.org/archive/html/autoconf-patches/2008-12/msg00058.html -+# http://lists.gnu.org/archive/html/bug-autoconf/2009-01/msg00019.html -+# http://lists.gnu.org/archive/html/bug-gnulib/2009-01/msg00247.html -+AC_DEFUN_ONCE([ACREQUIRE_BUGFIX], -+[ -+ AC_REQUIRE([AC_PROG_CPP]) -+ AC_REQUIRE([AC_PROG_EGREP]) -+ AC_REQUIRE([AC_PROG_CC]) -+]) -+ACREQUIRE_BUGFIX -+# ACREQUIRE_BUGFIX done -+ - AC_ARG_ENABLE(python, - AC_HELP_STRING([--disable-python], - [disable python scripts and library bindings]), diff --git a/patches/gpsd-2.39/0005-just-rely-on-AM_PATH_PYTHON-to-work-propperly.patch b/patches/gpsd-2.39/0005-just-rely-on-AM_PATH_PYTHON-to-work-propperly.patch deleted file mode 100644 index 648146116..000000000 --- a/patches/gpsd-2.39/0005-just-rely-on-AM_PATH_PYTHON-to-work-propperly.patch +++ /dev/null @@ -1,104 +0,0 @@ -From: Marc Kleine-Budde -Date: Sun, 30 Oct 2011 22:33:40 +0100 -Subject: [PATCH] just rely on AM_PATH_PYTHON to work propperly - -remove hand crafted python detection and detection of -PYTHON_LIBS and PYTHON_CFLAGS, they are not used anyway. - -Signed-off-by: Marc Kleine-Budde ---- - configure.ac | 77 ++++------------------------------------------------------ - 1 files changed, 5 insertions(+), 72 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 67e9253..08f99a8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -27,82 +27,15 @@ ACREQUIRE_BUGFIX - # ACREQUIRE_BUGFIX done - - AC_ARG_ENABLE(python, -- AC_HELP_STRING([--disable-python], -+ AS_HELP_STRING([--disable-python], - [disable python scripts and library bindings]), - [try_python="$enableval"], [try_python="yes"]) --if test "x$try_python" = "xyes"; then -- AM_PATH_PYTHON -- ac_python=yes -- if test "x$PYTHON" = "x"; then -- AC_PATH_PROG(PYTHON, python, none) -- fi -- -- if test "x$PYTHON" = "xnone"; then -- AC_MSG_WARN([*** Python interpreter not found, Python support disabled.]) -- ac_python=no -- fi -- -- if test "x$ac_python" = "xyes"; then -- AC_MSG_CHECKING(Python version and location) -- PYTHON_PREFIX=`$PYTHON -c "import sys; print sys.prefix"` -- PYTHON_VERSION_MAJOR=[`$PYTHON -c "import sys; print '%d' % (sys.version_info[0]);"`] -- PYTHON_VERSION_MINOR=[`$PYTHON -c "import sys; print '%d' % (sys.version_info[1]);"`] -- PYTHON_VERSION="${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" -- AC_MSG_RESULT([$PYTHON, $PYTHON_VERSION, $PYTHON_PREFIX]) -- -- AC_MSG_CHECKING(whether Python is at least 2.4) -- if test $PYTHON_VERSION_MAJOR -lt 2 -o $PYTHON_VERSION_MAJOR -eq 2 -a $PYTHON_VERSION_MINOR -lt 3; then -- AC_MSG_RESULT(no) -- AC_MSG_WARN([*** GPSD requires at least Python 2.3, Python support disabled.]) -- ac_python=no -- fi -- if test "x$ac_python" = "xyes"; then -- AC_MSG_RESULT(yes) -- -- PYTHON_CFLAGS="-DHAVE_PYTHON -I$PYTHON_PREFIX/include/python$PYTHON_VERSION" -- -- OLD_CPPFLAGS="$CPPFLAGS" -- OLD_CXXFLAGS="$CXXFLAGS" -- CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" -- CXXFLAGS="$CXXFLAGS $PYTHON_CFLAGS" -- -- AC_CHECK_HEADERS([Python.h], -- [], -- [AC_MSG_WARN([*** Python include files not found! You should install the Python development package. Python support disabled]); ac_python=no]) -- CPPFLAGS="$OLD_CPPFLAGS" -- CXXFLAGS="$OLD_CXXFLAGS" - -- if test "x$ac_python" = "xyes"; then -- AC_SUBST([PYTHON_CFLAGS]) -- -- ac_python=no -- for pylibpath in '/usr/lib' $PYTHON_PREFIX/lib $PYTHON_PREFIX/lib/python$PYTHON_VERSION/config; do -- eval `echo unset ac_cv_lib_python$PYTHON_VERSION'___'Py_Finalize | tr '.' '_'` -- -- save_LIBS=$LIBS -- LIBS="$LIBS -L$pylibpath $PYTHON_LIBS" -- AC_CHECK_LIB(python$PYTHON_VERSION, Py_Finalize, PYTHON_LIBS="-L$pylibpath -lpython$PYTHON_VERSION $PYTHON_DEPS"; ac_python=yes,,$PYTHON_DEPS) -- LIBS=$save_LIBS -- if test "x$ac_python" = "xyes"; then -- break -- fi -- done -- -- if test "x$ac_python" != "xyes"; then -- AC_MSG_WARN(*** Python development libraries required, Python support disabled) -- fi -- AC_SUBST([PYTHON_LIBS]) -- -- AC_SUBST(pkgpythondir) -- if test "x$python_install" = "xyes"; then -- pkgpythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION"/site-packages/gpsd" -- fi -- -- fi -- fi -- fi -+if test "x$try_python" = "xyes"; then -+ AM_PATH_PYTHON([2.4], [have_python=yes], [have_python=no]) - fi --AM_CONDITIONAL([HAVE_PYTHON], [test x"$ac_python" = xyes]) -+ -+AM_CONDITIONAL([HAVE_PYTHON], [test "${have_python}" = "yes"]) - - AC_PROG_LN_S - AC_PROG_MAKE_SET diff --git a/patches/gpsd-2.39/0006-fix-parallel-build.patch b/patches/gpsd-2.39/0006-fix-parallel-build.patch deleted file mode 100644 index 1ee26f2c0..000000000 --- a/patches/gpsd-2.39/0006-fix-parallel-build.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Robert Schwebel -Date: Sun, 30 Oct 2011 22:33:40 +0100 -Subject: [PATCH] fix parallel build - -The build system has a race with the creation of the python bindings; if -both targets of the "gpspacket.so gpslib.so:" rule are started at the -same time, the build "sometimes" breaks; this can be triggered with only -a few cycles when built with -j16 on a 8-way box. - -Signed-off-by: Robert Schwebel ---- - Makefile.am | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 05e31f0..818c57a 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -187,12 +187,17 @@ if HAVE_PYTHON - PYEXTENSIONS = gpspacket.so gpslib.so - noinst_SCRIPTS = gpspacket.so gpslib.so setup.py - --gpspacket.so gpslib.so: gpspacket.c gpslib.c libgps.la -+.PHONY: build_python_ext -+build_python_ext: gpspacket.c gpslib.c libgps.la - (pwd="`pwd`"; cd $(srcdir) && $(PYTHON) setup.py build_ext --build-lib "$$pwd" --build-temp "$$pwd/build" --include-dirs "$$pwd") --endif -+ -+gpspacket.so: build_python_ext -+gpslib.so: build_python_ext -+ - # Clean up after Python - clean-local: - rm -rf build -+endif - - # - # Build test_gpsmm diff --git a/patches/gpsd-2.39/autogen.sh b/patches/gpsd-2.39/autogen.sh deleted file mode 100755 index f2a0d7c3a..000000000 --- a/patches/gpsd-2.39/autogen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -./autogen.sh --help - diff --git a/patches/gpsd-2.39/series b/patches/gpsd-2.39/series deleted file mode 100644 index 4c18748c4..000000000 --- a/patches/gpsd-2.39/series +++ /dev/null @@ -1,9 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-fix-core-compiling-with-nmea-disabled.patch -0002-fix-link-breakage-if-some-drivers-are-not-enabled.patch -0003-fix-a-simple-compile-error.patch -0004-Fix-autotool-bug.patch -0005-just-rely-on-AM_PATH_PYTHON-to-work-propperly.patch -0006-fix-parallel-build.patch -# 78d23d82a5e7a26d3f088a02c22c703d - git-ptx-patches magic diff --git a/patches/gpsd-3.19/0001-Search-for-ncursesw-pkgconfig.patch b/patches/gpsd-3.19/0001-Search-for-ncursesw-pkgconfig.patch new file mode 100644 index 000000000..235d5b36e --- /dev/null +++ b/patches/gpsd-3.19/0001-Search-for-ncursesw-pkgconfig.patch @@ -0,0 +1,25 @@ +From: Ladislav Michl +Date: Fri, 25 Oct 2019 14:18:30 +0200 +Subject: [PATCH] Search for ncursesw pkgconfig + +PTXDist can be configured to build wide char verson of ncurses +which SConstruct is unaware of. + +Signed-off-by: Ladislav Michl +--- + SConstruct | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/SConstruct b/SConstruct +index 5160481a7a7b..7bd5b08f2a46 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -826,6 +826,8 @@ else: + ncurseslibs = pkg_config('ncurses', rpath_hack=True) + if config.CheckPKG('tinfo'): + ncurseslibs += pkg_config('tinfo', rpath_hack=True) ++ elif config.CheckPKG('ncursesw'): ++ ncurseslibs = pkg_config('ncursesw', rpath_hack=True) + # It's not yet known whether rpath_hack is appropriate for + # ncurses5-config. + elif WhereIs('ncurses5-config'): diff --git a/patches/gpsd-3.19/series b/patches/gpsd-3.19/series new file mode 100644 index 000000000..04b55f6e0 --- /dev/null +++ b/patches/gpsd-3.19/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Search-for-ncursesw-pkgconfig.patch +# c038683316399f700122b83125e12467 - git-ptx-patches magic diff --git a/rules/gpsd.in b/rules/gpsd.in index ff270cff5..af85dff95 100644 --- a/rules/gpsd.in +++ b/rules/gpsd.in @@ -1,15 +1,15 @@ ## SECTION=system_libraries menuconfig GPSD tristate + select HOST_PYTHON_SCONS select LIBC_M select LIBC_NSL select LIBC_PTHREAD select GCCLIBS_CXX select GCCLIBS_GCC_S - select NCURSES if GPSD_CGPS - select NCURSES if GPSD_GPSMON + select NCURSES if GPSD_NCURSES select DBUS_GLIB if GPSD_DBUS - select PYTHON if GPSD_PYTHON + select PYTHON3 if GPSD_PYTHON prompt "gpsd " help gpsd is a daemon that listens to a GPS or Loran receiver @@ -21,6 +21,9 @@ menuconfig GPSD if GPSD +config GPSD_NCURSES + bool + config GPSD_PYTHON bool prompt "python bindings" @@ -31,21 +34,38 @@ config GPSD_PROFILING bool prompt "enable profiling" -config GPSD_NTPSHM +config GPSD_NTP + bool + prompt "ntp" + +config GPSD_SHM bool - prompt "ntpshm" + prompt "shm" config GPSD_PPS bool prompt "pps" -config GPSD_PPS_ON_CTS +config GPSD_RECONFIGURE bool - prompt "pps_on_cts" + prompt "enable reconfigure" + help + allow gpsd to change device settings + +config GPSD_CONTROLSEND + bool + prompt "enable controlsend" + help + allow gpsctl/gpsmon to change device settings + +config GPSD_GROUP + string + prompt "gpsd group" + help + This group is used for privilege separation. config GPSD_USER string - default "root" prompt "gpsd user" help This user is used for privilege separation. @@ -54,6 +74,10 @@ config GPSD_FIXED_PORT_SPEED string prompt "fixed port speed" +config GPSD_FIXED_PORT_BITS + string + prompt "fixed port bits" + config GPSD_DBUS bool prompt "dbus bindings" @@ -137,9 +161,9 @@ menu "drivers" bool prompt "oceanserver" - config GPSD_DRIVER_MKT3301 + config GPSD_DRIVER_MTK3301 bool - prompt "mkt3301" + prompt "mtk3301" config GPSD_DRIVER_RTCM104V2 bool @@ -188,6 +212,14 @@ menu "install options" queries with a format that is substantially easier to parse than the NMEA 0183 emitted by most GPS receivers. + config GPSD_GPS2UDP + bool + prompt "gps2udp" + help + gps2udp is a tool to connect to gpsd and output the + received sentences to one or many UDP host:port + destinations. + config GPSD_GPSCTL bool prompt "gpsctl" @@ -198,6 +230,16 @@ menu "install options" device baudrate. Note: Not all devices have these capabilities. + config GPSD_GPSDECODE + bool + prompt "gpsdecode" + depends on GPSD_DRIVER_RTCM104V2 + help + The gpsdecode packet decoder. + This tool is a batch-mode decoder for NMEA and various + binary packet formats associated with GPS, AIS, and + differential-correction services. + config GPSD_GPSPIPE bool prompt "gpspipe" @@ -208,13 +250,9 @@ menu "install options" received sentences to stdout. This makes the program useful as a pipe from gpsd to another program or file. - config GPSD_GPSFLASH + config GPSD_GPSRINEX bool - prompt "gpsflash" - help - This program is a firmware loader for GPS receivers - connected via serial or USB port. Presently it supports - only SiRF GPSes. + prompt "gpsrinex" config GPSD_GPXLOGGER bool @@ -224,8 +262,13 @@ menu "install options" (org.gpsd.fix) and logs each fix to standard output as they arrive in an XML format. + config GPSD_LCDGPS + bool + prompt "lcdgps" + config GPSD_CGPS bool + select GPSD_NCURSES prompt "cgps" help cgps is a client resembling xgps, but without the @@ -234,8 +277,8 @@ menu "install options" config GPSD_GPSMON bool + select GPSD_NCURSES prompt "gpsmon" - select NCURSES help The gpsmon real-time packet monitor and diagnostic tool. (This replaces the sirfmon tool in older versions.) @@ -245,19 +288,37 @@ menu "install options" in various ways; some are device-independent, some vary with the GPS chipset type. - config GPSD_GPSDECODE + config GPSD_NTPSHMMON bool - depends on GPSD_DRIVER_RTCM104V2 - prompt "gpsdecode" + select GPSD_NTP + select GPSD_PPS + select GPSD_SHM + prompt "ntpshmmon" help - The gpsdecode packet decoder. - This tool is a batch-mode decoder for NMEA and various - binary packet formats associated with GPS, AIS, and - differential-correction services. + Capture samples from GPS or other ntpd refclock sources. + This program monitors the shared-memory segments updated by + gpsd (and possibly other refclock sources) as a way of + communicating with ntpd, the Network Time Protocol daemon. + It reads these in exactly the way an ntpd instance does. + It can be run concurrently with ntpd without interfering with + ntpd's normal operation. + + config GPSD_PPSCHECK + bool + prompt "ppscheck" + help + ppscheck watches a specified serial port for transitions + that might be PPS. + + config GPSD_GEGPS + bool + select GPSD_PYTHON + prompt "gegps" config GPSD_GPSCAT - bool "gpscat" + bool select GPSD_PYTHON + prompt "gpscat" help The gpscat tool dumps output from a serial device. Optionally, it can packetize the data. @@ -267,8 +328,9 @@ menu "install options" reports to standard output. config GPSD_GPSFAKE - bool "gpsfake" + bool select GPSD_PYTHON + prompt "gpsfake" help The gpsfake test harness simulating a GPS receiver. gpsfake is a test harness for gpsd and its clients. It @@ -278,8 +340,9 @@ menu "install options" through the master side to the GPS. config GPSD_GPSPROF - bool "gpsprof" + bool select GPSD_PYTHON + prompt "gpsprof" help The gpsprof program for plotting spatial scatter of fixes and fix latency. @@ -288,6 +351,24 @@ menu "install options" that draws an illustrative graph. It can also be told to emit the raw profile data. + config GPSD_UBXTOOL + bool + select GPSD_PYTHON + prompt "ubxtool" + help + ubxtool is a tool for u-blox GPS. ubxtool can decode common + u-blox binary messages, poll the GPS status, enable and + disable GPS features, and send user generated commands to + the GPS. + + config GPSD_ZERK + bool + select GPSD_PYTHON + prompt "zerk" + help + zerk is an all purpose GREIS fitting. zerk can decode common + GREIS messages, poll the GPS status, enable and disable GPS + features, and send user generated commands to the GPS. endmenu endif diff --git a/rules/gpsd.make b/rules/gpsd.make index cec308af9..b128b2105 100644 --- a/rules/gpsd.make +++ b/rules/gpsd.make @@ -2,6 +2,7 @@ # # Copyright (C) 2008 by J.Kilb # 2009 by Marc Kleine-Budde +# 2019 by Ladislav Michl # # For further information about the PTXdist project and license conditions # see the README file. @@ -15,11 +16,11 @@ PACKAGES-$(PTXCONF_GPSD) += gpsd # # Paths and names # -GPSD_VERSION := 2.39 -GPSD_MD5 := 3db437196a6840c252fca99b6c19d4d0 +GPSD_VERSION := 3.19 +GPSD_MD5 := b3bf88706794eb8e5f2c2543bf7ba87b GPSD := gpsd-$(GPSD_VERSION) GPSD_SUFFIX := tar.gz -GPSD_URL := $(call ptx/mirror, SF, gpsd.berlios/$(GPSD).$(GPSD_SUFFIX)) +GPSD_URL := http://download.savannah.gnu.org/releases/gpsd/$(GPSD).$(GPSD_SUFFIX) GPSD_SOURCE := $(SRCDIR)/$(GPSD).$(GPSD_SUFFIX) GPSD_DIR := $(BUILDDIR)/$(GPSD) @@ -27,56 +28,130 @@ GPSD_DIR := $(BUILDDIR)/$(GPSD) # Prepare # ---------------------------------------------------------------------------- -GPSD_ENV = \ +GPSD_PROGS-y := +GPSD_PROGS-$(PTXCONF_GPSD_GPS2UDP) += gps2udp +GPSD_PROGS-$(PTXCONF_GPSD_GPSCTL) += gpsctl +GPSD_PROGS-$(PTXCONF_GPSD_GPSDECODE) += gpsdecode +GPSD_PROGS-$(PTXCONF_GPSD_GPSPIPE) += gpspipe +GPSD_PROGS-$(PTXCONF_GPSD_GPSRINEX) += gpsrinex +GPSD_PROGS-$(PTXCONF_GPSD_GPXLOGGER) += gpxlogger +GPSD_PROGS-$(PTXCONF_GPSD_LCDGPS) += lcdgps +GPSD_PROGS-$(PTXCONF_GPSD_CGPS) += cgps +GPSD_PROGS-$(PTXCONF_GPSD_GPSMON) += gpsmon +GPSD_PROGS-$(PTXCONF_GPSD_NTPSHMMON) += ntpshmmon +GPSD_PROGS-$(PTXCONF_GPSD_PPSCHECK) += ppscheck + +GPSD_BUILD_CLIENTS := $(if $(strip $(GPSD_PROGS-y)),no,yes) + +# Python programs +GPSD_PROGS-$(PTXCONF_GPSD_GEGPS) += gegps +GPSD_PROGS-$(PTXCONF_GPSD_GPSCAT) += gpscat +GPSD_PROGS-$(PTXCONF_GPSD_GPSFAKE) += gpsfake +GPSD_PROGS-$(PTXCONF_GPSD_GPSPROF) += gpsprof +GPSD_PROGS-$(PTXCONF_GPSD_UBXTOOL) += ubxtool +GPSD_PROGS-$(PTXCONF_GPSD_ZERK) += zerk + +GPSD_CONF_ENV := \ $(CROSS_ENV) \ - PYTHON=$(CROSS_PYTHON) + PYTHON=$(CROSS_PYTHON3) + +GPSD_CONF_TOOL := scons +GPSD_CONF_OPT := \ + aivdm=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_AIVDM) \ + ashtech=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ASHTECH) \ + bluez=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_BLUEZ) \ + clientdebug=no \ + control_socket=yes \ + controlsend=$(call ptx/yesno, PTXCONF_GPSD_CONTROLSEND) \ + coveraging=no \ + dbus_export=$(call ptx/yesno, PTXCONF_GPSD_DBUS) \ + debug=no \ + earthmate=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_EARTHMATE) \ + evermore=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_EVERMORE) \ + force_global=yes \ + fury=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_FURY) \ + fv18=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_FV18) \ + garmin=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_GARMIN) \ + garmintxt=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_GARMINTXT) \ + geostar=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_GEOSTAR) \ + gpsclock=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_GPSCLOCK) \ + gpsd=$(call ptx/yesno, PTXCONF_GPSD_GPSD) \ + gpsdclients=$(GPSD_BUILD_CLIENTS) \ + greis=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_GREIS) \ + implicit_link=yes \ + ipv6=$(call ptx/yesno, PTXCONF_GLOBAL_IPV6) \ + isync=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ISYNC) \ + itrax=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ITRAX) \ + leapfetch=yes \ + libdir=/usr/$(CROSS_LIB_DIR) \ + libgpsmm=no \ + magic_hat=no \ + manbuild=no \ + minimal=yes \ + mtk3301=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_MTK3301) \ + navcom=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_NAVCOM) \ + ncurses=$(call ptx/yesno, PTXCONF_GPSD_NCURSES) \ + netfeed=yes \ + nmea0183=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_NMEA) \ + nmea2000=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_NMEA) \ + nofloats=no \ + nostrip=yes \ + ntp=$(call ptx/yesno, PTXCONF_GPSD_NTP) \ + ntpshm=$(call ptx/yesno, PTXCONF_GPSD_SHM) \ + ntrip=$(call ptx/yesno, GPSD_DRIVER_NTRIP) \ + oceanserver=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_OCEANSERVER) \ + oncore=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ONCORE) \ + oscillator=yes \ + passthrough=no \ + pps=$(call ptx/yesno, PTXCONF_GPSD_PPS) \ + prefix=/usr \ + profiling=$(call ptx/yesno, PTXCONF_GPSD_PROFILING) \ + python=$(call ptx/yesno, PTXCONF_GPSD_PYTHON) \ + python_libdir=/usr/lib/python$(PYTHON3_MAJORMINOR) \ + qt=no \ + reconfigure=$(call ptx/yesno, PTXCONF_GPSD_RECONFIGURE) \ + rtcm104v2=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_RTCM104V2) \ + rtcm104v3=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_RTCM104V3) \ + shared=yes \ + shm_export=$(call ptx/yesno, PTXCONF_GPSD_SHM) \ + sirf=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_SIRF) \ + skytraq=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_SKYTRAQ) \ + socket_export=$(call ptx/yesno, PTXCONF_GPSD_SOCKET) \ + squelch=yes \ + superstar2=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_SUPERSTAR2) \ + sysconfdir=/etc \ + sysroot= \ + systemd=$(call ptx/yesno, PTXCONF_GPSD_SYSTEMD) \ + target=$(PTXCONF_GNU_TARGET) \ + timeservice=no \ + timing=no \ + tnt=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_TNT) \ + tripmate=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_TRIPMATE) \ + tsip=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_TSIP) \ + ublox=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_UBX) \ + udevdir=/usr/lib/udev \ + usb=$(call ptx/yesno, PTXCONF_GPSD_USB) \ + xgps=no -# -# autoconf -# -GPSD_AUTOCONF := \ - $(CROSS_AUTOCONF_USR) \ - --without-x \ - --$(call ptx/endis, PTXCONF_GPSD_PYTHON)-python \ - --$(call ptx/endis, PTXCONF_GPSD_PROFILING)-profiling \ - --$(call ptx/endis, PTXCONF_GPSD_NTPSHM)-ntpshm \ - --$(call ptx/endis, PTXCONF_GPSD_PPS)-pps \ - --$(call ptx/endis, PTXCONF_GPSD_PPS_ON_CTS)-pps-on-cts \ - --$(call ptx/endis, PTXCONF_GPSD_DBUS)-dbus \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_NMEA)-nmea \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_SIRF)-sirf \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_TSIP)-tsip \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_FV18)-fv18 \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_TRIPMATE)-tripmate \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_EARTHMATE)-earthmate \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_ITRAX)-itrax \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_ASHTECH)-ashtech \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_NAVCOM)-navcom \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_GARMIN)-garmin \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_GARMINTXT)-garmintxt \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_TNT)-tnt \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_UBX)-ubx \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_EVERMORE)-evermore \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_GPSCLOCK)-gpsclock \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_RTCM104V2)-rtcm104v2 \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_RTCM104V3)-rtcm104v3 \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_NTRIP)-ntrip \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_SUPERSTAR2)-superstar2 \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_OCEANSERVER)-oceanserver \ - --$(call ptx/endis, PTXCONF_GPSD_DRIVER_MKT3301)-mkt3301 +ifneq ($(call remove_quotes,$(PTXCONF_GPSD_FIXED_PORT_SPEED)),) +GPSD_CONF_OPT += fixed_port_speed=$(PTXCONF_GPSD_FIXED_PORT_SPEED) +endif +ifneq ($(call remove_quotes,$(PTXCONF_GPSD_FIXED_PORT_BITS)),) +GPSD_CONF_OPT += fixed_port_bits=$(PTXCONF_GPSD_FIXED_PORT_BITS) +endif -ifneq ($(call remove_quotes,$(PTXCONF_GPSD_USER)),) -GPSD_AUTOCONF += --enable-gpsd-user=$(PTXCONF_GPSD_USER) +ifneq ($(call remove_quotes,$(PTXCONF_GPSD_GROUP)),) +GPSD_CONF_OPT += gpsd_group=$(PTXCONF_GPSD_GROUP) endif -ifneq ($(call remove_quotes,$(PTXCONF_GPSD_FIXED_PORT_SPEED)),) -GPSD_AUTOCONF += --enable-fixed-port-speed=$(PTXCONF_GPSD_FIXED_PORT_SPEED) +ifneq ($(call remove_quotes,$(PTXCONF_GPSD_USER)),) +GPSD_CONF_OPT += gpsd_user=$(PTXCONF_GPSD_USER) endif ifneq ($(call remove_quotes,$(PTXCONF_GPSD_MAX_CLIENTS)),) -GPSD_AUTOCONF += --enable-max-clients=$(PTXCONF_GPSD_MAX_CLIENTS) +GPSD_CONF_OPT += max_clients=$(PTXCONF_GPSD_MAX_CLIENTS) endif ifneq ($(call remove_quotes,$(PTXCONF_GPSD_MAX_DEVICES)),) -GPSD_AUTOCONF += --enable-max-devices=$(PTXCONF_GPSD_MAX_DEVICES) +GPSD_CONF_OPT += max_devices=$(PTXCONF_GPSD_MAX_DEVICES) endif # ---------------------------------------------------------------------------- @@ -93,45 +168,15 @@ $(STATEDIR)/gpsd.targetinstall: @$(call install_fixup, gpsd,DESCRIPTION,missing) @$(call install_lib, gpsd, 0, 0, 0644, libgps) - + @$(foreach prog, $(GPSD_PROGS-y), \ + $(call install_copy, gpsd, 0, 0, 0755, /usr/bin/$(prog))$(ptx/nl)) ifdef PTXCONF_GPSD_GPSD @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/sbin/gpsd) endif -ifdef PTXCONF_GPSD_GPSCTL - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpsctl) -endif -ifdef PTXCONF_GPSD_GPSPIPE - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpspipe) -endif -ifdef PTXCONF_GPSD_GPSFLASH - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpsflash) -endif -ifdef PTXCONF_GPSD_GPXLOGGER - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpxlogger) -endif -ifdef PTXCONF_GPSD_CGPS - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/cgps) -endif -ifdef PTXCONF_GPSD_GPSMON - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpsmon) -endif -ifdef PTXCONF_GPSD_GPSDECODE - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpsdecode) -endif - -ifdef PTXCONF_GPSD_GPSCAT - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpscat) -endif -ifdef PTXCONF_GPSD_GPSFAKE - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpsfake) -endif -ifdef PTXCONF_GPSD_GPSPROF - @$(call install_copy, gpsd, 0, 0, 0755, -, /usr/bin/gpsprof) -endif ifdef PTXCONF_GPSD_PYTHON @cd $(GPSD_PKGDIR) && \ - find ./usr/lib/python$(PYTHON_MAJORMINOR) \ + find ./usr/lib/python$(PYTHON3_MAJORMINOR) \ -name "*.so" -o -name "*.pyc" | \ while read file; do \ $(call install_copy, gpsd, 0, 0, 644, -, $${file##.}); \ -- 2.24.0.rc0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de