tmux: Update from 2.1 to 2.2
authorFredrik Fornwall <fredrik@fornwall.net>
Mon, 11 Apr 2016 11:25:59 +0000 (07:25 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 11 Apr 2016 11:25:59 +0000 (07:25 -0400)
packages/tmux/build.sh
packages/tmux/compat-imsg-buffer.c.patch [moved from packages/tmux/tmux.patch with 100% similarity]
packages/tmux/custom_shell.patch [deleted file]
packages/tmux/session.c.patch [new file with mode: 0644]
packages/tmux/tmux.c.patch [new file with mode: 0644]
packages/tmux/tmux.conf
packages/tmux/tmux.h.patch [new file with mode: 0644]
packages/tmux/tmux_c.patch [deleted file]
packages/tmux/tmux_h.patch [deleted file]

index 8b61eb1..4f58d40 100755 (executable)
@@ -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/custom_shell.patch b/packages/tmux/custom_shell.patch
deleted file mode 100644 (file)
index 6aca17f..0000000
+++ /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 <stdlib.h>
- #include <unistd.h>
- #include <time.h>
-+#include <sys/stat.h>
- #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 (file)
index 0000000..bda05ea
--- /dev/null
@@ -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 <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <pwd.h>
+ #include <time.h>
+ #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 (file)
index 0000000..a7f8a7a
--- /dev/null
@@ -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 <event.h>
+ #include <fcntl.h>
+ #include <getopt.h>
++#ifndef __ANDROID__
+ #include <langinfo.h>
++#endif
+ #include <locale.h>
+ #include <pwd.h>
+ #include <stdlib.h>
+@@ -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, "");
index 4ec5976..207e5b5 100644 (file)
@@ -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 (file)
index 0000000..0c06784
--- /dev/null
@@ -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 (file)
index 7f34bf6..0000000
+++ /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 (file)
index edcc83a..0000000
+++ /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)))