dev-qt/qtopengl: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / app-misc / tmux / tmux-9999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools flag-o-matic
7
8 DESCRIPTION="Terminal multiplexer"
9 HOMEPAGE="https://tmux.github.io/"
10 if [[ "${PV}" == 9999 ]] ; then
11         inherit git-r3
12         SRC_URI="https://raw.githubusercontent.com/przepompownia/tmux-bash-completion/678a27616b70c649c6701cae9cd8c92b58cc051b/completions/tmux -> tmux-bash-completion-678a27616b70c649c6701cae9cd8c92b58cc051b"
13         EGIT_REPO_URI="https://github.com/tmux/tmux.git"
14 else
15         SRC_URI="https://github.com/tmux/tmux/releases/download/$(ver_cut 1-2)/${P/_/-}.tar.gz"
16         [[ "${PV}" == *_rc* ]] || \
17         KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
18         S="${WORKDIR}/${P/_/-}"
19 fi
20
21 LICENSE="ISC"
22 SLOT="0"
23 IUSE="debug selinux utempter vim-syntax kernel_FreeBSD kernel_linux"
24
25 DEPEND="
26         dev-libs/libevent:0=
27         sys-libs/ncurses:0=
28         utempter? ( sys-libs/libutempter )
29 "
30
31 BDEPEND="
32         virtual/pkgconfig
33         virtual/yacc
34 "
35
36 RDEPEND="
37         ${DEPEND}
38         selinux? ( sec-policy/selinux-screen )
39         vim-syntax? ( app-vim/vim-tmux )"
40
41 DOCS=( CHANGES README )
42
43 PATCHES=(
44         "${FILESDIR}/${PN}-2.4-flags.patch"
45
46         # upstream fixes (can be removed with next version bump)
47 )
48
49 src_prepare() {
50         # bug 438558
51         # 1.7 segfaults when entering copy mode if compiled with -Os
52         replace-flags -Os -O2
53
54         default
55         eautoreconf
56 }
57
58 src_configure() {
59         local myeconfargs=(
60                 --sysconfdir="${EPREFIX}"/etc
61                 $(use_enable debug)
62                 $(use_enable utempter)
63         )
64         econf "${myeconfargs[@]}"
65 }
66
67 src_install() {
68         default
69
70         einstalldocs
71
72         dodoc example_tmux.conf
73         docompress -x /usr/share/doc/${PF}/example_tmux.conf
74 }
75
76 pkg_postinst() {
77         if ! ver_test 1.9a -ge ${REPLACING_VERSIONS:-1.9a}; then
78                 echo
79                 ewarn "Some configuration options changed in this release."
80                 ewarn "Please read the CHANGES file in /usr/share/doc/${PF}/"
81                 ewarn
82                 ewarn "WARNING: After updating to ${P} you will _not_ be able to connect to any"
83                 ewarn "older, running tmux server instances. You'll have to use an existing client to"
84                 ewarn "end your old sessions or kill the old server instances. Otherwise you'll have"
85                 ewarn "to temporarily downgrade to access them."
86                 echo
87         fi
88 }