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 1iNu8Y-0004dY-VG for ptxdist@pengutronix.de; Fri, 25 Oct 2019 09:35:58 +0200 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990850AbfJYHfypEkrr (ORCPT ); Fri, 25 Oct 2019 09:35:54 +0200 Date: Fri, 25 Oct 2019 09:35:53 +0200 From: Ladislav Michl Message-ID: <20191025073553.GD26830@lenoch> References: <20191025073326.GB26830@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191025073326.GB26830@lenoch> Subject: [ptxdist] [PATCH 2/2] 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... ...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 - patches/gpsd-3.19/0001-fix-ncurses.patch | 11 + patches/gpsd-3.19/series | 1 + rules/gpsd.in | 110 ++++++---- rules/gpsd.make | 203 +++++++++++------- 12 files changed, 209 insertions(+), 429 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-fix-ncurses.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-fix-ncurses.patch b/patches/gpsd-3.19/0001-fix-ncurses.patch new file mode 100644 index 000000000..74972662c --- /dev/null +++ b/patches/gpsd-3.19/0001-fix-ncurses.patch @@ -0,0 +1,11 @@ +--- gpsd-3.19/SConstruct.orig 2019-10-24 22:04:26.056326557 +0200 ++++ gpsd-3.19/SConstruct 2019-10-24 22:05:26.238496456 +0200 +@@ -826,6 +826,8 @@ + 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..a2b857196 --- /dev/null +++ b/patches/gpsd-3.19/series @@ -0,0 +1 @@ +0001-fix-ncurses.patch diff --git a/rules/gpsd.in b/rules/gpsd.in index ff270cff5..cb8d52106 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 @@ -31,21 +31,26 @@ config GPSD_PROFILING bool prompt "enable profiling" -config GPSD_NTPSHM +config GPSD_NTP bool - prompt "ntpshm" + prompt "ntp" + +config GPSD_SHM + bool + prompt "shm" config GPSD_PPS bool prompt "pps" -config GPSD_PPS_ON_CTS - bool - prompt "pps_on_cts" +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 +59,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" @@ -66,6 +75,10 @@ config GPSD_MAX_DEVICES string prompt "max devices" +config GPSD_NCURSES + bool + default GPSD_CGPS || GPSD_GPSMON + menu "drivers" config GPSD_DRIVER_NMEA @@ -137,9 +150,9 @@ menu "drivers" bool prompt "oceanserver" - config GPSD_DRIVER_MKT3301 + config GPSD_DRIVER_MTK3301 bool - prompt "mkt3301" + prompt "mtk3301" config GPSD_DRIVER_RTCM104V2 bool @@ -175,8 +188,7 @@ endmenu menu "install options" config GPSD_GPSD - bool - prompt "gpsd" + bool "gpsd" help gpsd is a service daemon that monitors one or more GPS- or AIS receivers attached through serial or USB @@ -188,9 +200,15 @@ 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 "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" + bool "gpsctl" help The gpsctl tool for tweaking GPS settings. gpsctl can switch a dual-mode GPS between NMEA and @@ -198,9 +216,17 @@ menu "install options" device baudrate. Note: Not all devices have these capabilities. + config GPSD_GPSDECODE + bool "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" + bool "gpspipe" help A simple client that captures GPS output and/or gpsd reports and sends it to standard output. @@ -208,34 +234,28 @@ 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 - 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. + config GPSD_GPSRINEX + bool "gpsrinex" config GPSD_GPXLOGGER - bool - prompt "gpxlogger" + bool "gpxlogger" help This program listens to DBUS broadcasts from gpsd (org.gpsd.fix) and logs each fix to standard output as they arrive in an XML format. + config GPSD_LCDGPS + bool "lcdgps" + config GPSD_CGPS - bool - prompt "cgps" + bool "cgps" help cgps is a client resembling xgps, but without the pictorial satellite display and able to run on a serial terminal or terminal emulator. config GPSD_GPSMON - bool - prompt "gpsmon" - select NCURSES + bool "gpsmon" help The gpsmon real-time packet monitor and diagnostic tool. (This replaces the sirfmon tool in older versions.) @@ -245,15 +265,9 @@ menu "install options" in various ways; some are device-independent, some vary with the GPS chipset type. - config GPSD_GPSDECODE - bool - depends on GPSD_DRIVER_RTCM104V2 - prompt "gpsdecode" - 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_GEGPS + bool "gegps" + select GPSD_PYTHON config GPSD_GPSCAT bool "gpscat" @@ -288,6 +302,22 @@ menu "install options" that draws an illustrative graph. It can also be told to emit the raw profile data. + config GPSD_UBXTOOL + bool "ubxtool" + select GPSD_PYTHON + 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 "zerk" + select GPSD_PYTHON + 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..9c9473e25 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,136 @@ 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 + +ifeq ($(strip $(GPSD_PROGS-y)),) +GPSD_BUILD_CLIENTS := no +else +GPSD_BUILD_CLIENTS := yes +endif + +# 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) + PATH=$(CROSS_PATH) \ + PYTHON=$(CROSS_PYTHON3) \ + PKG_CONFIG_SYSROOT_DIR=$(PTXDIST_SYSROOT_CROSS)/bin/pkg-config + +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=yes \ + 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$(PYTHON_MAJORMINOR) \ + qt=no \ + reconfigure=yes \ + 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,41 +174,11 @@ $(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) && \ -- 2.24.0.rc0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de