logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

sway-1.8_rc3.ebuild (2647B)


  1. # Copyright 1999-2022 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit fcaps meson optfeature
  5. DESCRIPTION="i3-compatible Wayland window manager"
  6. HOMEPAGE="https://swaywm.org"
  7. if [[ ${PV} == 9999 ]]; then
  8. inherit git-r3
  9. EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
  10. else
  11. MY_PV=${PV/_rc/-rc}
  12. SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
  13. KEYWORDS=""
  14. S="${WORKDIR}/${PN}-${MY_PV}"
  15. fi
  16. LICENSE="MIT"
  17. SLOT="0"
  18. IUSE="grimshot +man +swaybar +swaynag tray wallpapers X"
  19. DEPEND="
  20. >=dev-libs/json-c-0.13:0=
  21. >=dev-libs/libinput-1.6.0:0=
  22. sys-auth/seatd:=
  23. dev-libs/libpcre2
  24. >=dev-libs/wayland-1.20.0
  25. x11-libs/cairo
  26. x11-libs/libxkbcommon
  27. x11-libs/pango
  28. x11-libs/pixman
  29. media-libs/mesa[gles2,libglvnd(+)]
  30. swaybar? ( x11-libs/gdk-pixbuf:2 )
  31. tray? ( || (
  32. sys-apps/systemd
  33. sys-auth/elogind
  34. sys-libs/basu
  35. ) )
  36. wallpapers? ( gui-apps/swaybg[gdk-pixbuf(+)] )
  37. X? ( x11-libs/libxcb:0= )
  38. "
  39. if [[ ${PV} == 9999 ]]; then
  40. DEPEND+="~gui-libs/wlroots-9999:=[X?]"
  41. else
  42. DEPEND+="
  43. >=gui-libs/wlroots-0.16:=[X?]
  44. <gui-libs/wlroots-0.17:=[X?]
  45. "
  46. fi
  47. RDEPEND="
  48. x11-misc/xkeyboard-config
  49. grimshot? (
  50. app-misc/jq
  51. gui-apps/grim
  52. gui-apps/slurp
  53. gui-apps/wl-clipboard
  54. x11-libs/libnotify
  55. )
  56. ${DEPEND}
  57. "
  58. BDEPEND="
  59. >=dev-libs/wayland-protocols-1.24
  60. >=dev-util/meson-0.60.0
  61. virtual/pkgconfig
  62. "
  63. if [[ ${PV} == 9999 ]]; then
  64. BDEPEND+="man? ( ~app-text/scdoc-9999 )"
  65. else
  66. BDEPEND+="man? ( >=app-text/scdoc-1.9.3 )"
  67. fi
  68. REQUIRED_USE="tray? ( swaybar )"
  69. src_configure() {
  70. local emesonargs=(
  71. $(meson_feature man man-pages)
  72. $(meson_feature tray)
  73. $(meson_feature X xwayland)
  74. $(meson_feature swaybar gdk-pixbuf)
  75. $(meson_use swaynag)
  76. $(meson_use swaybar)
  77. $(meson_use wallpapers default-wallpaper)
  78. -Dfish-completions=true
  79. -Dzsh-completions=true
  80. -Dbash-completions=true
  81. )
  82. meson_src_configure
  83. }
  84. src_install() {
  85. meson_src_install
  86. if use grimshot; then
  87. doman contrib/grimshot.1
  88. dobin contrib/grimshot
  89. fi
  90. # For realtime
  91. fcaps cap_sys_nice usr/bin/sway
  92. }
  93. pkg_postinst() {
  94. optfeature_header "There are several packages that may be useful with sway:"
  95. optfeature "wallpaper utility" gui-apps/swaybg
  96. optfeature "idle management utility" gui-apps/swayidle
  97. optfeature "simple screen locker" gui-apps/swaylock
  98. optfeature "lightweight notification daemon" gui-apps/mako
  99. echo
  100. einfo "For a list of additional addons and tools usable with sway please"
  101. einfo "visit the offical wiki at:"
  102. einfo "https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway"
  103. einfo "Please note that some of them might not (yet) available on gentoo"
  104. }