From e2468404c76e5d56d14f7e2afea8e2641f036e30 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 20 Dec 2022 12:08:05 -0800 Subject: [PATCH] package/slang: add option to enable/disable slsh The S-lang shell is currently installed by default but most packages are typically interested in the shared libraries only. Add a configuration option to disable the slsh program and its supporting files. Signed-off-by: Florian Fainelli Signed-off-by: Thomas Petazzoni --- package/slang/Config.in | 9 +++++++++ package/slang/slang.mk | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/package/slang/Config.in b/package/slang/Config.in index a500ff5b7d..0b2c987f73 100644 --- a/package/slang/Config.in +++ b/package/slang/Config.in @@ -5,3 +5,12 @@ config BR2_PACKAGE_SLANG Multi-platform console display library. http://www.jedsoft.org/slang/index.html + +if BR2_PACKAGE_SLANG + +config BR2_PACKAGE_SLANG_SLSH + bool "enable slsh" + help + Enable the S-lang interpreter + +endif diff --git a/package/slang/slang.mk b/package/slang/slang.mk index e0f5968b46..2b3cbdf27a 100644 --- a/package/slang/slang.mk +++ b/package/slang/slang.mk @@ -60,4 +60,13 @@ SLANG_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-static SLANG_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-static endif +ifeq ($(BR2_PACKAGE_SLANG_SLSH),) +define SLANG_REMOVE_SLSH + rm -rf $(TARGET_DIR)/etc/slsh.rc \ + $(TARGET_DIR)/usr/share/slsh \ + $(TARGET_DIR)/usr/bin/slsh +endef +SLANG_POST_INSTALL_TARGET_HOOKS += SLANG_REMOVE_SLSH +endif + $(eval $(autotools-package))