[Buildroot] [PATCH 2/2] package/gpsd: add GPSD_PYTHON config option

Olivier Dautricourt olivier.dautricourt at orolia.com
Mon Aug 17 13:23:36 UTC 2020


The scons script will install the gps library in the target python3
directory, as well as useful tools like ubxtool.

Signed-off-by: Olivier Dautricourt <olivier.dautricourt at orolia.com>
---
 package/gpsd/Config.in | 5 +++++
 package/gpsd/gpsd.mk   | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in
index 5dd57c34b8..39054098ba 100644
--- a/package/gpsd/Config.in
+++ b/package/gpsd/Config.in
@@ -229,4 +229,9 @@ config BR2_PACKAGE_GPSD_UBX
 	help
 	  uBlox UBX binary support
 
+config BR2_PACKAGE_GPSD_PYTHON
+	bool "Python library"
+	help
+	  gps Python library
+
 endif
diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index 62c4c611c3..d2e5d57ca8 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,12 @@ endif
 ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y)
 GPSD_SCONS_OPTS += max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE)
 endif
+ifeq ($(BR2_PACKAGE_GPSD_PYTHON), y)
+GPSD_SCONS_OPTS += python=yes
+GPSD_SCONS_OPTS += python_libdir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/
+else
+GPSD_SCONS_OPTS += python=no
+endif
 
 GPSD_SCONS_ENV += \
 	LDFLAGS="$(GPSD_LDFLAGS)" \
-- 
2.25.1




More information about the buildroot mailing list