* [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors
@ 2014-12-09 10:58 Thierry Bultel
2014-12-09 12:21 ` Gustavo Zacarias
0 siblings, 1 reply; 6+ messages in thread
From: Thierry Bultel @ 2014-12-09 10:58 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thierry Bultel <tbultel@free.fr>
---
package/ncurses/Config.in | 7 +++++++
package/ncurses/ncurses.mk | 14 +++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/package/ncurses/Config.in b/package/ncurses/Config.in
index 44713f9..8d0a4b7 100644
--- a/package/ncurses/Config.in
+++ b/package/ncurses/Config.in
@@ -38,4 +38,11 @@ config BR2_PACKAGE_NCURSES_TARGET_PROGS
help
Include ncurses programs in target (clear, reset, tput, ...)
+config BR2_PACKAGE_NCURSES_EXT_COLORS
+ bool "ncurses extended colors"
+ select BR2_PACKAGE_NCURSES_WCHAR
+ depends on BR2_USE_WCHAR
+ help
+ compile for 256-color support
+
endif
diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
index e7bd967..262ac94 100644
--- a/package/ncurses/ncurses.mk
+++ b/package/ncurses/ncurses.mk
@@ -12,7 +12,7 @@ HOST_NCURSES_DEPENDENCIES =
NCURSES_PROGS = clear infocmp tabs tic toe tput tset
NCURSES_LICENSE = MIT with advertising clause
NCURSES_LICENSE_FILES = README
-NCURSES_CONFIG_SCRIPTS = ncurses$(NCURSES_LIB_SUFFIX)5-config
+NCURSES_CONFIG_SCRIPTS = ncurses$(NCURSES_LIB_SUFFIX)$(NCURSES_ABI_VERSION)-config
NCURSES_CONF_OPTS = \
$(if $(BR2_PREFER_STATIC_LIB),--without-shared,--with-shared) \
@@ -107,6 +107,17 @@ define NCURSES_INSTALL_TARGET_PROGS
endef
endif
+ifeq ($(BR2_PACKAGE_NCURSES_EXT_COLORS),y)
+NCURSES_CONF_OPTS += --enable-ext-colors
+NCURSES_ABI_VERSION = 6
+define NCURSES_INSTALL_TARGET_256_COLORS_TERMINFO
+ cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm+256color $(TARGET_DIR)/usr/share/terminfo/x
+ cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-256color $(TARGET_DIR)/usr/share/terminfo/x
+endef
+else
+NCURSES_ABI_VERSION = 5
+endif
+
define NCURSES_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/usr/lib
$(NCURSES_INSTALL_TARGET_LIBS)
@@ -117,6 +128,7 @@ define NCURSES_INSTALL_TARGET_CMDS
cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm $(TARGET_DIR)/usr/share/terminfo/x
cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-color $(TARGET_DIR)/usr/share/terminfo/x
cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-xfree86 $(TARGET_DIR)/usr/share/terminfo/x
+ $(NCURSES_INSTALL_TARGET_256_COLORS_TERMINFO)
mkdir -p $(TARGET_DIR)/usr/share/terminfo/v
cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt100 $(TARGET_DIR)/usr/share/terminfo/v
cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt102 $(TARGET_DIR)/usr/share/terminfo/v
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors
2014-12-09 10:58 [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors Thierry Bultel
@ 2014-12-09 12:21 ` Gustavo Zacarias
2014-12-09 14:48 ` Thierry Bultel
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo Zacarias @ 2014-12-09 12:21 UTC (permalink / raw)
To: buildroot
On 12/09/2014 07:58 AM, Thierry Bultel wrote:
> +config BR2_PACKAGE_NCURSES_EXT_COLORS
> + bool "ncurses extended colors"
> + select BR2_PACKAGE_NCURSES_WCHAR
> + depends on BR2_USE_WCHAR
> + help
> + compile for 256-color support
> +
Hi.
Do you know the size delta between this option enabled and disabled?
I'm asking because it might not be even worth an option.
Thanks.
Regards.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors
2014-12-09 12:21 ` Gustavo Zacarias
@ 2014-12-09 14:48 ` Thierry Bultel
2014-12-11 18:14 ` Yann E. MORIN
0 siblings, 1 reply; 6+ messages in thread
From: Thierry Bultel @ 2014-12-09 14:48 UTC (permalink / raw)
To: buildroot
Le 09/12/2014 13:21, Gustavo Zacarias a ?crit :
> On 12/09/2014 07:58 AM, Thierry Bultel wrote:
>
>> +config BR2_PACKAGE_NCURSES_EXT_COLORS
>> + bool "ncurses extended colors"
>> + select BR2_PACKAGE_NCURSES_WCHAR
>> + depends on BR2_USE_WCHAR
>> + help
>> + compile for 256-color support
>> +
>
> Hi.
> Do you know the size delta between this option enabled and disabled?
> I'm asking because it might not be even worth an option.
> Thanks.
> Regards.
>
Hi, the size delta is quite small:
256 colors:
-rwxr-xr-x 1 thierry thierry 210K d?c. 9 14:23
output/target/usr/lib/libncursesw.so.6.0
std colors:
-rwxr-xr-x 1 thierry thierry 202K d?c. 9 15:46
output/target/usr/lib/libncursesw.so.5.9
Thierry
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors
2014-12-09 14:48 ` Thierry Bultel
@ 2014-12-11 18:14 ` Yann E. MORIN
2014-12-12 22:43 ` Thierry Bultel
0 siblings, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2014-12-11 18:14 UTC (permalink / raw)
To: buildroot
Thierry, All,
On 2014-12-09 15:48 +0100, Thierry Bultel spake thusly:
> Le 09/12/2014 13:21, Gustavo Zacarias a ?crit :
> >On 12/09/2014 07:58 AM, Thierry Bultel wrote:
> >
> >>+config BR2_PACKAGE_NCURSES_EXT_COLORS
> >>+ bool "ncurses extended colors"
> >>+ select BR2_PACKAGE_NCURSES_WCHAR
> >>+ depends on BR2_USE_WCHAR
> >>+ help
> >>+ compile for 256-color support
> >>+
> >
> >Hi.
> >Do you know the size delta between this option enabled and disabled?
> >I'm asking because it might not be even worth an option.
> >Thanks.
> >Regards.
> >
>
> Hi, the size delta is quite small:
>
> 256 colors:
>
> -rwxr-xr-x 1 thierry thierry 210K d?c. 9 14:23
> output/target/usr/lib/libncursesw.so.6.0
>
> std colors:
>
> -rwxr-xr-x 1 thierry thierry 202K d?c. 9 15:46
> output/target/usr/lib/libncursesw.so.5.9
Then, I'd say we just enable it by default, since the size delta is
negligible (~4%).
There is only one case that would require that to be an option: if it
changes the API, and packages that do not expect it would break.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors
2014-12-11 18:14 ` Yann E. MORIN
@ 2014-12-12 22:43 ` Thierry Bultel
2014-12-12 22:46 ` Yann E. MORIN
0 siblings, 1 reply; 6+ messages in thread
From: Thierry Bultel @ 2014-12-12 22:43 UTC (permalink / raw)
To: buildroot
Le 11/12/2014 19:14, Yann E. MORIN a ?crit :
> Thierry, All,
>
> On 2014-12-09 15:48 +0100, Thierry Bultel spake thusly:
>> Le 09/12/2014 13:21, Gustavo Zacarias a ?crit :
>>> On 12/09/2014 07:58 AM, Thierry Bultel wrote:
>>>
>>>> +config BR2_PACKAGE_NCURSES_EXT_COLORS
>>>> + bool "ncurses extended colors"
>>>> + select BR2_PACKAGE_NCURSES_WCHAR
>>>> + depends on BR2_USE_WCHAR
>>>> + help
>>>> + compile for 256-color support
>>>> +
>>>
>>> Hi.
>>> Do you know the size delta between this option enabled and disabled?
>>> I'm asking because it might not be even worth an option.
>>> Thanks.
>>> Regards.
>>>
>>
>> Hi, the size delta is quite small:
>>
>> 256 colors:
>>
>> -rwxr-xr-x 1 thierry thierry 210K d?c. 9 14:23
>> output/target/usr/lib/libncursesw.so.6.0
>>
>> std colors:
>>
>> -rwxr-xr-x 1 thierry thierry 202K d?c. 9 15:46
>> output/target/usr/lib/libncursesw.so.5.9
>
> Then, I'd say we just enable it by default, since the size delta is
> negligible (~4%).
>
Shall I then repost the patch with 256 colors enabled by default ?
> There is only one case that would require that to be an option: if it
> changes the API, and packages that do not expect it would break.
>
> Regards,
> Yann E. MORIN.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors
2014-12-12 22:43 ` Thierry Bultel
@ 2014-12-12 22:46 ` Yann E. MORIN
0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2014-12-12 22:46 UTC (permalink / raw)
To: buildroot
Thierry, All,
On 2014-12-12 23:43 +0100, Thierry Bultel spake thusly:
> Le 11/12/2014 19:14, Yann E. MORIN a ?crit :
> >On 2014-12-09 15:48 +0100, Thierry Bultel spake thusly:
> >>Le 09/12/2014 13:21, Gustavo Zacarias a ?crit :
> >>>On 12/09/2014 07:58 AM, Thierry Bultel wrote:
> >>>
> >>>>+config BR2_PACKAGE_NCURSES_EXT_COLORS
> >>>>+ bool "ncurses extended colors"
> >>>>+ select BR2_PACKAGE_NCURSES_WCHAR
> >>>>+ depends on BR2_USE_WCHAR
> >>>>+ help
> >>>>+ compile for 256-color support
> >>>>+
> >>>
> >>>Hi.
> >>>Do you know the size delta between this option enabled and disabled?
> >>>I'm asking because it might not be even worth an option.
> >>>Thanks.
> >>>Regards.
> >>>
> >>
> >>Hi, the size delta is quite small:
> >>
> >>256 colors:
> >>
> >>-rwxr-xr-x 1 thierry thierry 210K d?c. 9 14:23
> >>output/target/usr/lib/libncursesw.so.6.0
> >>
> >>std colors:
> >>
> >>-rwxr-xr-x 1 thierry thierry 202K d?c. 9 15:46
> >>output/target/usr/lib/libncursesw.so.5.9
> >
> >Then, I'd say we just enable it by default, since the size delta is
> >negligible (~4%).
> >
>
> Shall I then repost the patch with 256 colors enabled by default ?
Yes. Just repeat in the commit log the size values you observed as a
reason not to make it an option.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-12 22:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 10:58 [Buildroot] [PATCH 1/1] ncurses: add support for 256 colors Thierry Bultel
2014-12-09 12:21 ` Gustavo Zacarias
2014-12-09 14:48 ` Thierry Bultel
2014-12-11 18:14 ` Yann E. MORIN
2014-12-12 22:43 ` Thierry Bultel
2014-12-12 22:46 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox