tmux-9999.ebuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit autotools flag-o-matic
  5. DESCRIPTION="Terminal multiplexer"
  6. HOMEPAGE="https://tmux.github.io/"
  7. if [[ ${PV} == 9999 ]] ; then
  8. inherit git-r3
  9. SRC_URI="https://raw.githubusercontent.com/przepompownia/tmux-bash-completion/678a27616b70c649c6701cae9cd8c92b58cc051b/completions/tmux -> tmux-bash-completion-678a27616b70c649c6701cae9cd8c92b58cc051b"
  10. EGIT_REPO_URI="https://github.com/tmux/tmux.git"
  11. else
  12. SRC_URI="https://github.com/tmux/tmux/releases/download/${PV}/${P/_/-}.tar.gz"
  13. if [[ ${PV} != *_rc* ]] ; then
  14. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
  15. fi
  16. S="${WORKDIR}/${P/_/-}"
  17. fi
  18. LICENSE="ISC"
  19. SLOT="0"
  20. IUSE="debug selinux systemd utempter vim-syntax"
  21. # See https://github.com/tmux/tmux/issues/3531 for minimum ncurses version
  22. DEPEND="
  23. dev-libs/libevent:=
  24. >=sys-libs/ncurses-6.4_p20230424:=
  25. systemd? ( sys-apps/systemd:= )
  26. utempter? ( sys-libs/libutempter )
  27. kernel_Darwin? ( dev-libs/libutf8proc:= )
  28. "
  29. BDEPEND="
  30. virtual/pkgconfig
  31. app-alternatives/yacc
  32. "
  33. RDEPEND="
  34. ${DEPEND}
  35. selinux? ( sec-policy/selinux-screen )
  36. vim-syntax? ( app-vim/vim-tmux )
  37. "
  38. DOCS=( CHANGES README )
  39. PATCHES=(
  40. "${FILESDIR}"/${PN}-2.4-flags.patch
  41. )
  42. src_prepare() {
  43. # bug 438558
  44. # 1.7 segfaults when entering copy mode if compiled with -Os
  45. replace-flags -Os -O2
  46. default
  47. eautoreconf
  48. }
  49. src_configure() {
  50. local myeconfargs=(
  51. --sysconfdir="${EPREFIX}"/etc
  52. $(use_enable debug)
  53. $(use_enable systemd)
  54. $(use_enable utempter)
  55. # For now, we only expose this for macOS, because
  56. # upstream strongly encourage it. I'm not sure it's
  57. # needed on Linux right now.
  58. $(use_enable kernel_Darwin utf8proc)
  59. )
  60. econf "${myeconfargs[@]}"
  61. }
  62. src_install() {
  63. default
  64. einstalldocs
  65. dodoc example_tmux.conf
  66. docompress -x /usr/share/doc/${PF}/example_tmux.conf
  67. }