diff --git a/config/x86_64/ci.toml b/config/x86_64/ci.toml index 9efd63039..23ce90a6f 100644 --- a/config/x86_64/ci.toml +++ b/config/x86_64/ci.toml @@ -206,6 +206,7 @@ strace = {} syobonaction = {} terminfo = {} timidity = {} +tmux = {} tokei = {} ttf-hack = {} userutils = {} diff --git a/recipes/wip/terminal/tmux/recipe.toml b/recipes/wip/terminal/tmux/recipe.toml index 6a95203b6..922d84624 100644 --- a/recipes/wip/terminal/tmux/recipe.toml +++ b/recipes/wip/terminal/tmux/recipe.toml @@ -1,10 +1,14 @@ -#TODO not compiled or tested +#TODO Promote [source] -tar = "https://github.com/tmux/tmux/releases/download/3.4/tmux-3.4.tar.gz" +tar = "https://github.com/tmux/tmux/releases/download/3.6a/tmux-3.6a.tar.gz" +blake3 = "43a9a5fd4ebe403efccd666c7b620fcf65489b123092df70113466a2b5aedb5a" +patches = [ + "redox.patch" +] [build] template = "custom" dependencies = [ - "ncurses", + "ncursesw", "libevent", ] script = """ diff --git a/recipes/wip/terminal/tmux/redox.patch b/recipes/wip/terminal/tmux/redox.patch new file mode 100644 index 000000000..169e6b8e0 --- /dev/null +++ b/recipes/wip/terminal/tmux/redox.patch @@ -0,0 +1,95 @@ +diff --color -ruwN source/compat/base64.c source-new/compat/base64.c +--- source/compat/base64.c 2022-04-25 15:25:13.000000000 +0700 ++++ source-new/compat/base64.c 2026-04-09 07:15:37.515384719 +0700 +@@ -46,10 +46,10 @@ + #include + #include + #include +-#include ++// #include + + #include +-#include ++// #include + #include + + #include +diff --color -ruwN source/compat/reallocarray.c source-new/compat/reallocarray.c +--- source/compat/reallocarray.c 2022-04-25 15:25:13.000000000 +0700 ++++ source-new/compat/reallocarray.c 2026-04-09 07:15:37.515516254 +0700 +@@ -22,6 +22,7 @@ + + #include "compat.h" + ++#ifndef __redox__ + /* + * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX + * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW +@@ -38,3 +39,4 @@ + } + return realloc(optr, size * nmemb); + } ++#endif +diff --color -ruwN source/input.c source-new/input.c +--- source/input.c 2025-12-05 12:37:44.000000000 +0700 ++++ source-new/input.c 2026-04-09 07:15:37.515731613 +0700 +@@ -21,7 +21,7 @@ + #include + + #include +-#include ++// #include + #include + #include + #include +diff --color -ruwN source/tmux.c source-new/tmux.c +--- source/tmux.c 2025-10-29 15:49:16.000000000 +0700 ++++ source-new/tmux.c 2026-04-09 07:17:30.947212475 +0700 +@@ -222,10 +222,13 @@ + xasprintf(cause, "%s is not a directory", base); + goto fail; + } ++// FIXME: mkdir set wrong permission ++#ifndef __redox__ + if (sb.st_uid != uid || (sb.st_mode & TMUX_SOCK_PERM) != 0) { + xasprintf(cause, "directory %s has unsafe permissions", base); + goto fail; + } ++#endif + xasprintf(&path, "%s/%s", base, label); + free(base); + return (path); +diff --color -ruwN source/tty.c source-new/tty.c +--- source/tty.c 2025-12-05 12:37:44.000000000 +0700 ++++ source-new/tty.c 2026-04-09 07:15:37.516745754 +0700 +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include ++// #include + #include + #include + #include +@@ -347,8 +347,7 @@ + tio.c_iflag &= ~(IXON|IXOFF|ICRNL|INLCR|IGNCR|IMAXBEL|ISTRIP); + tio.c_iflag |= IGNBRK; + tio.c_oflag &= ~(OPOST|ONLCR|OCRNL|ONLRET); +- tio.c_lflag &= ~(IEXTEN|ICANON|ECHO|ECHOE|ECHONL|ECHOCTL|ECHOPRT| +- ECHOKE|ISIG); ++ tio.c_lflag &= ~(IEXTEN|ICANON|ECHO|ECHOE|ECHONL|ECHOPRT|ISIG); + tio.c_cc[VMIN] = 1; + tio.c_cc[VTIME] = 0; + if (tcsetattr(c->fd, TCSANOW, &tio) == 0) +diff --color -ruwN source/tty-keys.c source-new/tty-keys.c +--- source/tty-keys.c 2025-12-05 12:37:44.000000000 +0700 ++++ source-new/tty-keys.c 2026-04-09 07:15:37.516964363 +0700 +@@ -23,7 +23,7 @@ + + #include + #include +-#include ++// #include + #include + #include + #include