FreeBSD Bugzilla – Attachment 215536 Details for
Bug 247248
editors/emacs: fix 24-bit colors in text mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v1
bug247248.diff (text/plain), 2.48 KB, created by
Jan Beich
on 2020-06-14 08:16:18 UTC
(
hide
)
Description:
v1
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2020-06-14 08:16:18 UTC
Size:
2.48 KB
patch
obsolete
>From 28f3e760befb4f98df65245d985c383f3b3b34ae Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Sun, 14 Jun 2020 07:22:08 +0000 >Subject: [PATCH] editors/emacs: backport 24-bit color fix for tty mode > >FreeBSD base libncurses is stuck with termcap(5) but setb24/setf24 >capabilities can only be expressed via terminfo(5). Work around via >environ(7) variable that some terminal emulators define by default. > >PR: 247248 >Approved by: ? >--- > editors/emacs/Makefile | 2 +- > editors/emacs/files/patch-tty-rgb | 31 +++++++++++++++++++++++++++++++ > 2 files changed, 32 insertions(+), 1 deletion(-) > create mode 100644 editors/emacs/files/patch-tty-rgb > >diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile >index 37df41b48c7f..57ea6cda40eb 100644 >--- a/editors/emacs/Makefile >+++ b/editors/emacs/Makefile >@@ -3,7 +3,7 @@ > > PORTNAME= emacs > DISTVERSION= 26.3 >-PORTREVISION= 4 >+PORTREVISION= 5 > PORTEPOCH= 3 > CATEGORIES= editors > MASTER_SITES= GNU >diff --git a/editors/emacs/files/patch-tty-rgb b/editors/emacs/files/patch-tty-rgb >new file mode 100644 >index 000000000000..66c535ac4301 >--- /dev/null >+++ b/editors/emacs/files/patch-tty-rgb >@@ -0,0 +1,31 @@ >+Add RGB fallback if environment has COLORTERM=truecolor >+http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41846 >+ >+--- doc/misc/efaq.texi.orig 2019-01-07 14:26:06 UTC >++++ doc/misc/efaq.texi >+@@ -1603,6 +1603,9 @@ Currently there's no standard way to determine whether >+ supports direct color mode. If such standard arises later on, support >+ for @samp{setb24} and @samp{setf24} may be removed. >+ >++If Terminfo database is not available 24-bit direct color mode can >++still be enabled by defining @env{COLORTERM} to @samp{truecolor}. >++ >+ @node Debugging a customization file >+ @section How do I debug a @file{.emacs} file? >+ @cindex Debugging @file{.emacs} file >+--- src/term.c.orig 2019-01-07 14:26:07 UTC >++++ src/term.c >+@@ -4157,6 +4157,13 @@ use the Bourne shell command 'TERM=...; export TERM' ( >+ tty->TS_set_background = bg; >+ tty->TN_max_colors = 16777216; >+ } >++ /* Fall back to xterm+direct (semicolon version) if requested by COLORTERM */ >++ else if ((bg = getenv("COLORTERM")) != NULL && !strcasecmp(bg, "truecolor")) >++ { >++ tty->TS_set_foreground = "\033[%?%p1%{8}%<%t3%p1%d%e38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m"; >++ tty->TS_set_background = "\033[%?%p1%{8}%<%t4%p1%d%e48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%d%;m"; >++ tty->TN_max_colors = 16777216; >++ } >+ } >+ #endif >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 247248
:
215536
|
215806
|
215807