package/slang: Add option to enable/disable slsh
PATCH 1/1 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.
--- package/slang/Config.in | 7 +++++++ package/slang/slang.mk | 10 ++++++++++ 2 files changed, 17 insertions(+)
package/slang/Config.in +7 -0
@@ -5,3 +5,10 @@ config BR2_PACKAGE_SLANG Multi-platform console display library. http://www.jedsoft.org/slang/index.html + +config BR2_PACKAGE_SLANG_SLSH + bool "enable slsh" + default y + depends on BR2_PACKAGE_SLANG + help + Enable the S-lang interpreter
package/slang/slang.mk +10 -0
@@ -60,4 +60,14 @@ SLANG_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-static SLANG_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-static endif +ifneq ($(BR2_PACKAGE_SLANG_SLSH),y) +define SLANG_REMOVE_SLSH + rm -rf $(TARGET_DIR)/etc/slsh.rc \ + $(TARGET_DIR)/usr/share/slsh \ + $(TARGET_DIR)/usr/bin/slsh +endef +endif + +SLANG_POST_INSTALL_TARGET_HOOKS += SLANG_REMOVE_SLSH + $(eval $(autotools-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Florian,
(Hope you're doing well!)
Quoted 5 lines · On Tue, 20 Dec 2022 12:08:05 -0800 Florian Fainelli <[email protected]>…
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 <[email protected]>
I've applied to master, with some small changes, see below.
package/slang/Config.in config BR2_PACKAGE_SLANG · line 11
Quoted 12 lines
package/slang/Config.in +4
-0@@ -5,3 +5,10 @@ config BR2_PACKAGE_SLANG Multi-platform console display library. http://www.jedsoft.org/slang/index.html + +config BR2_PACKAGE_SLANG_SLSH + bool "enable slsh" + default y
I dropped this "default y". I know you added it to preserve existing behavior, but we also try in Buildroot to aim for minimalism. Since I believe most people who had slang enabled needed only the shared library, it makes sense to have slsh disabled by default. We'll see if some users complain about this.
package/slang/Config.in config BR2_PACKAGE_SLANG · line 12
Quoted 1 line
package/slang/Config.in +1
-0+ depends on BR2_PACKAGE_SLANG
Changed to a if ... endif block.
package/slang/Config.in config BR2_PACKAGE_SLANG · line 13
Quoted 1 line
package/slang/Config.in +1
-0+ifneq ($(BR2_PACKAGE_SLANG_SLSH),y)
Changed to positive logic:
ifeq ($(BR2_PACKAGE_SLANG_SLSH),)
package/slang/Config.in config BR2_PACKAGE_SLANG
Quoted 8 lines
package/slang/Config.in +8
-0+define SLANG_REMOVE_SLSH + rm -rf $(TARGET_DIR)/etc/slsh.rc \ + $(TARGET_DIR)/usr/share/slsh \ + $(TARGET_DIR)/usr/bin/slsh +endef +endif + +SLANG_POST_INSTALL_TARGET_HOOKS += SLANG_REMOVE_SLSH
Hook registration moved inside the ifeq ... endif block.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot