Browse Source

tmux: import from packages, update to latest

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Maxim Storchak 10 years ago
parent
commit
0baba8b1f5

+ 43
- 0
utils/tmux/Makefile View File

@@ -0,0 +1,43 @@
1
+#
2
+# Copyright (C) 2009-2012 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=tmux
11
+PKG_VERSION:=1.9a
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=@SF/tmux
16
+PKG_MD5SUM:=b07601711f96f1d260b390513b509a2d
17
+
18
+PKG_INSTALL:=1
19
+
20
+include $(INCLUDE_DIR)/package.mk
21
+
22
+define Package/tmux
23
+  SECTION:=utils
24
+  CATEGORY:=Utilities
25
+  TITLE:=Terminal multiplexer
26
+  DEPENDS:=+libncurses +libevent2 +libpthread +librt
27
+  URL:=http://tmux.sourceforge.net/
28
+endef
29
+
30
+define Package/tmux/description
31
+  tmux is a modern, BSD-licensed alternative to GNU screen.
32
+endef
33
+
34
+MAKE_FLAGS += \
35
+	PREFIX="/usr" \
36
+	PLATFORM="linux"
37
+
38
+define Package/tmux/install
39
+	$(INSTALL_DIR) $(1)/usr/bin
40
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tmux $(1)/usr/bin/
41
+endef
42
+
43
+$(eval $(call BuildPackage,tmux))

+ 15
- 0
utils/tmux/patches/100-b64_ntop-conflict_compath_h.patch View File

@@ -0,0 +1,15 @@
1
+diff --git a/compat.h b/compat.h
2
+index 65d6ec7..7fc3aa7 100644
3
+--- a/compat.h
4
++++ b/compat.h
5
+@@ -219,7 +219,9 @@ int	 	 daemon(int, int);
6
+ #ifndef HAVE_B64_NTOP
7
+ /* b64_ntop.c */
8
+ #undef b64_ntop /* for Cygwin */
9
+-int		 b64_ntop(const char *, size_t, char *, size_t);
10
++int		 local_b64_ntop(const char *, size_t, char *, size_t);
11
++#else
12
++#define local_b64_ntop b64_ntop
13
+ #endif
14
+ 
15
+ #ifndef HAVE_FORKPTY

+ 13
- 0
utils/tmux/patches/101-b64_ntop-conflict_compat_b64_ntop_c.patch View File

@@ -0,0 +1,13 @@
1
+diff --git a/compat/b64_ntop.c b/compat/b64_ntop.c
2
+index 2b4dc2d..a1314ca 100644
3
+--- a/compat/b64_ntop.c
4
++++ b/compat/b64_ntop.c
5
+@@ -122,7 +122,7 @@ static const char Pad64 = '=';
6
+    */
7
+ 
8
+ int
9
+-b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
10
++local_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) {
11
+ 	size_t datalength = 0;
12
+ 	uint8_t input[3];
13
+ 	uint8_t output[4];

+ 13
- 0
utils/tmux/patches/102-b64_ntop-conflict_tty_c.patch View File

@@ -0,0 +1,13 @@
1
+diff --git a/tty.c b/tty.c
2
+index eb2511c..576edbc 100644
3
+--- a/tty.c
4
++++ b/tty.c
5
+@@ -1067,7 +1067,7 @@ tty_cmd_setselection(struct tty *tty, const struct tty_ctx *ctx)
6
+ 	off = 4 * ((ctx->num + 2) / 3) + 1; /* storage for base64 */
7
+ 	buf = xmalloc(off);
8
+ 
9
+-	b64_ntop(ctx->ptr, ctx->num, buf, off);
10
++	local_b64_ntop(ctx->ptr, ctx->num, buf, off);
11
+ 	tty_putcode_ptr2(tty, TTYC_MS, "", buf);
12
+ 
13
+ 	free(buf);