swayfx-9999.ebuild 2.8 KB

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