sway-0.11-r3.ebuild 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils cmake-utils
  5. DESCRIPTION="i3-compatible Wayland window manager"
  6. HOMEPAGE="http://swaywm.org/"
  7. SRC_URI="https://github.com/SirCmpwn/sway/archive/${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="+swaybg +swaybar +swaymsg swaygrab swaylock +gdk-pixbuf zsh-completion wallpapers systemd"
  12. RDEPEND=">=dev-libs/wlc-0.0.5[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. PATCHES=( "${FILESDIR}/sway-0.11-r3-keep-cap.patch" )
  27. src_prepare() {
  28. cmake-utils_src_prepare
  29. # remove bad CFLAGS that upstream is trying to add
  30. sed -i -e '/FLAGS.*-Werror/d' CMakeLists.txt || die
  31. }
  32. src_configure() {
  33. local mycmakeargs=(
  34. -Denable-swaybar=$(usex swaybar)
  35. -Denable-swaybg=$(usex swaybg)
  36. -Denable-swaygrab=$(usex swaygrab)
  37. -Denable-swaylock=$(usex swaylock)
  38. -Denable-swaymsg=$(usex swaymsg)
  39. -Ddefault-wallpaper=$(usex wallpapers)
  40. -Denable-gdk-pixbuf=$(usex gdk-pixbuf)
  41. -Dzsh-completions=$(usex zsh-completion)
  42. -DCMAKE_INSTALL_SYSCONFDIR="/etc"
  43. -DLD_LIBRARY_PATH="${EPREFIX}/usr/lib"
  44. -DGIT_COMMIT_HASH="${PVR}" # specify version info, may change in future
  45. )
  46. cmake-utils_src_configure
  47. }
  48. src_install() {
  49. cmake-utils_src_install
  50. use !systemd && fperms u+s /usr/bin/sway
  51. }
  52. pkg_postinst() {
  53. if use swaygrab
  54. then
  55. optfeature "swaygrab screenshot support" media-gfx/imagemagick[png]
  56. optfeature "swaygrab video capture support" virtual/ffmpeg
  57. fi
  58. optfeature "X11 applications support" dev-libs/wlc[xwayland] x11-base/xorg-server[wayland]
  59. }