Skip to contentSkip to conversation

package/collectd: depend on luainterpreter for lua support

PATCH New James Hilliard 1 participant 1 message May 25, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v4 3/3 package/collectd: depend on luainterpreter for lua support

Since collectd lua support is compatible with any luainterpreter implementation we should depend on BR2_PACKAGE_HAS_LUAINTERPRETER instead of unconditionally selecting BR2_PACKAGE_LUA.

---
Changes v3 -> v4:
- use luainterpreter virtual package for dependencies

---
 package/collectd/Config.in   | 5 ++++-
 package/collectd/collectd.mk | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
package/collectd/Config.in +4 -1
index 188be3c0fb..fc3ee804a2 100644
@@ -65,11 +65,14 @@ config BR2_PACKAGE_COLLECTD_LOGSTASH
 
 config BR2_PACKAGE_COLLECTD_LUA
 	bool "lua"
-	select BR2_PACKAGE_LUA
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  Embeds a Lua interpreter into collectd and provides an
 	  interface to collectd's plugin system.
 
+comment "lua needs a Lua interpreter"
+	depends on !BR2_PACKAGE_HAS_LUAINTERPRETER
+
 config BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL
 	bool "notify_email"
 	depends on !BR2_STATIC_LIBS # libesmtp
package/collectd/collectd.mk +1 -1
index 24cdad7e1b..6d084dbe42 100644
@@ -160,7 +160,7 @@ COLLECTD_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_COLLECTD_GRPC),grpc) \
 	$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \
 	$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \
-	$(if $(BR2_PACKAGE_COLLECTD_LUA),lua) \
+	$(if $(BR2_PACKAGE_COLLECTD_LUA),luainterpreter) \
 	$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
 	$(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \
 	$(if $(BR2_PACKAGE_COLLECTD_MQTT),mosquitto) \
Signature · 1 line
2.25.1