All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/slang: Add option to enable/disable slsh
@ 2022-12-20 20:08 Florian Fainelli
  2022-12-28 19:52 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2022-12-20 20:08 UTC (permalink / raw)
  To: buildroot
  Cc: bernd.kuhls, chrismcc, Florian Fainelli, mmayer, yann.morin.1998,
	thomas.petazzoni, fontaine.fabrice

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 <f.fainelli@gmail.com>
---
 package/slang/Config.in |  7 +++++++
 package/slang/slang.mk  | 10 ++++++++++
 2 files changed, 17 insertions(+)

diff --git a/package/slang/Config.in b/package/slang/Config.in
index a500ff5b7d75..b09b0cd8fc84 100644
--- a/package/slang/Config.in
+++ b/package/slang/Config.in
@@ -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
diff --git a/package/slang/slang.mk b/package/slang/slang.mk
index e0f5968b46d0..5fec5512a29f 100644
--- a/package/slang/slang.mk
+++ b/package/slang/slang.mk
@@ -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))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH] package/slang: Add option to enable/disable slsh
  2022-12-20 20:08 [Buildroot] [PATCH] package/slang: Add option to enable/disable slsh Florian Fainelli
@ 2022-12-28 19:52 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-28 19:52 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: bernd.kuhls, chrismcc, yann.morin.1998, mmayer, buildroot,
	fontaine.fabrice

Hello Florian,

(Hope you're doing well!)

On Tue, 20 Dec 2022 12:08:05 -0800
Florian Fainelli <f.fainelli@gmail.com> wrote:

> 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 <f.fainelli@gmail.com>

I've applied to master, with some small changes, see below.

> diff --git a/package/slang/Config.in b/package/slang/Config.in
> index a500ff5b7d75..b09b0cd8fc84 100644
> --- a/package/slang/Config.in
> +++ b/package/slang/Config.in
> @@ -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.

> +	depends on BR2_PACKAGE_SLANG

Changed to a if ... endif block.

> +ifneq ($(BR2_PACKAGE_SLANG_SLSH),y)

Changed to positive logic:

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
> +endif
> +
> +SLANG_POST_INSTALL_TARGET_HOOKS += SLANG_REMOVE_SLSH

Hook registration moved inside the ifeq ... endif block.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-28 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-20 20:08 [Buildroot] [PATCH] package/slang: Add option to enable/disable slsh Florian Fainelli
2022-12-28 19:52 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.