Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/tmux/files/, app-misc/tmux/
Date: Fri, 26 Jan 2018 21:48:14
Message-Id: 1517003278.db7583610d5078d645d7f55ca80b181763c43273.monsieurp@gentoo
1 commit: db7583610d5078d645d7f55ca80b181763c43273
2 Author: Juanjie Xi <strangemk3 <AT> gmail <DOT> com>
3 AuthorDate: Fri Dec 22 02:09:18 2017 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 26 21:47:58 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db758361
7
8 app-misc/tmux: add patch against the pipe-pane unreliable bug.
9
10 Closes: https://bugs.gentoo.org/640228
11 Closes: https://github.com/gentoo/gentoo/pull/6596
12 Package-Manager: Portage-2.3.13
13
14 app-misc/tmux/files/tmux-2.3-pipe_pane-fix.patch | 9 +++
15 app-misc/tmux/tmux-2.3-r2.ebuild | 91 ++++++++++++++++++++++++
16 2 files changed, 100 insertions(+)
17
18 diff --git a/app-misc/tmux/files/tmux-2.3-pipe_pane-fix.patch b/app-misc/tmux/files/tmux-2.3-pipe_pane-fix.patch
19 new file mode 100644
20 index 00000000000..65dd2f3c1bc
21 --- /dev/null
22 +++ b/app-misc/tmux/files/tmux-2.3-pipe_pane-fix.patch
23 @@ -0,0 +1,9 @@
24 +--- a/window.c 2016-09-29 05:31:24.000000000 +0800
25 ++++ b/window.c 2017-12-22 09:38:43.709617000 +0800
26 +@@ -981,7 +981,7 @@
27 +
28 + input_parse(wp);
29 +
30 +- wp->pipe_off = size;
31 ++ wp->pipe_off = EVBUFFER_LENGTH(evb);
32 + }
33
34 diff --git a/app-misc/tmux/tmux-2.3-r2.ebuild b/app-misc/tmux/tmux-2.3-r2.ebuild
35 new file mode 100644
36 index 00000000000..3bed9128b2f
37 --- /dev/null
38 +++ b/app-misc/tmux/tmux-2.3-r2.ebuild
39 @@ -0,0 +1,91 @@
40 +# Copyright 1999-2017 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=6
44 +
45 +inherit autotools flag-o-matic versionator
46 +
47 +DESCRIPTION="Terminal multiplexer"
48 +HOMEPAGE="http://tmux.github.io/"
49 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
50 +
51 +LICENSE="ISC"
52 +SLOT="0"
53 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
54 +IUSE="debug selinux utempter vim-syntax kernel_FreeBSD kernel_linux"
55 +
56 +CDEPEND="
57 + >=dev-libs/libevent-2.1.5-r4:=
58 + utempter? (
59 + kernel_linux? ( sys-libs/libutempter )
60 + kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-lib-9.0 sys-libs/libutempter ) )
61 + )
62 + sys-libs/ncurses:0="
63 +
64 +DEPEND="
65 + ${CDEPEND}
66 + virtual/pkgconfig"
67 +
68 +RDEPEND="
69 + ${CDEPEND}
70 + selinux? ( sec-policy/selinux-screen )
71 + vim-syntax? (
72 + || (
73 + app-editors/vim
74 + app-editors/gvim
75 + )
76 + )"
77 +
78 +PATCHES=(
79 + "${FILESDIR}"/${PN}-2.3-flags.patch
80 +
81 + # usptream fixes (can be removed with next version bump)
82 + "${FILESDIR}"/${P}-screen_write_copy-fix.patch
83 + "${FILESDIR}"/${P}-pipe_pane-fix.patch
84 +)
85 +
86 +src_prepare() {
87 + default
88 +
89 + # regenerate aclocal.m4 to support earlier automake versions
90 + rm aclocal.m4 || die
91 +
92 + eautoreconf
93 +}
94 +
95 +src_configure() {
96 + # bug 438558
97 + # 1.7 segfaults when entering copy mode if compiled with -Os
98 + replace-flags -Os -O2
99 +
100 + econf \
101 + --sysconfdir="${EPREFIX}"/etc \
102 + $(use_enable debug) \
103 + $(use_enable utempter)
104 +}
105 +
106 +src_install() {
107 + default
108 +
109 + dodoc example_tmux.conf
110 + docompress -x /usr/share/doc/${PF}/example_tmux.conf
111 +
112 + if use vim-syntax; then
113 + insinto /usr/share/vim/vimfiles/ftdetect
114 + doins "${FILESDIR}"/tmux.vim
115 + fi
116 +}
117 +
118 +pkg_postinst() {
119 + if ! version_is_at_least 1.9a ${REPLACING_VERSIONS:-1.9a}; then
120 + ewarn
121 + ewarn "Some configuration options changed in this release."
122 + ewarn "Please read the CHANGES file in /usr/share/doc/${PF}/"
123 + ewarn
124 + ewarn "WARNING: After updating to ${P} you will _not_ be able to connect to any"
125 + ewarn "older, running tmux server instances. You'll have to use an existing client to"
126 + ewarn "end your old sessions or kill the old server instances. Otherwise you'll have"
127 + ewarn "to temporarily downgrade to access them."
128 + ewarn
129 + fi
130 +}