logo

overlay

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

sway-1.7_rc1.ebuild (2110B)


  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit meson
  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="+man +swaybar +swaybg +swayidle +swaylock +swaymsg +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/libpcre
  24. dev-libs/wayland
  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. swaybg? ( gui-apps/swaybg )
  32. swayidle? ( gui-apps/swayidle )
  33. swaylock? ( gui-apps/swaylock )
  34. wallpapers? ( x11-libs/gdk-pixbuf:2[jpeg] )
  35. X? ( x11-libs/libxcb:0= )
  36. "
  37. if [[ ${PV} == 9999 ]]; then
  38. DEPEND+="~gui-libs/wlroots-9999:=[X=]"
  39. else
  40. DEPEND+="
  41. >=gui-libs/wlroots-0.15:=[X=]
  42. <gui-libs/wlroots-0.16:=[X=]
  43. "
  44. fi
  45. RDEPEND="
  46. x11-misc/xkeyboard-config
  47. ${DEPEND}
  48. "
  49. BDEPEND="
  50. >=dev-libs/wayland-protocols-1.14
  51. >=dev-util/meson-0.60.0
  52. virtual/pkgconfig
  53. "
  54. if [[ ${PV} == 9999 ]]; then
  55. BDEPEND+="man? ( ~app-text/scdoc-9999 )"
  56. else
  57. BDEPEND+="man? ( >=app-text/scdoc-1.9.3 )"
  58. fi
  59. src_prepare() {
  60. default
  61. use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
  62. -e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
  63. }
  64. src_configure() {
  65. local emesonargs=(
  66. -Dman-pages=$(usex man enabled disabled)
  67. -Dtray=$(usex tray enabled disabled)
  68. -Dxwayland=$(usex X enabled disabled)
  69. $(meson_use wallpapers default-wallpaper)
  70. -Dfish-completions=true
  71. -Dzsh-completions=true
  72. -Dbash-completions=true
  73. -Dwerror=false
  74. -Dswaybar=$(usex swaybar true false)
  75. -Dswaynag=$(usex swaybar true false)
  76. )
  77. if use swaybar; then
  78. emesonargs+=( -Dgdk-pixbuf=enabled )
  79. else
  80. emesonargs+=( -Dgdk-pixbuf=disabled )
  81. fi
  82. meson_src_configure
  83. }