From fde658151c925a87d71bebc39bbc41c1bac6ef2c Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 11 Apr 2016 07:25:59 -0400 Subject: [PATCH] tmux: Update from 2.1 to 2.2 --- packages/tmux/build.sh | 3 +-- ...{tmux.patch => compat-imsg-buffer.c.patch} | 0 packages/tmux/custom_shell.patch | 24 ----------------- packages/tmux/session.c.patch | 20 ++++++++++++++ packages/tmux/tmux.c.patch | 26 +++++++++++++++++++ packages/tmux/tmux.conf | 5 ---- packages/tmux/tmux.h.patch | 12 +++++++++ packages/tmux/tmux_c.patch | 12 --------- packages/tmux/tmux_h.patch | 21 --------------- 9 files changed, 59 insertions(+), 64 deletions(-) rename packages/tmux/{tmux.patch => compat-imsg-buffer.c.patch} (100%) delete mode 100644 packages/tmux/custom_shell.patch create mode 100644 packages/tmux/session.c.patch create mode 100644 packages/tmux/tmux.c.patch create mode 100644 packages/tmux/tmux.h.patch delete mode 100644 packages/tmux/tmux_c.patch delete mode 100644 packages/tmux/tmux_h.patch diff --git a/packages/tmux/build.sh b/packages/tmux/build.sh index 8b61eb1a4..4f58d4078 100755 --- a/packages/tmux/build.sh +++ b/packages/tmux/build.sh @@ -1,8 +1,7 @@ TERMUX_PKG_HOMEPAGE=http://tmux.github.io/ TERMUX_PKG_DESCRIPTION="Terminal multiplexer implementing switching between several programs in one terminal, detaching them and reattaching them to a different terminal" TERMUX_PKG_DEPENDS="ncurses, libevent, libutil" -TERMUX_PKG_VERSION=2.1 -TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_VERSION=2.2 TERMUX_PKG_SRCURL=https://github.com/tmux/tmux/releases/download/${TERMUX_PKG_VERSION}/tmux-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_BUILD_IN_SRC=yes diff --git a/packages/tmux/tmux.patch b/packages/tmux/compat-imsg-buffer.c.patch similarity index 100% rename from packages/tmux/tmux.patch rename to packages/tmux/compat-imsg-buffer.c.patch diff --git a/packages/tmux/custom_shell.patch b/packages/tmux/custom_shell.patch deleted file mode 100644 index 6aca17f67..000000000 --- a/packages/tmux/custom_shell.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -u -r ../tmux-1.8/session.c ./session.c ---- ../tmux-1.8/session.c 2013-03-26 20:22:31.000000000 +0100 -+++ ./session.c 2014-02-13 18:55:45.000000000 +0100 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - #include "tmux.h" - -@@ -245,8 +246,10 @@ - server_fill_environ(s, &env); - - shell = options_get_string(&s->options, "default-shell"); -- if (*shell == '\0' || areshell(shell)) -- shell = _PATH_BSHELL; -+ if (*shell == '\0' || areshell(shell)) { -+ struct stat st; -+ shell = (stat("@TERMUX_PREFIX@/home/.aterm/shell", &st) == 0) ? "@TERMUX_PREFIX@/home/.aterm/shell" : _PATH_BSHELL; -+ } - - hlimit = options_get_number(&s->options, "history-limit"); - w = window_create( diff --git a/packages/tmux/session.c.patch b/packages/tmux/session.c.patch new file mode 100644 index 000000000..bda05ea8b --- /dev/null +++ b/packages/tmux/session.c.patch @@ -0,0 +1,20 @@ +diff -u -r ../tmux-2.2/session.c ./session.c +--- ../tmux-2.2/session.c 2016-01-20 19:00:28.000000000 -0500 ++++ ./session.c 2016-04-11 05:28:53.669311770 -0400 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + + #include "tmux.h" +@@ -340,7 +341,7 @@ + + shell = options_get_string(s->options, "default-shell"); + if (*shell == '\0' || areshell(shell)) +- shell = _PATH_BSHELL; ++ shell = getpwuid(getuid())->pw_shell; + + hlimit = options_get_number(s->options, "history-limit"); + w = window_create(name, argc, argv, path, shell, cwd, env, s->tio, diff --git a/packages/tmux/tmux.c.patch b/packages/tmux/tmux.c.patch new file mode 100644 index 000000000..a7f8a7aab --- /dev/null +++ b/packages/tmux/tmux.c.patch @@ -0,0 +1,26 @@ +diff -u -r ../tmux-2.2/tmux.c ./tmux.c +--- ../tmux-2.2/tmux.c 2016-03-05 12:55:49.000000000 -0500 ++++ ./tmux.c 2016-04-11 04:36:26.594521819 -0400 +@@ -24,7 +24,9 @@ + #include + #include + #include ++#ifndef __ANDROID__ + #include ++#endif + #include + #include + #include +@@ -195,10 +197,12 @@ + if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL) { + if (setlocale(LC_CTYPE, "") == NULL) + errx(1, "invalid LC_ALL, LC_CTYPE or LANG"); ++#ifndef __ANDROID__ + s = nl_langinfo(CODESET); + if (strcasecmp(s, "UTF-8") != 0 && + strcasecmp(s, "UTF8") != 0) + errx(1, "need UTF-8 locale (LC_CTYPE) but have %s", s); ++#endif + } + + setlocale(LC_TIME, ""); diff --git a/packages/tmux/tmux.conf b/packages/tmux/tmux.conf index 4ec5976f6..207e5b591 100644 --- a/packages/tmux/tmux.conf +++ b/packages/tmux/tmux.conf @@ -1,7 +1,2 @@ set -g mouse on set -s escape-time 0 - -# Version 2.1 of tmux removed mouse wheel scrolling support by default, -# but these two lines from https://github.com/tmux/tmux/issues/145 add it back: -bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" -bind -n WheelDownPane select-pane -t= \; send-keys -M diff --git a/packages/tmux/tmux.h.patch b/packages/tmux/tmux.h.patch new file mode 100644 index 000000000..0c0678473 --- /dev/null +++ b/packages/tmux/tmux.h.patch @@ -0,0 +1,12 @@ +diff -u -r ../tmux-2.2/tmux.h ./tmux.h +--- ../tmux-2.2/tmux.h 2016-04-03 20:16:53.000000000 -0400 ++++ ./tmux.h 2016-04-11 04:38:13.276761966 -0400 +@@ -51,7 +51,7 @@ + struct tmuxproc; + + /* Default global configuration file. */ +-#define TMUX_CONF "/etc/tmux.conf" ++#define TMUX_CONF "@TERMUX_PREFIX@/etc/tmux.conf" + + /* + * Minimum layout cell size, NOT including separator line. The scroll region diff --git a/packages/tmux/tmux_c.patch b/packages/tmux/tmux_c.patch deleted file mode 100644 index 7f34bf60e..000000000 --- a/packages/tmux/tmux_c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../tmux-1.9a/tmux.c ./tmux.c ---- ../tmux-1.9a/tmux.c 2014-02-22 21:48:37.000000000 +0100 -+++ ./tmux.c 2014-02-24 08:56:45.000000000 +0100 -@@ -137,7 +137,7 @@ - else if ((s = getenv("TMPDIR")) != NULL && *s != '\0') - xsnprintf(base, sizeof base, "%s/tmux-%u", s, uid); - else -- xsnprintf(base, sizeof base, "%s/tmux-%u", _PATH_TMP, uid); -+ xsnprintf(base, sizeof base, "%s/tmux-%u", "@TERMUX_PREFIX@/tmp", uid); - - if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) - return (NULL); diff --git a/packages/tmux/tmux_h.patch b/packages/tmux/tmux_h.patch deleted file mode 100644 index edcc83a38..000000000 --- a/packages/tmux/tmux_h.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -u -r ../tmux-2.1/tmux.h ./tmux.h ---- ../tmux-2.1/tmux.h 2015-09-27 05:51:49.000000000 -0400 -+++ ./tmux.h 2015-10-19 17:33:45.737891900 -0400 -@@ -40,7 +40,7 @@ - extern char **environ; - - /* Default global configuration file. */ --#define TMUX_CONF "/etc/tmux.conf" -+#define TMUX_CONF "@TERMUX_PREFIX@/etc/tmux.conf" - - /* - * Minimum layout cell size, NOT including separator line. The scroll region -@@ -72,7 +72,7 @@ - #define fatalx(msg) log_fatalx("%s: %s", __func__, msg); - - /* Definition to shut gcc up about unused arguments. */ --#define unused __attribute__ ((unused)) -+#define unused - - /* Attribute to make gcc check printf-like arguments. */ - #define printflike(a, b) __attribute__ ((format (printf, a, b)))