sway-9999.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit git-r3 eutils cmake-utils
  5. DESCRIPTION="i3-compatible Wayland window manager"
  6. HOMEPAGE="http://swaywm.org/"
  7. EGIT_REPO_URI="https://github.com/SirCmpwn/sway.git"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS=""
  11. IUSE="+swaybg +swaybar +swaymsg swaygrab swaylock +gdk-pixbuf zsh-completion wallpapers systemd"
  12. RDEPEND="=dev-libs/wlc-9999[systemd=]
  13. dev-libs/json-c
  14. dev-libs/libpcre
  15. dev-libs/libinput
  16. x11-libs/libxkbcommon
  17. dev-libs/wayland
  18. sys-libs/libcap
  19. x11-libs/pango
  20. x11-libs/cairo
  21. swaylock? ( virtual/pam )
  22. gdk-pixbuf? ( x11-libs/gdk-pixbuf[jpeg] )"
  23. DEPEND="${RDEPEND}
  24. virtual/pkgconfig
  25. app-text/asciidoc"
  26. src_prepare() {
  27. cmake-utils_src_prepare
  28. # remove bad CFLAGS that upstream is trying to add
  29. sed -i -e '/FLAGS.*-Werror/d' CMakeLists.txt || die
  30. }
  31. src_configure() {
  32. local mycmakeargs=(
  33. -Denable-swaybar=$(usex swaybar)
  34. -Denable-swaybg=$(usex swaybg)
  35. -Denable-swaygrab=$(usex swaygrab)
  36. -Denable-swaylock=$(usex swaylock)
  37. -Denable-swaymsg=$(usex swaymsg)
  38. -Ddefault-wallpaper=$(usex wallpapers)
  39. -Denable-gdk-pixbuf=$(usex gdk-pixbuf)
  40. -Dzsh-completions=$(usex zsh-completion)
  41. -DCMAKE_INSTALL_SYSCONFDIR="/etc"
  42. )
  43. cmake-utils_src_configure
  44. }
  45. src_install() {
  46. cmake-utils_src_install
  47. use !systemd && fperms u+s /usr/bin/sway
  48. }
  49. pkg_postinst() {
  50. if use swaygrab
  51. then
  52. optfeature "swaygrab screenshot support" media-gfx/imagemagick[png]
  53. optfeature "swaygrab video capture support" virtual/ffmpeg
  54. fi
  55. optfeature "X11 applications support" dev-libs/wlc[xwayland] x11-base/xorg-server[wayland]
  56. }