* [ptxdist] [PATCH 0/2] add scons conf tool and let gpsd to use it @ 2019-10-25 7:33 Ladislav Michl 2019-10-25 7:34 ` [ptxdist] [PATCH 1/2] add scons conf tool Ladislav Michl 2019-10-25 7:35 ` [ptxdist] [PATCH 2/2] gpsd: version bump 2.39 -> 3.19 Ladislav Michl 0 siblings, 2 replies; 17+ messages in thread From: Ladislav Michl @ 2019-10-25 7:33 UTC (permalink / raw) To: ptxdist Hi there, this is unfortunatelly kind of duplicate work done previously by Denis OSTERLAND. This seems to be pretty common, as there's another patch by Fabian Godehardt sent by Sascha Hauer both being unaware of Denis' work. I found those too late (the second one while writing this cover letter), so I decided to continue with my a bit different approach. Also, both seem to have the same python binding problem :) Please note, that for some reason gpsd's SConstruct changes compiler while building python bindings - see line 1636 and bellow. Therefore python bindings is currently defunct. If anyone figure out how to fix that (and what SCons authors had in mind implementing yet another build system) I would be very happy. This is still work in progress [*], released early to make Alexander Dahl happy as he expressed interrest in gpsd update :) ladis [*] it basically means it is good enough for my purposes, although it would deserve better init system integration, installing udev rules, fixed python, 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 - patches/gpsd-3.19/0001-fix-ncurses.patch | 11 + patches/gpsd-3.19/series | 1 + rules/gpsd.in | 110 ++++++---- rules/gpsd.make | 203 +++++++++++------- scripts/lib/ptxd_make_world_common.sh | 4 +- scripts/lib/ptxd_make_world_compile.sh | 8 + scripts/lib/ptxd_make_world_install.sh | 10 + scripts/lib/ptxd_make_world_prepare.sh | 7 +- 16 files changed, 235 insertions(+), 432 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 -- 2.24.0.rc0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* [ptxdist] [PATCH 1/2] add scons conf tool 2019-10-25 7:33 [ptxdist] [PATCH 0/2] add scons conf tool and let gpsd to use it Ladislav Michl @ 2019-10-25 7:34 ` Ladislav Michl 2019-10-25 7:55 ` Michael Olbrich 2019-10-25 7:35 ` [ptxdist] [PATCH 2/2] gpsd: version bump 2.39 -> 3.19 Ladislav Michl 1 sibling, 1 reply; 17+ messages in thread From: Ladislav Michl @ 2019-10-25 7:34 UTC (permalink / raw) To: ptxdist SCons is a tool of constant reconfiguration. Almost each call means performing the configure tests, therefore it does not fit into PTXDist stages too well. Thus configuration and building is done in compile stage, while install stage is using --config=cache in hope it will not rebuild everything. 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> --- scripts/lib/ptxd_make_world_common.sh | 4 ++-- scripts/lib/ptxd_make_world_compile.sh | 8 ++++++++ scripts/lib/ptxd_make_world_install.sh | 10 ++++++++++ scripts/lib/ptxd_make_world_prepare.sh | 7 ++++++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh index dc601cc05..a759739b8 100644 --- a/scripts/lib/ptxd_make_world_common.sh +++ b/scripts/lib/ptxd_make_world_common.sh @@ -298,7 +298,7 @@ ptxd_make_world_init() { fi case "${pkg_conf_tool}" in - autoconf|cmake|qmake|kconfig|perl) + autoconf|cmake|qmake|kconfig|perl|scons) local conf_opt_ptr="ptx_conf_opt_${pkg_conf_tool}_${pkg_type}${conf_opt_ext}" local conf_env_ptr="ptx_conf_env_${pkg_type}" @@ -428,7 +428,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..5da79cace 100644 --- a/scripts/lib/ptxd_make_world_compile.sh +++ b/scripts/lib/ptxd_make_world_compile.sh @@ -37,6 +37,14 @@ ptxd_make_world_compile() { "${pkg_make_opt}" \ "${pkg_make_par}" ;; + scons) + ptxd_eval \ + "${pkg_path}" \ + "${pkg_env}" \ + "${pkg_conf_env}" \ + scons -C "${pkg_build_dir}" \ + "${pkg_conf_opt}" + ;; *) ptxd_eval \ "${pkg_path}" \ diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh index ba8e2058e..9e5572bc2 100644 --- a/scripts/lib/ptxd_make_world_install.sh +++ b/scripts/lib/ptxd_make_world_install.sh @@ -98,6 +98,16 @@ ptxd_make_world_install() { -j1 \ ) ;; + scons) + cmd=( \ + "${pkg_path}" \ + "${pkg_env}" \ + "${pkg_install_env}" \ + scons --config=cache \ + -C "${pkg_build_dir}" + "${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.rc0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH 1/2] add scons conf tool 2019-10-25 7:34 ` [ptxdist] [PATCH 1/2] add scons conf tool Ladislav Michl @ 2019-10-25 7:55 ` Michael Olbrich 2019-10-25 23:09 ` Ladislav Michl 0 siblings, 1 reply; 17+ messages in thread From: Michael Olbrich @ 2019-10-25 7:55 UTC (permalink / raw) To: ptxdist On Fri, Oct 25, 2019 at 09:34:26AM +0200, Ladislav Michl wrote: > SCons is a tool of constant reconfiguration. Almost each call > means performing the configure tests, therefore it does not fit > into PTXDist stages too well. Thus configuration and building > is done in compile stage, while install stage is using > --config=cache in hope it will not rebuild everything. > 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> > --- > scripts/lib/ptxd_make_world_common.sh | 4 ++-- > scripts/lib/ptxd_make_world_compile.sh | 8 ++++++++ > scripts/lib/ptxd_make_world_install.sh | 10 ++++++++++ > scripts/lib/ptxd_make_world_prepare.sh | 7 ++++++- > 4 files changed, 26 insertions(+), 3 deletions(-) > > diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh > index dc601cc05..a759739b8 100644 > --- a/scripts/lib/ptxd_make_world_common.sh > +++ b/scripts/lib/ptxd_make_world_common.sh > @@ -298,7 +298,7 @@ ptxd_make_world_init() { > fi > > case "${pkg_conf_tool}" in > - autoconf|cmake|qmake|kconfig|perl) > + autoconf|cmake|qmake|kconfig|perl|scons) > local conf_opt_ptr="ptx_conf_opt_${pkg_conf_tool}_${pkg_type}${conf_opt_ext}" > local conf_env_ptr="ptx_conf_env_${pkg_type}" > > @@ -428,7 +428,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..5da79cace 100644 > --- a/scripts/lib/ptxd_make_world_compile.sh > +++ b/scripts/lib/ptxd_make_world_compile.sh > @@ -37,6 +37,14 @@ ptxd_make_world_compile() { > "${pkg_make_opt}" \ > "${pkg_make_par}" > ;; > + scons) > + ptxd_eval \ > + "${pkg_path}" \ > + "${pkg_env}" \ > + "${pkg_conf_env}" \ No, don't use pkg_conf_env here. Take a look at what python is doing in ptxd_make_world_init() Otherwise, setting <PKG>_MAKE_ENV in the package has no Effekt. Michael > + scons -C "${pkg_build_dir}" \ > + "${pkg_conf_opt}" > + ;; > *) > ptxd_eval \ > "${pkg_path}" \ > diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh > index ba8e2058e..9e5572bc2 100644 > --- a/scripts/lib/ptxd_make_world_install.sh > +++ b/scripts/lib/ptxd_make_world_install.sh > @@ -98,6 +98,16 @@ ptxd_make_world_install() { > -j1 \ > ) > ;; > + scons) > + cmd=( \ > + "${pkg_path}" \ > + "${pkg_env}" \ > + "${pkg_install_env}" \ > + scons --config=cache \ > + -C "${pkg_build_dir}" > + "${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.rc0 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH 1/2] add scons conf tool 2019-10-25 7:55 ` Michael Olbrich @ 2019-10-25 23:09 ` Ladislav Michl 2019-10-27 6:30 ` Michael Olbrich 0 siblings, 1 reply; 17+ messages in thread From: Ladislav Michl @ 2019-10-25 23:09 UTC (permalink / raw) To: ptxdist On Fri, Oct 25, 2019 at 09:55:59AM +0200, Michael Olbrich wrote: > > diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh > > index c7093250d..5da79cace 100644 > > --- a/scripts/lib/ptxd_make_world_compile.sh > > +++ b/scripts/lib/ptxd_make_world_compile.sh > > @@ -37,6 +37,14 @@ ptxd_make_world_compile() { > > "${pkg_make_opt}" \ > > "${pkg_make_par}" > > ;; > > + scons) > > + ptxd_eval \ > > + "${pkg_path}" \ > > + "${pkg_env}" \ > > + "${pkg_conf_env}" \ > > No, don't use pkg_conf_env here. Take a look at what python is doing in > ptxd_make_world_init() > Otherwise, setting <PKG>_MAKE_ENV in the package has no Effekt. See quick attempt bellow. Problem with SCons is that install stage has to be called with exactly the same env as build stage, otherwise package is rebuild. Alternatively we can leave everything to install stage. From: Ladislav Michl <ladis@linux-mips.org> Subject: [PATCH 1/2] add scons conf tool SCons is a tool of constant reconfiguration. Almost each call means performing the configure tests, therefore it does not fit into PTXDist stages too well. Thus configuration and building is done in compile stage, while install stage is using --config=cache in hope it will not rebuild everything. 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> --- scripts/lib/ptxd_make_world_common.sh | 7 ++++++- scripts/lib/ptxd_make_world_compile.sh | 8 ++++++++ scripts/lib/ptxd_make_world_install.sh | 11 +++++++++++ scripts/lib/ptxd_make_world_prepare.sh | 7 ++++++- 4 files changed, 31 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..f55786fb6 100644 --- a/scripts/lib/ptxd_make_world_compile.sh +++ b/scripts/lib/ptxd_make_world_compile.sh @@ -37,6 +37,14 @@ ptxd_make_world_compile() { "${pkg_make_opt}" \ "${pkg_make_par}" ;; + scons) + ptxd_eval \ + "${pkg_path}" \ + "${pkg_env}" \ + "${pkg_make_env}" \ + scons -C "${pkg_build_dir}" \ + "${pkg_make_opt}" + ;; *) ptxd_eval \ "${pkg_path}" \ diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh index ba8e2058e..1d9f08782 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}" \ + "${pkg_install_env}" \ + scons --config=cache \ + -C "${pkg_build_dir}" \ + "${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.rc0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH 1/2] add scons conf tool 2019-10-25 23:09 ` Ladislav Michl @ 2019-10-27 6:30 ` Michael Olbrich 2019-11-15 19:19 ` Ladislav Michl 0 siblings, 1 reply; 17+ messages in thread From: Michael Olbrich @ 2019-10-27 6:30 UTC (permalink / raw) To: ptxdist On Sat, Oct 26, 2019 at 01:09:28AM +0200, Ladislav Michl wrote: > On Fri, Oct 25, 2019 at 09:55:59AM +0200, Michael Olbrich wrote: > > > diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh > > > index c7093250d..5da79cace 100644 > > > --- a/scripts/lib/ptxd_make_world_compile.sh > > > +++ b/scripts/lib/ptxd_make_world_compile.sh > > > @@ -37,6 +37,14 @@ ptxd_make_world_compile() { > > > "${pkg_make_opt}" \ > > > "${pkg_make_par}" > > > ;; > > > + scons) > > > + ptxd_eval \ > > > + "${pkg_path}" \ > > > + "${pkg_env}" \ > > > + "${pkg_conf_env}" \ > > > > No, don't use pkg_conf_env here. Take a look at what python is doing in > > ptxd_make_world_init() > > Otherwise, setting <PKG>_MAKE_ENV in the package has no Effekt. > > See quick attempt bellow. Problem with SCons is that install stage > has to be called with exactly the same env as build stage, otherwise > package is rebuild. Alternatively we can leave everything to install > stage. This looks good. Or maybe just drop pkg_install_env. It's deprecated anyways do no need to use it for a new conf tool. <PKG>_MAKE_ENV was introduced exactly to share the same environment for compile and install. Michael > From: Ladislav Michl <ladis@linux-mips.org> > Subject: [PATCH 1/2] add scons conf tool > > SCons is a tool of constant reconfiguration. Almost each call > means performing the configure tests, therefore it does not fit > into PTXDist stages too well. Thus configuration and building > is done in compile stage, while install stage is using > --config=cache in hope it will not rebuild everything. > 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> > --- > scripts/lib/ptxd_make_world_common.sh | 7 ++++++- > scripts/lib/ptxd_make_world_compile.sh | 8 ++++++++ > scripts/lib/ptxd_make_world_install.sh | 11 +++++++++++ > scripts/lib/ptxd_make_world_prepare.sh | 7 ++++++- > 4 files changed, 31 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..f55786fb6 100644 > --- a/scripts/lib/ptxd_make_world_compile.sh > +++ b/scripts/lib/ptxd_make_world_compile.sh > @@ -37,6 +37,14 @@ ptxd_make_world_compile() { > "${pkg_make_opt}" \ > "${pkg_make_par}" > ;; > + scons) > + ptxd_eval \ > + "${pkg_path}" \ > + "${pkg_env}" \ > + "${pkg_make_env}" \ > + scons -C "${pkg_build_dir}" \ > + "${pkg_make_opt}" > + ;; > *) > ptxd_eval \ > "${pkg_path}" \ > diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh > index ba8e2058e..1d9f08782 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}" \ > + "${pkg_install_env}" \ > + scons --config=cache \ > + -C "${pkg_build_dir}" \ > + "${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.rc0 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH 1/2] add scons conf tool 2019-10-27 6:30 ` Michael Olbrich @ 2019-11-15 19:19 ` Ladislav Michl 2019-11-16 10:08 ` Michael Olbrich 0 siblings, 1 reply; 17+ messages in thread From: Ladislav Michl @ 2019-11-15 19:19 UTC (permalink / raw) To: ptxdist Hi Michael, On Sun, Oct 27, 2019 at 07:30:51AM +0100, Michael Olbrich wrote: > On Sat, Oct 26, 2019 at 01:09:28AM +0200, Ladislav Michl wrote: > > On Fri, Oct 25, 2019 at 09:55:59AM +0200, Michael Olbrich wrote: > > > > diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh > > > > index c7093250d..5da79cace 100644 > > > > --- a/scripts/lib/ptxd_make_world_compile.sh > > > > +++ b/scripts/lib/ptxd_make_world_compile.sh > > > > @@ -37,6 +37,14 @@ ptxd_make_world_compile() { > > > > "${pkg_make_opt}" \ > > > > "${pkg_make_par}" > > > > ;; > > > > + scons) > > > > + ptxd_eval \ > > > > + "${pkg_path}" \ > > > > + "${pkg_env}" \ > > > > + "${pkg_conf_env}" \ > > > > > > No, don't use pkg_conf_env here. Take a look at what python is doing in > > > ptxd_make_world_init() > > > Otherwise, setting <PKG>_MAKE_ENV in the package has no Effekt. > > > > See quick attempt bellow. Problem with SCons is that install stage > > has to be called with exactly the same env as build stage, otherwise > > package is rebuild. Alternatively we can leave everything to install > > stage. > > This looks good. Or maybe just drop pkg_install_env. It's deprecated Seems patch was modified to run scons at compile stage as well. What is the justification of such a change? > anyways do no need to use it for a new conf tool. > <PKG>_MAKE_ENV was introduced exactly to share the same environment for > compile and install. Besides, some space instead tab sneaked in: diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh index 07cdd9330..f55786fb6 100644 --- a/scripts/lib/ptxd_make_world_compile.sh +++ b/scripts/lib/ptxd_make_world_compile.sh @@ -43,7 +43,7 @@ ptxd_make_world_compile() { "${pkg_env}" \ "${pkg_make_env}" \ scons -C "${pkg_build_dir}" \ - "${pkg_make_opt}" + "${pkg_make_opt}" ;; *) ptxd_eval \ diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh index a7ae6cd95..5fb606a2e 100644 --- a/scripts/lib/ptxd_make_world_install.sh +++ b/scripts/lib/ptxd_make_world_install.sh @@ -105,7 +105,7 @@ ptxd_make_world_install() { "${pkg_make_env}" \ scons \ -C "${pkg_build_dir}" \ - "${pkg_make_opt}" \ + "${pkg_make_opt}" \ "${pkg_install_opt}" \ ) ;; _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH 1/2] add scons conf tool 2019-11-15 19:19 ` Ladislav Michl @ 2019-11-16 10:08 ` Michael Olbrich 2019-11-18 21:15 ` Ladislav Michl 0 siblings, 1 reply; 17+ messages in thread From: Michael Olbrich @ 2019-11-16 10:08 UTC (permalink / raw) To: ptxdist On Fri, Nov 15, 2019 at 08:19:24PM +0100, Ladislav Michl wrote: > On Sun, Oct 27, 2019 at 07:30:51AM +0100, Michael Olbrich wrote: > > On Sat, Oct 26, 2019 at 01:09:28AM +0200, Ladislav Michl wrote: > > > On Fri, Oct 25, 2019 at 09:55:59AM +0200, Michael Olbrich wrote: > > > > > diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh > > > > > index c7093250d..5da79cace 100644 > > > > > --- a/scripts/lib/ptxd_make_world_compile.sh > > > > > +++ b/scripts/lib/ptxd_make_world_compile.sh > > > > > @@ -37,6 +37,14 @@ ptxd_make_world_compile() { > > > > > "${pkg_make_opt}" \ > > > > > "${pkg_make_par}" > > > > > ;; > > > > > + scons) > > > > > + ptxd_eval \ > > > > > + "${pkg_path}" \ > > > > > + "${pkg_env}" \ > > > > > + "${pkg_conf_env}" \ > > > > > > > > No, don't use pkg_conf_env here. Take a look at what python is doing in > > > > ptxd_make_world_init() > > > > Otherwise, setting <PKG>_MAKE_ENV in the package has no Effekt. > > > > > > See quick attempt bellow. Problem with SCons is that install stage > > > has to be called with exactly the same env as build stage, otherwise > > > package is rebuild. Alternatively we can leave everything to install > > > stage. > > > > This looks good. Or maybe just drop pkg_install_env. It's deprecated > > Seems patch was modified to run scons at compile stage as well. What is > the justification of such a change? Compiling should happen in the compile stage. Otherwise, thinks like parallel building does not work correctly. It does not work correctly yet for scons because I need to sanitize the parallel building options for non-make tools, but that's on my todo list. And I looked at gpsd. Scons is not the reason why stuff is rebuild during install: There is a header that is recreated every time scons is called :-/. > > anyways do no need to use it for a new conf tool. > > <PKG>_MAKE_ENV was introduced exactly to share the same environment for > > compile and install. > > Besides, some space instead tab sneaked in: Right, that should be fixed. I'll handle it. Michael > > diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh > index 07cdd9330..f55786fb6 100644 > --- a/scripts/lib/ptxd_make_world_compile.sh > +++ b/scripts/lib/ptxd_make_world_compile.sh > @@ -43,7 +43,7 @@ ptxd_make_world_compile() { > "${pkg_env}" \ > "${pkg_make_env}" \ > scons -C "${pkg_build_dir}" \ > - "${pkg_make_opt}" > + "${pkg_make_opt}" > ;; > *) > ptxd_eval \ > diff --git a/scripts/lib/ptxd_make_world_install.sh b/scripts/lib/ptxd_make_world_install.sh > index a7ae6cd95..5fb606a2e 100644 > --- a/scripts/lib/ptxd_make_world_install.sh > +++ b/scripts/lib/ptxd_make_world_install.sh > @@ -105,7 +105,7 @@ ptxd_make_world_install() { > "${pkg_make_env}" \ > scons \ > -C "${pkg_build_dir}" \ > - "${pkg_make_opt}" \ > + "${pkg_make_opt}" \ > "${pkg_install_opt}" \ > ) > ;; > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH 1/2] add scons conf tool 2019-11-16 10:08 ` Michael Olbrich @ 2019-11-18 21:15 ` Ladislav Michl 0 siblings, 0 replies; 17+ messages in thread From: Ladislav Michl @ 2019-11-18 21:15 UTC (permalink / raw) To: ptxdist On Sat, Nov 16, 2019 at 11:08:47AM +0100, Michael Olbrich wrote: > On Fri, Nov 15, 2019 at 08:19:24PM +0100, Ladislav Michl wrote: > > On Sun, Oct 27, 2019 at 07:30:51AM +0100, Michael Olbrich wrote: > > > On Sat, Oct 26, 2019 at 01:09:28AM +0200, Ladislav Michl wrote: [...] > > > > See quick attempt bellow. Problem with SCons is that install stage > > > > has to be called with exactly the same env as build stage, otherwise > > > > package is rebuild. Alternatively we can leave everything to install > > > > stage. > > > > > > This looks good. Or maybe just drop pkg_install_env. It's deprecated > > > > Seems patch was modified to run scons at compile stage as well. What is > > the justification of such a change? > > Compiling should happen in the compile stage. Otherwise, thinks like > parallel building does not work correctly. It does not work correctly yet > for scons because I need to sanitize the parallel building options for > non-make tools, but that's on my todo list. Fair enough although now commit message does not reflect code :) > And I looked at gpsd. Scons is not the reason why stuff is rebuild during > install: There is a header that is recreated every time scons is called > :-/. Well, scons runs config stage each time some target is called :-/ (that's why compile and install env settings has to be the same). ladis _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* [ptxdist] [PATCH 2/2] gpsd: version bump 2.39 -> 3.19 2019-10-25 7:33 [ptxdist] [PATCH 0/2] add scons conf tool and let gpsd to use it Ladislav Michl 2019-10-25 7:34 ` [ptxdist] [PATCH 1/2] add scons conf tool Ladislav Michl @ 2019-10-25 7:35 ` Ladislav Michl 2019-10-25 8:16 ` Michael Olbrich 1 sibling, 1 reply; 17+ messages in thread From: Ladislav Michl @ 2019-10-25 7:35 UTC (permalink / raw) To: ptxdist Signed-off-by: Ladislav Michl <ladis@linux-mips.org> --- ...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 <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-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 <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,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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH 2/2] gpsd: version bump 2.39 -> 3.19 2019-10-25 7:35 ` [ptxdist] [PATCH 2/2] gpsd: version bump 2.39 -> 3.19 Ladislav Michl @ 2019-10-25 8:16 ` Michael Olbrich 2019-10-25 13:17 ` [ptxdist] [PATCH v2] " Ladislav Michl 0 siblings, 1 reply; 17+ messages in thread From: Michael Olbrich @ 2019-10-25 8:16 UTC (permalink / raw) To: ptxdist On Fri, Oct 25, 2019 at 09:35:53AM +0200, Ladislav Michl wrote: > Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > --- > ...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 <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-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 @@ Please add a proper patch header. Maybe use git ptx-patches as well: https://www.ptxdist.org/doc/dev_manual.html#using-git > +--- 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 Please put the no-promt options right below the 'if GPSD' > + default GPSD_CGPS || GPSD_GPSMON And select it from those options instead of setting the default here. > + > 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" Please keep this as is. I know this syntax ist used elsewhere, but the majority uses the explicit 'prompt'. Everything else just slipped in and I didn't notice... The same everywhere else please. > 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 <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,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 Maybe: 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) > + PATH=$(CROSS_PATH) \ This should not be necessary. > + PYTHON=$(CROSS_PYTHON3) \ > + PKG_CONFIG_SYSROOT_DIR=$(PTXDIST_SYSROOT_CROSS)/bin/pkg-config This seems wrong. The pkg-config binary for a directory? And PKG_CONFIG_SYSROOT_DIR is unset layer on in the pkgconfig wrapper anyways. > + > +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) \ PYTHON3_MAJORMINOR, right? > + 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));) $(call install_copy, gpsd, 0, 0, 0755, /usr/bin/$(prog))$(ptx/nl)) Notice the tabs, not ';' and the place of the ptx/nl. Michael > 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 > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* [ptxdist] [PATCH v2] gpsd: version bump 2.39 -> 3.19 2019-10-25 8:16 ` Michael Olbrich @ 2019-10-25 13:17 ` Ladislav Michl 2019-10-25 13:38 ` Michael Olbrich 0 siblings, 1 reply; 17+ messages in thread From: Ladislav Michl @ 2019-10-25 13:17 UTC (permalink / raw) To: ptxdist Signed-off-by: Ladislav Michl <ladis@linux-mips.org> --- ...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 <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/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 <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,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 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH v2] gpsd: version bump 2.39 -> 3.19 2019-10-25 13:17 ` [ptxdist] [PATCH v2] " Ladislav Michl @ 2019-10-25 13:38 ` Michael Olbrich 2019-10-25 13:58 ` Ladislav Michl 2019-10-25 23:13 ` [ptxdist] [PATCH v3] " Ladislav Michl 0 siblings, 2 replies; 17+ messages in thread From: Michael Olbrich @ 2019-10-25 13:38 UTC (permalink / raw) To: ptxdist On Fri, Oct 25, 2019 at 03:17:36PM +0200, Ladislav Michl wrote: > Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > --- > ...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 > [...] > > ifdef PTXCONF_GPSD_PYTHON > @cd $(GPSD_PKGDIR) && \ > - find ./usr/lib/python$(PYTHON_MAJORMINOR) \ > + find ./usr/lib/python$(PYTHON3_MAJORMINOR) \ > -name "*.so" -o -name "*.pyc" | \ Can you turn this into a install_glob please? The various python packages should help as an example. I've not tested this yet, but the rest looks good. Michael > while read file; do \ > $(call install_copy, gpsd, 0, 0, 644, -, $${file##.}); \ > -- > 2.24.0.rc0 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH v2] gpsd: version bump 2.39 -> 3.19 2019-10-25 13:38 ` Michael Olbrich @ 2019-10-25 13:58 ` Ladislav Michl 2019-10-25 23:13 ` [ptxdist] [PATCH v3] " Ladislav Michl 1 sibling, 0 replies; 17+ messages in thread From: Ladislav Michl @ 2019-10-25 13:58 UTC (permalink / raw) To: ptxdist On Fri, Oct 25, 2019 at 03:38:48PM +0200, Michael Olbrich wrote: > On Fri, Oct 25, 2019 at 03:17:36PM +0200, Ladislav Michl wrote: > > Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > > --- > > ...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 > > > [...] > > > > ifdef PTXCONF_GPSD_PYTHON > > @cd $(GPSD_PKGDIR) && \ > > - find ./usr/lib/python$(PYTHON_MAJORMINOR) \ > > + find ./usr/lib/python$(PYTHON3_MAJORMINOR) \ > > -name "*.so" -o -name "*.pyc" | \ > > Can you turn this into a install_glob please? The various python packages > should help as an example. Sure, that's not a problem. > I've not tested this yet, but the rest looks good. I'll send next version with above fixed as soon as I figure out how to properly build python bindings. > Michael > > > while read file; do \ > > $(call install_copy, gpsd, 0, 0, 644, -, $${file##.}); \ > > -- > > 2.24.0.rc0 > > > > > > _______________________________________________ > > ptxdist mailing list > > ptxdist@pengutronix.de > > > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* [ptxdist] [PATCH v3] gpsd: version bump 2.39 -> 3.19 2019-10-25 13:38 ` Michael Olbrich 2019-10-25 13:58 ` Ladislav Michl @ 2019-10-25 23:13 ` Ladislav Michl 2019-10-27 6:22 ` Michael Olbrich 2019-10-27 16:25 ` Michael Olbrich 1 sibling, 2 replies; 17+ messages in thread From: Ladislav Michl @ 2019-10-25 23:13 UTC (permalink / raw) To: ptxdist Signed-off-by: Ladislav Michl <ladis@linux-mips.org> --- ...still work in progress... 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. system python config sneaks in somehow. Also all that SConstruct file should be fixed better ...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 +++ ...o-switch-compiler-for-python-modules.patch | 76 +++++++ patches/gpsd-3.19/series | 5 + rules/gpsd.in | 149 ++++++++++--- rules/gpsd.make | 208 +++++++++++------- 13 files changed, 345 insertions(+), 431 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-Do-not-attempt-to-switch-compiler-for-python-modules.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-Do-not-attempt-to-switch-compiler-for-python-modules.patch b/patches/gpsd-3.19/0002-Do-not-attempt-to-switch-compiler-for-python-modules.patch new file mode 100644 index 000000000..b722fd81b --- /dev/null +++ b/patches/gpsd-3.19/0002-Do-not-attempt-to-switch-compiler-for-python-modules.patch @@ -0,0 +1,76 @@ +From: Ladislav Michl <ladis@linux-mips.org> +Date: Sat, 26 Oct 2019 00:26:01 +0200 +Subject: [PATCH] Do not attempt to switch compiler for python modules + +Signed-off-by: Ladislav Michl <ladis@linux-mips.org> +--- + SConstruct | 49 +------------------------------------------------ + 1 file changed, 1 insertion(+), 48 deletions(-) + +diff --git a/SConstruct b/SConstruct +index 7bd5b08f2a46..9fbc15f08dff 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -1634,51 +1634,6 @@ else: + } + + python_env = env.Clone() +- # FIXME: build of python wrappers doesn't pickup flags set for coveraging, +- # manually add them here +- if env['coveraging']: +- python_config['BASECFLAGS'] += ' -coverage' +- python_config['LDFLAGS'] += ' -coverage' +- python_config['LDSHARED'] += ' -coverage' +- # in case CC/CXX was set to the scan-build wrapper, +- # ensure that we build the python modules with scan-build, too +- if env['CC'] is None or env['CC'].find('scan-build') < 0: +- python_env['CC'] = python_config['CC'] +- # As we seem to be changing compilers we must assume that the +- # CCFLAGS are incompatible with the new compiler. If we should +- # use other flags, the variable or the variable for this +- # should be predefined. +- if python_config['CC'].split()[0] != env['CC']: +- python_env['CCFLAGS'] = '' +- else: +- python_env['CC'] = (' '.join([env['CC']] + +- python_config['CC'].split()[1:])) +- if env['CXX'] is None or env['CXX'].find('scan-build') < 0: +- python_env['CXX'] = python_config['CXX'] +- # As we seem to be changing compilers we must assume that the +- # CCFLAGS or CXXFLAGS are incompatible with the new +- # compiler. If we should use other flags, the variable or the +- # variable for this should be predefined. +- if python_config['CXX'].split()[0] != env['CXX']: +- python_env['CCFLAGS'] = '' +- python_env['CXXFLAGS'] = '' +- else: +- python_env['CXX'] = (' '.join([env['CXX']] + +- python_config['CXX'].split()[1:])) +- +- ldshared = python_config['LDSHARED'] +- ldshared = ldshared.replace('-fPIE', '') +- ldshared = ldshared.replace('-pie', '') +- python_env.Replace(SHLINKFLAGS=[], +- LDFLAGS=python_config['LDFLAGS'], +- LINK=ldshared, +- SHLIBPREFIX="", +- SHLIBSUFFIX=python_config['SO'], +- CPPPATH=[python_config['INCLUDEPY']], +- CPPFLAGS=python_config['OPT'], +- CFLAGS=python_config['BASECFLAGS'], +- CXXFLAGS=python_config['BASECFLAGS']) +- + python_objects = {} + python_compiled_libs = {} + for ext, sources in python_extensions.items(): +@@ -1687,9 +1642,7 @@ else: + python_objects[ext].append( + python_env.NoCache( + python_env.SharedObject( +- src.split(".")[0] + '-py_' + +- '_'.join(['%s' % (x) for x in sys.version_info]) + +- python_config['SO'], src ++ src.split(".")[0] + python_config['SO'], src + ) + ) + ) diff --git a/patches/gpsd-3.19/series b/patches/gpsd-3.19/series new file mode 100644 index 000000000..8d2f92797 --- /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-Do-not-attempt-to-switch-compiler-for-python-modules.patch +# 432c4f77512be477d1a1befccf037d83 - git-ptx-patches magic diff --git a/rules/gpsd.in b/rules/gpsd.in index ff270cff5..8383d0ddb 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,31 +21,45 @@ menuconfig GPSD if GPSD -config GPSD_PYTHON +config GPSD_NCURSES bool - prompt "python bindings" - help - Enables the python bindings. 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 +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,9 +68,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 @@ -66,6 +80,16 @@ config GPSD_MAX_DEVICES string prompt "max devices" +config GPSD_DBUS + bool + prompt "dbus bindings" + +config GPSD_PYTHON + bool + prompt "python bindings" + help + Enables the python bindings. + menu "drivers" config GPSD_DRIVER_NMEA @@ -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..5b6266d59 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,131 @@ 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) + MORECFLAGS=-I$(SYSROOT)/usr/include/python$(PYTHON3_MAJORMINOR)m + +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) \ + 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 +169,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) \ - -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.rc0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH v3] gpsd: version bump 2.39 -> 3.19 2019-10-25 23:13 ` [ptxdist] [PATCH v3] " Ladislav Michl @ 2019-10-27 6:22 ` Michael Olbrich 2019-10-27 16:25 ` Michael Olbrich 1 sibling, 0 replies; 17+ messages in thread From: Michael Olbrich @ 2019-10-27 6:22 UTC (permalink / raw) To: ptxdist On Sat, Oct 26, 2019 at 01:13:53AM +0200, Ladislav Michl wrote: > Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > --- > ...still work in progress... > > 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. > system python config sneaks in somehow. Also all that > SConstruct file should be fixed better > > ...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 +++ > ...o-switch-compiler-for-python-modules.patch | 76 +++++++ > patches/gpsd-3.19/series | 5 + > rules/gpsd.in | 149 ++++++++++--- > rules/gpsd.make | 208 +++++++++++------- > 13 files changed, 345 insertions(+), 431 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-Do-not-attempt-to-switch-compiler-for-python-modules.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-Do-not-attempt-to-switch-compiler-for-python-modules.patch b/patches/gpsd-3.19/0002-Do-not-attempt-to-switch-compiler-for-python-modules.patch > new file mode 100644 > index 000000000..b722fd81b > --- /dev/null > +++ b/patches/gpsd-3.19/0002-Do-not-attempt-to-switch-compiler-for-python-modules.patch > @@ -0,0 +1,76 @@ > +From: Ladislav Michl <ladis@linux-mips.org> > +Date: Sat, 26 Oct 2019 00:26:01 +0200 > +Subject: [PATCH] Do not attempt to switch compiler for python modules > + > +Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > +--- > + SConstruct | 49 +------------------------------------------------ > + 1 file changed, 1 insertion(+), 48 deletions(-) > + > +diff --git a/SConstruct b/SConstruct > +index 7bd5b08f2a46..9fbc15f08dff 100644 > +--- a/SConstruct > ++++ b/SConstruct > +@@ -1634,51 +1634,6 @@ else: > + } > + > + python_env = env.Clone() > +- # FIXME: build of python wrappers doesn't pickup flags set for coveraging, > +- # manually add them here > +- if env['coveraging']: > +- python_config['BASECFLAGS'] += ' -coverage' > +- python_config['LDFLAGS'] += ' -coverage' > +- python_config['LDSHARED'] += ' -coverage' > +- # in case CC/CXX was set to the scan-build wrapper, > +- # ensure that we build the python modules with scan-build, too > +- if env['CC'] is None or env['CC'].find('scan-build') < 0: > +- python_env['CC'] = python_config['CC'] > +- # As we seem to be changing compilers we must assume that the > +- # CCFLAGS are incompatible with the new compiler. If we should > +- # use other flags, the variable or the variable for this > +- # should be predefined. > +- if python_config['CC'].split()[0] != env['CC']: > +- python_env['CCFLAGS'] = '' > +- else: > +- python_env['CC'] = (' '.join([env['CC']] + > +- python_config['CC'].split()[1:])) > +- if env['CXX'] is None or env['CXX'].find('scan-build') < 0: > +- python_env['CXX'] = python_config['CXX'] > +- # As we seem to be changing compilers we must assume that the > +- # CCFLAGS or CXXFLAGS are incompatible with the new > +- # compiler. If we should use other flags, the variable or the > +- # variable for this should be predefined. > +- if python_config['CXX'].split()[0] != env['CXX']: > +- python_env['CCFLAGS'] = '' > +- python_env['CXXFLAGS'] = '' > +- else: > +- python_env['CXX'] = (' '.join([env['CXX']] + > +- python_config['CXX'].split()[1:])) > +- > +- ldshared = python_config['LDSHARED'] > +- ldshared = ldshared.replace('-fPIE', '') > +- ldshared = ldshared.replace('-pie', '') > +- python_env.Replace(SHLINKFLAGS=[], > +- LDFLAGS=python_config['LDFLAGS'], > +- LINK=ldshared, > +- SHLIBPREFIX="", > +- SHLIBSUFFIX=python_config['SO'], > +- CPPPATH=[python_config['INCLUDEPY']], > +- CPPFLAGS=python_config['OPT'], > +- CFLAGS=python_config['BASECFLAGS'], > +- CXXFLAGS=python_config['BASECFLAGS']) > +- > + python_objects = {} > + python_compiled_libs = {} > + for ext, sources in python_extensions.items(): > +@@ -1687,9 +1642,7 @@ else: > + python_objects[ext].append( > + python_env.NoCache( > + python_env.SharedObject( > +- src.split(".")[0] + '-py_' + > +- '_'.join(['%s' % (x) for x in sys.version_info]) + > +- python_config['SO'], src > ++ src.split(".")[0] + python_config['SO'], src > + ) > + ) > + ) > diff --git a/patches/gpsd-3.19/series b/patches/gpsd-3.19/series > new file mode 100644 > index 000000000..8d2f92797 > --- /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-Do-not-attempt-to-switch-compiler-for-python-modules.patch > +# 432c4f77512be477d1a1befccf037d83 - git-ptx-patches magic > diff --git a/rules/gpsd.in b/rules/gpsd.in > index ff270cff5..8383d0ddb 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,31 +21,45 @@ menuconfig GPSD > > if GPSD > > -config GPSD_PYTHON > +config GPSD_NCURSES > bool > - prompt "python bindings" > - help > - Enables the python bindings. > > 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 > +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,9 +68,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 > @@ -66,6 +80,16 @@ config GPSD_MAX_DEVICES > string > prompt "max devices" > > +config GPSD_DBUS > + bool > + prompt "dbus bindings" > + > +config GPSD_PYTHON > + bool > + prompt "python bindings" > + help > + Enables the python bindings. > + > menu "drivers" > > config GPSD_DRIVER_NMEA > @@ -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..5b6266d59 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,131 @@ 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) The order is wrong here: GPSD_BUILD_CLIENTS := $(if $(strip $(GPSD_PROGS-y)),yes,no) Sorry, I got that mixed up when I suggested it. > + > +# 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) > + MORECFLAGS=-I$(SYSROOT)/usr/include/python$(PYTHON3_MAJORMINOR)m > + > +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) \ > + 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 +169,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)) You're creating directories here. $(call install_copy, gpsd, 0, 0, 0755, -, \ /usr/bin/$(prog))$(ptx/nl)) Michael > 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.rc0 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH v3] gpsd: version bump 2.39 -> 3.19 2019-10-25 23:13 ` [ptxdist] [PATCH v3] " Ladislav Michl 2019-10-27 6:22 ` Michael Olbrich @ 2019-10-27 16:25 ` Michael Olbrich 2019-10-27 22:29 ` Ladislav Michl 1 sibling, 1 reply; 17+ messages in thread From: Michael Olbrich @ 2019-10-27 16:25 UTC (permalink / raw) To: ptxdist On Sat, Oct 26, 2019 at 01:13:53AM +0200, Ladislav Michl wrote: > Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > --- > ...still work in progress... > > 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. > system python config sneaks in somehow. Also all that > SConstruct file should be fixed better > > ...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 +++ > ...o-switch-compiler-for-python-modules.patch | 76 +++++++ > patches/gpsd-3.19/series | 5 + > rules/gpsd.in | 149 ++++++++++--- > rules/gpsd.make | 208 +++++++++++------- > 13 files changed, 345 insertions(+), 431 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-Do-not-attempt-to-switch-compiler-for-python-modules.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-Do-not-attempt-to-switch-compiler-for-python-modules.patch b/patches/gpsd-3.19/0002-Do-not-attempt-to-switch-compiler-for-python-modules.patch > new file mode 100644 > index 000000000..b722fd81b > --- /dev/null > +++ b/patches/gpsd-3.19/0002-Do-not-attempt-to-switch-compiler-for-python-modules.patch > @@ -0,0 +1,76 @@ > +From: Ladislav Michl <ladis@linux-mips.org> > +Date: Sat, 26 Oct 2019 00:26:01 +0200 > +Subject: [PATCH] Do not attempt to switch compiler for python modules > + > +Signed-off-by: Ladislav Michl <ladis@linux-mips.org> > +--- > + SConstruct | 49 +------------------------------------------------ > + 1 file changed, 1 insertion(+), 48 deletions(-) > + > +diff --git a/SConstruct b/SConstruct > +index 7bd5b08f2a46..9fbc15f08dff 100644 > +--- a/SConstruct > ++++ b/SConstruct > +@@ -1634,51 +1634,6 @@ else: > + } > + > + python_env = env.Clone() > +- # FIXME: build of python wrappers doesn't pickup flags set for coveraging, > +- # manually add them here > +- if env['coveraging']: > +- python_config['BASECFLAGS'] += ' -coverage' > +- python_config['LDFLAGS'] += ' -coverage' > +- python_config['LDSHARED'] += ' -coverage' > +- # in case CC/CXX was set to the scan-build wrapper, > +- # ensure that we build the python modules with scan-build, too > +- if env['CC'] is None or env['CC'].find('scan-build') < 0: > +- python_env['CC'] = python_config['CC'] > +- # As we seem to be changing compilers we must assume that the > +- # CCFLAGS are incompatible with the new compiler. If we should > +- # use other flags, the variable or the variable for this > +- # should be predefined. > +- if python_config['CC'].split()[0] != env['CC']: > +- python_env['CCFLAGS'] = '' > +- else: > +- python_env['CC'] = (' '.join([env['CC']] + > +- python_config['CC'].split()[1:])) > +- if env['CXX'] is None or env['CXX'].find('scan-build') < 0: > +- python_env['CXX'] = python_config['CXX'] > +- # As we seem to be changing compilers we must assume that the > +- # CCFLAGS or CXXFLAGS are incompatible with the new > +- # compiler. If we should use other flags, the variable or the > +- # variable for this should be predefined. > +- if python_config['CXX'].split()[0] != env['CXX']: > +- python_env['CCFLAGS'] = '' > +- python_env['CXXFLAGS'] = '' > +- else: > +- python_env['CXX'] = (' '.join([env['CXX']] + > +- python_config['CXX'].split()[1:])) > +- > +- ldshared = python_config['LDSHARED'] > +- ldshared = ldshared.replace('-fPIE', '') > +- ldshared = ldshared.replace('-pie', '') > +- python_env.Replace(SHLINKFLAGS=[], > +- LDFLAGS=python_config['LDFLAGS'], > +- LINK=ldshared, > +- SHLIBPREFIX="", > +- SHLIBSUFFIX=python_config['SO'], > +- CPPPATH=[python_config['INCLUDEPY']], > +- CPPFLAGS=python_config['OPT'], > +- CFLAGS=python_config['BASECFLAGS'], > +- CXXFLAGS=python_config['BASECFLAGS']) > +- > + python_objects = {} > + python_compiled_libs = {} > + for ext, sources in python_extensions.items(): > +@@ -1687,9 +1642,7 @@ else: > + python_objects[ext].append( > + python_env.NoCache( > + python_env.SharedObject( > +- src.split(".")[0] + '-py_' + > +- '_'.join(['%s' % (x) for x in sys.version_info]) + > +- python_config['SO'], src > ++ src.split(".")[0] + python_config['SO'], src > + ) > + ) > + ) > diff --git a/patches/gpsd-3.19/series b/patches/gpsd-3.19/series > new file mode 100644 > index 000000000..8d2f92797 > --- /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-Do-not-attempt-to-switch-compiler-for-python-modules.patch > +# 432c4f77512be477d1a1befccf037d83 - git-ptx-patches magic > diff --git a/rules/gpsd.in b/rules/gpsd.in > index ff270cff5..8383d0ddb 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,31 +21,45 @@ menuconfig GPSD > > if GPSD > > -config GPSD_PYTHON > +config GPSD_NCURSES > bool > - prompt "python bindings" > - help > - Enables the python bindings. > > 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 > +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,9 +68,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 > @@ -66,6 +80,16 @@ config GPSD_MAX_DEVICES > string > prompt "max devices" > > +config GPSD_DBUS > + bool > + prompt "dbus bindings" > + > +config GPSD_PYTHON > + bool > + prompt "python bindings" > + help > + Enables the python bindings. > + > menu "drivers" > > config GPSD_DRIVER_NMEA > @@ -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..5b6266d59 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,131 @@ 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) > + MORECFLAGS=-I$(SYSROOT)/usr/include/python$(PYTHON3_MAJORMINOR)m > + > +GPSD_CONF_TOOL := scons > +GPSD_CONF_OPT := \ > + aivdm=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_AIVDM) \ PTXCONF_GPSD_DRIVER_AIVDM is not defined. > + ashtech=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ASHTECH) \ > + bluez=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_BLUEZ) \ PTXCONF_GPSD_DRIVER_BLUEZ the same. > + 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) \ and 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) \ and 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) \ and PTXCONF_GPSD_DRIVER_GREIS > + implicit_link=yes \ > + ipv6=$(call ptx/yesno, PTXCONF_GLOBAL_IPV6) \ > + isync=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_ISYNC) \ and 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) \ and 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) \ and PTXCONF_GPSD_DRIVER_SKYTRAQ > + socket_export=$(call ptx/yesno, PTXCONF_GPSD_SOCKET) \ and PTXCONF_GPSD_SOCKET > + squelch=yes \ > + superstar2=$(call ptx/yesno, PTXCONF_GPSD_DRIVER_SUPERSTAR2) \ > + sysconfdir=/etc \ > + sysroot= \ > + systemd=$(call ptx/yesno, PTXCONF_GPSD_SYSTEMD) \ and 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) \ and PTXCONF_GPSD_USB Michael > + 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 +169,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) \ > - -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.rc0 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [ptxdist] [PATCH v3] gpsd: version bump 2.39 -> 3.19 2019-10-27 16:25 ` Michael Olbrich @ 2019-10-27 22:29 ` Ladislav Michl 0 siblings, 0 replies; 17+ messages in thread From: Ladislav Michl @ 2019-10-27 22:29 UTC (permalink / raw) To: ptxdist Hi Michael, thanks for suggestions (and before you notice, there's more to fix than those undefined symbols - dependencies are missing as well, so it is easy to produce configuration which does not make much sense :)) Meanwhile I looked into gpsd's SConstruct file: https://gitlab.com/gpsd/gpsd/blob/master/SConstruct#L1191 As I'm passing CROSS_PYTHON3 as target_python and CROSS_PYTHON3 is a script, sys.executable returns path to host-python and all that configuration queried later using host-python is wrong. Simply dropping this line fixes it. https://gitlab.com/gpsd/gpsd/blob/master/SConstruct#L1705 Here our cross-python wrapper returns INCLUDEPY = "/usr/include/python3.7m" which is of course wrong for cross-compilation. Above two changes are enough to cross-compile package... _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2019-11-18 21:15 UTC | newest] Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-10-25 7:33 [ptxdist] [PATCH 0/2] add scons conf tool and let gpsd to use it Ladislav Michl 2019-10-25 7:34 ` [ptxdist] [PATCH 1/2] add scons conf tool Ladislav Michl 2019-10-25 7:55 ` Michael Olbrich 2019-10-25 23:09 ` Ladislav Michl 2019-10-27 6:30 ` Michael Olbrich 2019-11-15 19:19 ` Ladislav Michl 2019-11-16 10:08 ` Michael Olbrich 2019-11-18 21:15 ` Ladislav Michl 2019-10-25 7:35 ` [ptxdist] [PATCH 2/2] gpsd: version bump 2.39 -> 3.19 Ladislav Michl 2019-10-25 8:16 ` Michael Olbrich 2019-10-25 13:17 ` [ptxdist] [PATCH v2] " Ladislav Michl 2019-10-25 13:38 ` Michael Olbrich 2019-10-25 13:58 ` Ladislav Michl 2019-10-25 23:13 ` [ptxdist] [PATCH v3] " Ladislav Michl 2019-10-27 6:22 ` Michael Olbrich 2019-10-27 16:25 ` Michael Olbrich 2019-10-27 22:29 ` Ladislav Michl
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox