Message ID | 20201101114712.1696943-3-geomatsi@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | gpsd: update version and add python support | expand |
Sergey, All, On 2020-11-01 14:47 +0300, Sergey Matyukevich spake thusly: > Add option that enables gpsd python support including modules, tools, > and gpsfake test harness. If python is enabled then install python > modules unconditionally. Note that gpsd python modules run compatibly > under Python 2 and 3.x for x >= 2. So enable gpsd python support when > any Python version is enabled in board configuration. If no Python is > enabled, but gpsd Python support is requested, then select Python 3. > > Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> > --- > package/gpsd/Config.in | 10 ++++++++++ > package/gpsd/gpsd.mk | 13 ++++++++++++- > 2 files changed, 22 insertions(+), 1 deletion(-) > > diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in > index 5dd57c34b8..e63c3d66b9 100644 > --- a/package/gpsd/Config.in > +++ b/package/gpsd/Config.in > @@ -79,6 +79,16 @@ config BR2_PACKAGE_GPSD_MAX_DEV_VALUE > config BR2_PACKAGE_GPSD_SQUELCH > bool "squelch gpsd_report and gpsd_hexdump to save cpu" > > +config BR2_PACKAGE_GPSD_PYTHON > + bool "build Python support and modules" > + depends on BR2_USE_WCHAR # python > + select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON > + help > + Python libraries and tools for the gpsd service daemon including gpsfake test harness. $ make check-package package/gpsd/Config.in:87: help text: <tab><2 spaces><62 chars> (http://nightly.buildroot.org/#writing-rules-config-in) > +comment "GPSD python support not available with toolchain w/o wide characters support" > + depends on !BR2_USE_WCHAR As per the manual https://buildroot.org/downloads/manual/manual.html#dependencies-target-toolchain-options gpsd needs a toolchain w/ wchar > comment "Protocols" > > config BR2_PACKAGE_GPSD_AIVDM > diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk > index 62c4c611c3..8934d525e5 100644 > --- a/package/gpsd/gpsd.mk > +++ b/package/gpsd/gpsd.mk > @@ -23,7 +23,6 @@ GPSD_SCONS_OPTS = \ > prefix=/usr \ > sysroot=$(STAGING_DIR) \ > strip=no \ > - python=no \ > qt=no \ > systemd=$(if $(BR2_INIT_SYSTEMD),yes,no) > > @@ -186,6 +185,18 @@ endif > ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y) > GPSD_SCONS_OPTS += max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE) > endif > +ifeq ($(BR2_PACKAGE_PYTHON3),y) > + GPSD_SCONS_OPTS += \ > + python=yes \ > + python_libdir="/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages" > +else ifeq ($(BR2_PACKAGE_PYTHON),y) > + GPSD_SCONS_OPTS += \ > + python=yes \ > + python_libdir="/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" > +else > + GPSD_SCONS_OPTS += \ > + python=no $ make check-package package/gpsd/gpsd.mk:191: unexpected indent with tabs package/gpsd/gpsd.mk:195: unexpected indent with tabs package/gpsd/gpsd.mk:199: unexpected indent with tabs I've fixed those three, and Applied to master, thanks. Regards, Yann E. MORIN. > +endif > > GPSD_SCONS_ENV += \ > LDFLAGS="$(GPSD_LDFLAGS)" \ > -- > 2.29.1 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in index 5dd57c34b8..e63c3d66b9 100644 --- a/package/gpsd/Config.in +++ b/package/gpsd/Config.in @@ -79,6 +79,16 @@ config BR2_PACKAGE_GPSD_MAX_DEV_VALUE config BR2_PACKAGE_GPSD_SQUELCH bool "squelch gpsd_report and gpsd_hexdump to save cpu" +config BR2_PACKAGE_GPSD_PYTHON + bool "build Python support and modules" + depends on BR2_USE_WCHAR # python + select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON + help + Python libraries and tools for the gpsd service daemon including gpsfake test harness. + +comment "GPSD python support not available with toolchain w/o wide characters support" + depends on !BR2_USE_WCHAR + comment "Protocols" config BR2_PACKAGE_GPSD_AIVDM diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk index 62c4c611c3..8934d525e5 100644 --- a/package/gpsd/gpsd.mk +++ b/package/gpsd/gpsd.mk @@ -23,7 +23,6 @@ GPSD_SCONS_OPTS = \ prefix=/usr \ sysroot=$(STAGING_DIR) \ strip=no \ - python=no \ qt=no \ systemd=$(if $(BR2_INIT_SYSTEMD),yes,no) @@ -186,6 +185,18 @@ endif ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y) GPSD_SCONS_OPTS += max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE) endif +ifeq ($(BR2_PACKAGE_PYTHON3),y) + GPSD_SCONS_OPTS += \ + python=yes \ + python_libdir="/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages" +else ifeq ($(BR2_PACKAGE_PYTHON),y) + GPSD_SCONS_OPTS += \ + python=yes \ + python_libdir="/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" +else + GPSD_SCONS_OPTS += \ + python=no +endif GPSD_SCONS_ENV += \ LDFLAGS="$(GPSD_LDFLAGS)" \
Add option that enables gpsd python support including modules, tools, and gpsfake test harness. If python is enabled then install python modules unconditionally. Note that gpsd python modules run compatibly under Python 2 and 3.x for x >= 2. So enable gpsd python support when any Python version is enabled in board configuration. If no Python is enabled, but gpsd Python support is requested, then select Python 3. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> --- package/gpsd/Config.in | 10 ++++++++++ package/gpsd/gpsd.mk | 13 ++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-)