mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it
@ 2019-10-31 19:35 Ladislav Michl
  2019-10-31 19:36 ` [ptxdist] [PATCH 1/2 v4] add scons conf tool Ladislav Michl
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ladislav Michl @ 2019-10-31 19:35 UTC (permalink / raw)
  To: ptxdist

Hi there,

this is another attempt to bring gpsd to present times. Unlike previous
work done Denis OSTERLAND and later Fabian Godehardt, this one adds
scons tool to PTXdist and makes gpsd to use it.

This is still work in progress [*], released early to make Alexander
Dahl happy as he expressed interrest in gpsd update :)

Changelog supplied only per patch.

	ladis

[*] it basically means it is good enough for my purposes (u-blox NEO-M8U
on serial port), although it would deserve better init system integration,
installing udev rules, etc...

Ladislav Michl (2):
  add scons conf tool
  gpsd: version bump 2.39 -> 3.19

 ...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 ++
 ...Fix-python-binding-cross-compilation.patch |  96 +++++++
 patches/gpsd-3.19/series                      |   5 +
 rules/gpsd.in                                 | 241 ++++++++++++++----
 rules/gpsd.make                               | 207 +++++++++------
 scripts/lib/ptxd_make_world_common.sh         |   7 +-
 scripts/lib/ptxd_make_world_compile.sh        |   2 +
 scripts/lib/ptxd_make_world_install.sh        |  11 +
 scripts/lib/ptxd_make_world_prepare.sh        |   7 +-
 17 files changed, 469 insertions(+), 445 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/0002-Fix-python-binding-cross-compilation.patch
 create mode 100644 patches/gpsd-3.19/series

-- 
2.24.0.rc1

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH 1/2 v4] add scons conf tool
  2019-10-31 19:35 [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it Ladislav Michl
@ 2019-10-31 19:36 ` Ladislav Michl
  2019-10-31 19:37 ` [ptxdist] [PATCH 2/2 v4] gpsd: version bump 2.39 -> 3.19 Ladislav Michl
  2019-10-31 20:17 ` [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it Alexander Dahl
  2 siblings, 0 replies; 4+ messages in thread
From: Ladislav Michl @ 2019-10-31 19:36 UTC (permalink / raw)
  To: ptxdist

SCons is a tool of constant reconfiguration. Almost each call
means performing the configure tests, therefore it does not
nicely fit into PTXDist stages. To get saner behaviour and save
some time everything is done at install stage.
Also note that SCons does not enforce any standard targets nor
variable names, athough most projects seems to support DESTDIR
environment variable and install target.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 CHANGES:
 -v{2,3}: None
 -v4: Moved all the work to install stage

 scripts/lib/ptxd_make_world_common.sh  |  7 ++++++-
 scripts/lib/ptxd_make_world_compile.sh |  2 ++
 scripts/lib/ptxd_make_world_install.sh | 11 +++++++++++
 scripts/lib/ptxd_make_world_prepare.sh |  7 ++++++-
 4 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh
index dc601cc05..c277304c7 100644
--- a/scripts/lib/ptxd_make_world_common.sh
+++ b/scripts/lib/ptxd_make_world_common.sh
@@ -319,6 +319,11 @@ ptxd_make_world_init() {
 	    pkg_make_env="${pkg_conf_env:-${!env_ptr}}"
 	    pkg_make_opt="${pkg_make_opt:-build}"
 	    ;;
+	scons)
+	    local env_ptr="ptx_conf_env_${pkg_type}"
+	    pkg_make_env="${pkg_conf_env:-${!env_ptr}}"
+	    pkg_make_opt="${pkg_conf_opt}"
+	    ;;
 	meson)
 	    local conf_opt_ptr="ptx_conf_opt_${pkg_conf_tool}_${pkg_type}${conf_opt_ext}"
 	    local conf_env_ptr="ptx_conf_env_${pkg_conf_tool}_${pkg_type}"
@@ -428,7 +433,7 @@ ptxd_make_world_init() {
 	python*)
 	    pkg_install_opt="${pkg_install_opt} --root=${pkg_pkg_dir}"
 	    ;;
-	ninja)
+	ninja|scons)
 	    pkg_env="DESTDIR=\"${pkg_pkg_dir}\" ${pkg_env}"
 	    ;;
 	*)
diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh
index c7093250d..0c86878a2 100644
--- a/scripts/lib/ptxd_make_world_compile.sh
+++ b/scripts/lib/ptxd_make_world_compile.sh
@@ -37,6 +37,8 @@ ptxd_make_world_compile() {
 	    "${pkg_make_opt}" \
 	    "${pkg_make_par}"
 	;;
+	scons)
+	;;
 	*)
 	ptxd_eval \
 	    "${pkg_path}" \
diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh
index ba8e2058e..a7ae6cd95 100644
--- a/scripts/lib/ptxd_make_world_install.sh
+++ b/scripts/lib/ptxd_make_world_install.sh
@@ -98,6 +98,17 @@ ptxd_make_world_install() {
 	    -j1 \
 	)
 	;;
+	scons)
+	cmd=( \
+	    "${pkg_path}" \
+	    "${pkg_env}" \
+	    "${pkg_make_env}" \
+	    scons \
+	    -C "${pkg_build_dir}" \
+            "${pkg_make_opt}" \
+	    "${pkg_install_opt}" \
+	)
+	;;
 	*)
 	cmd=( \
 	    "${pkg_path}" \
diff --git a/scripts/lib/ptxd_make_world_prepare.sh b/scripts/lib/ptxd_make_world_prepare.sh
index e21a85b0e..38e7f1051 100644
--- a/scripts/lib/ptxd_make_world_prepare.sh
+++ b/scripts/lib/ptxd_make_world_prepare.sh
@@ -204,13 +204,18 @@ ptxd_make_world_prepare() {
 		ptxd_bailout "'${pkg_label}' uses '${pkg_conf_tool}' but does not select any python"
 	    fi
 	    ;;
+	scons)
+	    if ! [[ "${pkg_build_deps}" =~ "host-python-${pkg_conf_tool}" ]]; then
+		ptxd_bailout "'${pkg_label}' uses '${pkg_conf_tool}' but does not select 'host-python-${pkg_conf_tool}'"
+	    fi
+	    ;;
     esac
 
     case "${pkg_conf_tool}" in
 	autoconf|cmake|qmake|kconfig|perl|meson)
 	    cd -- "${pkg_build_dir}" &&
 	    ptxd_make_world_prepare_"${pkg_conf_tool}" ;;
-	python|python3)
+	python|python3|scons)
 	    : ;; # nothing to do
 	"NO") echo "prepare stage disabled." ;;
 	"")   echo "No prepare tool found. Do nothing." ;;
-- 
2.24.0.rc1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH 2/2 v4] gpsd: version bump 2.39 -> 3.19
  2019-10-31 19:35 [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it Ladislav Michl
  2019-10-31 19:36 ` [ptxdist] [PATCH 1/2 v4] add scons conf tool Ladislav Michl
@ 2019-10-31 19:37 ` Ladislav Michl
  2019-10-31 20:17 ` [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it Alexander Dahl
  2 siblings, 0 replies; 4+ messages in thread
From: Ladislav Michl @ 2019-10-31 19:37 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 (options still needs to be polished)

 CHANGES:
  -v2: regenerate patches, fix kconfig, drop cross path and
       pkg-config env, fix python version, fix python bindings
       install rule
  -v3: python bindings now build, but I'm not too happy with it.
  -v4: better patch for python bindings, updated build options.

 ...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 ++
 ...Fix-python-binding-cross-compilation.patch |  96 +++++++
 patches/gpsd-3.19/series                      |   5 +
 rules/gpsd.in                                 | 241 ++++++++++++++----
 rules/gpsd.make                               | 207 +++++++++------
 13 files changed, 444 insertions(+), 443 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/0002-Fix-python-binding-cross-compilation.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 <l.fu@pengutronix.de>
-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 <l.fu@pengutronix.de>
----
-# 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 <l.fu@pengutronix.de>
-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 <l.fu@pengutronix.de>
----
-# 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 <jbeisert@pengutronix.de>
-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 <jbeisert@pengutronix.de>
----
-# 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 <l.fu@pengutronix.de>
-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 <mkl@pengutronix.de>
-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 <mkl@pengutronix.de>
----
- 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 <r.schwebel@pengutronix.de>
-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 <r.schwebel@pengutronix.de>
----
- 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 <ladis@linux-mips.org>
+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 <ladis@linux-mips.org>
+---
+ 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/0002-Fix-python-binding-cross-compilation.patch b/patches/gpsd-3.19/0002-Fix-python-binding-cross-compilation.patch
new file mode 100644
index 000000000..94a4810f6
--- /dev/null
+++ b/patches/gpsd-3.19/0002-Fix-python-binding-cross-compilation.patch
@@ -0,0 +1,96 @@
+From: Ladislav Michl <ladis@linux-mips.org>
+Date: Wed, 30 Oct 2019 11:47:28 +0100
+Subject: [PATCH] Fix python binding cross-compilation
+
+---
+ SConstruct | 48 +++++++++++++++++++++---------------------------
+ 1 file changed, 21 insertions(+), 27 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 7bd5b08f2a46..4895b659ba49 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -440,6 +440,10 @@ def announce(msg):
+     if not env.GetOption("silent"):
+         print(msg)
+ 
++if env['sysroot']:
++    sysroot = env['sysroot']
++else:
++    sysroot = ''
+ 
+ # DESTDIR environment variable means user prefix the installation root.
+ DESTDIR = os.environ.get('DESTDIR', '')
+@@ -454,12 +458,6 @@ def installdir(dir, add_destdir=True):
+     wrapped.replace("/usr/lib/systemd", "/lib/systemd")
+     return wrapped
+ 
+-
+-# Honor the specified installation prefix in link paths.
+-if env["sysroot"]:
+-    env.Prepend(LIBPATH=[env["sysroot"] + installdir('libdir',
+-                add_destdir=False)])
+-
+ # Give deheader a way to set compiler flags
+ if 'MORECFLAGS' in os.environ:
+     env.Append(CFLAGS=Split(os.environ['MORECFLAGS']))
+@@ -513,11 +511,6 @@ if env['target']:
+     for (name, toolname) in devenv:
+         env[name] = env['target'] + '-' + toolname
+ 
+-if env['sysroot']:
+-    env.MergeFlags({"CFLAGS": ["--sysroot=%s" % env['sysroot']]})
+-    env.MergeFlags({"LINKFLAGS": ["--sysroot=%s" % env['sysroot']]})
+-
+-
+ # Build help
+ def cmp(a, b):
+     return (a > b) - (a < b)
+@@ -1156,22 +1149,23 @@ if helping:
+ 
+ else:
+ 
+-    if config.env['python'] and config.env['target_python']:
+-        try:
+-            config.CheckProg
+-        except AttributeError:  # Older scons versions don't have CheckProg
+-            target_python_path = config.env['target_python']
+-        else:
+-            target_python_path = config.CheckProg(config.env['target_python'])
+-        if not target_python_path:
+-            announce("Target Python doesn't exist - disabling Python.")
+-            config.env['python'] = False
+     if config.env['python']:
+-        # Maximize consistency by using the reported sys.executable
+-        target_python_path = config.GetPythonValue('exe path',
+-                                                   'import sys',
+-                                                   'sys.executable',
+-                                                   brief=cleaning)
++        if config.env['target_python']:
++            try:
++                config.CheckProg
++            except AttributeError:  # Older scons versions don't have CheckProg
++                target_python_path = config.env['target_python']
++            else:
++                target_python_path = config.CheckProg(config.env['target_python'])
++            if not target_python_path:
++                announce("Target Python doesn't exist - disabling Python.")
++                config.env['python'] = False
++        else:
++            # Maximize consistency by using the reported sys.executable
++            target_python_path = config.GetPythonValue('exe path',
++                                                       'import sys',
++                                                       'sys.executable',
++                                                       brief=cleaning)
+         if config.env['python_libdir']:
+             python_libdir = config.env['python_libdir']
+         else:
+@@ -1674,7 +1668,7 @@ else:
+                        LINK=ldshared,
+                        SHLIBPREFIX="",
+                        SHLIBSUFFIX=python_config['SO'],
+-                       CPPPATH=[python_config['INCLUDEPY']],
++                       CPPPATH=sysroot + python_config['INCLUDEPY'],
+                        CPPFLAGS=python_config['OPT'],
+                        CFLAGS=python_config['BASECFLAGS'],
+                        CXXFLAGS=python_config['BASECFLAGS'])
diff --git a/patches/gpsd-3.19/series b/patches/gpsd-3.19/series
new file mode 100644
index 000000000..32349387e
--- /dev/null
+++ b/patches/gpsd-3.19/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Search-for-ncursesw-pkgconfig.patch
+0002-Fix-python-binding-cross-compilation.patch
+# a402ea49345e59dc5c9f5487c0ce65c6  - git-ptx-patches magic
diff --git a/rules/gpsd.in b/rules/gpsd.in
index ff270cff5..660088969 100644
--- a/rules/gpsd.in
+++ b/rules/gpsd.in
@@ -1,15 +1,18 @@
 ## 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 DBUS_GLIB	if GPSD_DBUS
-	select PYTHON		if GPSD_PYTHON
+	select BLUEZ			if GPSD_BLUEZ
+	select BLUEZ_LIBBLUETOOTH	if GPSD_BLUEZ
+	select LIBUSB			if GPSD_USB
+	select NCURSES			if GPSD_NCURSES
+	select DBUS_GLIB		if GPSD_DBUS
+	select PYTHON3			if GPSD_PYTHON
 	prompt "gpsd                          "
 	help
 	  gpsd is a daemon that listens to a GPS or Loran receiver
@@ -21,31 +24,89 @@ menuconfig GPSD
 
 if GPSD
 
-config GPSD_PYTHON
+config GPSD_NCURSES
 	bool
-	prompt "python bindings"
-	help
-	  Enables the python bindings.
 
-config GPSD_PROFILING
+comment "time service     ---"
+
+config GPSD_NTP
 	bool
-	prompt "enable profiling"
+	prompt "NTP time hinting support"
 
 config GPSD_NTPSHM
 	bool
-	prompt "ntpshm"
+	depends on GPSD_NTP
+	prompt "NTP time hinting via shared memory"
+
+config GPSD_OSCILLATOR
+	bool
+	prompt "Disciplined oscillator support"
 
 config GPSD_PPS
 	bool
-	prompt "pps"
+	prompt "PPS time syncing support"
+
+comment "export methods   ---"
+
+config GPSD_DBUS
+	bool
+	prompt "enable DBUS export support"
+
+config GPSD_SHM
+	bool
+	prompt "export via shared memory"
 
-config GPSD_PPS_ON_CTS
+config GPSD_SOCKET
 	bool
-	prompt "pps_on_cts"
+	prompt "data export over sockets"
+
+comment "communication    ---"
+
+config GPSD_BLUEZ
+	bool
+	prompt "BlueZ support for Bluetooth devices"
+
+config GPSD_USB
+	bool
+	prompt "libusb support for USB devices"
+
+comment "Other options    ---"
+
+config GPSD_SYSTEMD
+	bool
+	depends on SYSTEMD
+	prompt "systemd"
+
+config GPSD_RECONFIGURE
+	bool
+	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_PYTHON
+	bool
+	prompt "python bindings"
+	help
+	  Enables the python bindings.
+
+config GPSD_PROFILING
+	bool
+	prompt "enable profiling"
+
+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,9 +115,9 @@ config GPSD_FIXED_PORT_SPEED
 	string
 	prompt "fixed port speed"
 
-config GPSD_DBUS
-	bool
-	prompt "dbus bindings"
+config GPSD_FIXED_PORT_BITS
+	string
+	prompt "fixed port bits"
 
 config GPSD_MAX_CLIENTS
 	string
@@ -68,6 +129,42 @@ config GPSD_MAX_DEVICES
 
 menu "drivers"
 
+	config GPSD_DRIVER_AIVDM
+		bool
+		prompt "aivdm"
+
+	config GPSD_DRIVER_ASHTECH
+		bool
+		prompt "ashtech"
+
+	config GPSD_DRIVER_FURY
+		bool
+		prompt "fury"
+
+	config GPSD_DRIVER_FV18
+		bool
+		prompt "fv18"
+
+	config GPSD_DRIVER_GEOSTAR
+		bool
+		prompt "geostar"
+
+	config GPSD_DRIVER_GREIS
+		bool
+		prompt "greis"
+
+	config GPSD_DRIVER_ISYNC
+		bool
+		prompt "isync"
+
+	config GPSD_DRIVER_ONCORE
+		bool
+		prompt "oncore"
+
+	config GPSD_DRIVER_SKYTRAQ
+		bool
+		prompt "skytraq"
+
 	config GPSD_DRIVER_NMEA
 		bool
 		prompt "nmea"
@@ -80,10 +177,6 @@ menu "drivers"
 		bool
 		prompt "tsip"
 
-	config GPSD_DRIVER_FV18
-		bool
-		prompt "fv18"
-
 	config GPSD_DRIVER_TRIPMATE
 		bool
 		prompt "tripmate"
@@ -96,10 +189,6 @@ menu "drivers"
 		bool
 		prompt "itrax"
 
-	config GPSD_DRIVER_ASHTECH
-		bool
-		prompt "ashtech"
-
 	config GPSD_DRIVER_NAVCOM
 		bool
 		prompt "navcom"
@@ -118,6 +207,7 @@ menu "drivers"
 
 	config GPSD_DRIVER_UBX
 		bool
+		select GPSD_NTPSHM
 		select GPSD_DRIVER_NMEA
 		prompt "ubx"
 
@@ -137,9 +227,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 +278,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 +296,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 +316,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 +328,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 +343,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 +354,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 +394,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 +406,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 +417,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..ae4e0628e 100644
--- a/rules/gpsd.make
+++ b/rules/gpsd.make
@@ -2,6 +2,7 @@
 #
 # Copyright (C) 2008 by J.Kilb
 #               2009 by Marc Kleine-Budde <mkl@pengutronix.de>
+#               2019 by Ladislav Michl <ladis@linux-mips.org>
 #
 # 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,127 @@ GPSD_DIR	:= $(BUILDDIR)/$(GPSD)
 # Prepare
 # ----------------------------------------------------------------------------
 
-GPSD_ENV = \
-	$(CROSS_ENV) \
-	PYTHON=$(CROSS_PYTHON)
+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)),yes,no)
+
+# 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_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_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=$(call ptx/yesno, PTXCONF_GPSD_OSCILLATOR) \
+	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=$(SYSROOT) \
+	systemd=$(call ptx/yesno, PTXCONF_GPSD_SYSTEMD) \
+	target=$(PTXCONF_GNU_TARGET) \
+	target_python=$(CROSS_PYTHON3) \
+	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,51 +165,16 @@ $(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) \
-		-name "*.so" -o -name "*.pyc" | \
-		while read file; do \
-		$(call install_copy, gpsd, 0, 0, 644, -, $${file##.}); \
-	done
+	@$(call install_glob, gpsd, 0, 0, -, \
+		/usr/lib/python$(PYTHON3_MAJORMINOR), *.so *.py)
 endif
-
 	@$(call install_finish, gpsd)
 
 	@$(call touch)
-- 
2.24.0.rc1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it
  2019-10-31 19:35 [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it Ladislav Michl
  2019-10-31 19:36 ` [ptxdist] [PATCH 1/2 v4] add scons conf tool Ladislav Michl
  2019-10-31 19:37 ` [ptxdist] [PATCH 2/2 v4] gpsd: version bump 2.39 -> 3.19 Ladislav Michl
@ 2019-10-31 20:17 ` Alexander Dahl
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Dahl @ 2019-10-31 20:17 UTC (permalink / raw)
  To: ptxdist; +Cc: rca


[-- Attachment #1.1: Type: text/plain, Size: 1121 bytes --]

Hei hei,

thanks for your effort, this is very much appreciated. :-)

On Thu, Oct 31, 2019 at 08:35:22PM +0100, Ladislav Michl wrote:
> this is another attempt to bring gpsd to present times. Unlike previous
> work done Denis OSTERLAND and later Fabian Godehardt, this one adds
> scons tool to PTXdist and makes gpsd to use it.
> 
> This is still work in progress [*], released early to make Alexander
> Dahl happy as he expressed interrest in gpsd update :)
> 
> Changelog supplied only per patch.
> 
> 	ladis
> 
> [*] it basically means it is good enough for my purposes (u-blox NEO-M8U
> on serial port), although it would deserve better init system integration,
> installing udev rules, etc...

I'll forward your patches to the colleague using that BSP, maybe we
can test it in the next weeks.

Greets
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 92 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-31 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 19:35 [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it Ladislav Michl
2019-10-31 19:36 ` [ptxdist] [PATCH 1/2 v4] add scons conf tool Ladislav Michl
2019-10-31 19:37 ` [ptxdist] [PATCH 2/2 v4] gpsd: version bump 2.39 -> 3.19 Ladislav Michl
2019-10-31 20:17 ` [ptxdist] [PATCH 0/2 v4] add scons conf tool and let gpsd to use it Alexander Dahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox