diff mbox

[1/1] screen: add support for 256 colors

Message ID 1418138819-19772-1-git-send-email-tbultel@free.fr
State Changes Requested
Headers show

Commit Message

Thierry Bultel Dec. 9, 2014, 3:26 p.m. UTC
Signed-off-by: Thierry Bultel <tbultel@free.fr>
---
 package/screen/Config.in | 7 +++++++
 package/screen/screen.mk | 8 +++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

Comments

Vicente Olivert Riera Dec. 9, 2014, 3:39 p.m. UTC | #1
Dear Thierry Bultel,

On 12/09/2014 03:26 PM, Thierry Bultel wrote:

>  define SCREEN_INSTALL_SCREENRC
> -	$(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc
> +	if [ ! -f $(TARGET_DIR)/etc/screenrc ]; then \
> +		$(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc; \
> +	fi
>  endef
>  
>  SCREEN_POST_INSTALL_TARGET_HOOKS += SCREEN_INSTALL_SCREENRC

This part is not related with adding support for 256 colors, so, why
don't you send a separate patch for it? Or at least, state in your
commit message you are fixing a little issue with the 'screenrc' file
installation. But I would say that a separate patch would be better.

Best regards,
Baruch Siach Dec. 9, 2014, 3:57 p.m. UTC | #2
Hi Vicente, Thierry,

On Tue, Dec 09, 2014 at 03:39:01PM +0000, Vicente Olivert Riera wrote:
> On 12/09/2014 03:26 PM, Thierry Bultel wrote:
> 
> >  define SCREEN_INSTALL_SCREENRC
> > -	$(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc
> > +	if [ ! -f $(TARGET_DIR)/etc/screenrc ]; then \
> > +		$(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc; \
> > +	fi
> >  endef
> >  
> >  SCREEN_POST_INSTALL_TARGET_HOOKS += SCREEN_INSTALL_SCREENRC
> 
> This part is not related with adding support for 256 colors, so, why
> don't you send a separate patch for it? Or at least, state in your
> commit message you are fixing a little issue with the 'screenrc' file
> installation. But I would say that a separate patch would be better.

I don't think the change in this separate patch is desired. We have just 
recently (commit 963bbf266bfebc [screen: install configuration file 
unconditionally]) switched to unconditional install of the config file.

baruch
Vicente Olivert Riera Dec. 10, 2014, 5:37 p.m. UTC | #3
Dear Baruch Siach, Thierry Bultel,

On 12/09/2014 03:57 PM, Baruch Siach wrote:
> I don't think the change in this separate patch is desired. We have just 
> recently (commit 963bbf266bfebc [screen: install configuration file 
> unconditionally]) switched to unconditional install of the config file.

That's right. It's trying to revert this commit:

http://git.buildroot.net/buildroot/commit/?id=963bbf266bfebc240888cf8bce502a2fadb38c48

Please don't do that. Remove that from your patch, send a new version
and mark this one as 'superseded' in patchwork.

Thanks,
diff mbox

Patch

diff --git a/package/screen/Config.in b/package/screen/Config.in
index b5876e8..bae4be3 100644
--- a/package/screen/Config.in
+++ b/package/screen/Config.in
@@ -11,3 +11,10 @@  config BR2_PACKAGE_SCREEN
 	  and support for multiple character sets).
 
 	  http://www.gnu.org/software/screen/
+
+if BR2_PACKAGE_SCREEN
+config BR2_PACKAGE_SCREEN_COLORS256
+	bool "screen 256 colors"
+	help
+	  enable support for 256 colors
+endif
diff --git a/package/screen/screen.mk b/package/screen/screen.mk
index 827e776..8056c31 100644
--- a/package/screen/screen.mk
+++ b/package/screen/screen.mk
@@ -14,8 +14,14 @@  SCREEN_CONF_ENV = CFLAGS="$(TARGET_CFLAGS)"
 SCREEN_MAKE = $(MAKE1)
 SCREEN_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) SCREEN=screen install_bin
 
+ifeq ($(BR2_PACKAGE_SCREEN_COLORS256),y)
+SCREEN_CONF_OPTS += --enable-colors256
+endif
+
 define SCREEN_INSTALL_SCREENRC
-	$(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc
+	if [ ! -f $(TARGET_DIR)/etc/screenrc ]; then \
+		$(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc; \
+	fi
 endef
 
 SCREEN_POST_INSTALL_TARGET_HOOKS += SCREEN_INSTALL_SCREENRC