# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://github.com/swaywm/swayidle.git" inherit git-r3 else # Version format: major.minor-beta.betanum SWAYIDLE_PV="$(ver_cut 1-2)-$(ver_cut 3).$(ver_cut 4)" SRC_URI="https://github.com/swaywm/swayidle/archive/${SWAYIDLE_PV}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/swayidle-${SWAYIDLE_PV}" KEYWORDS="~amd64 ~x86" fi inherit eutils fcaps meson DESCRIPTION="Sway's idle management daemon for i3-compatible Wayland window manager" HOMEPAGE="https://swaywm.org" LICENSE="MIT" SLOT="0" IUSE="elogind fish-completion +pam +swaybar +swaybg +swaymsg +swaynag systemd +tray wallpapers X zsh-completion" REQUIRED_USE="?? ( elogind systemd )" RDEPEND=">=dev-libs/libinput-1.6.0:0= dev-libs/wayland >=dev-libs/wayland-protocols-1.14 x11-libs/libxkbcommon elogind? ( >=sys-auth/elogind-237 ) swaybar? ( x11-libs/gdk-pixbuf:2[jpeg] ) swaybg? ( x11-libs/gdk-pixbuf:2[jpeg] ) pam? ( virtual/pam ) x11-libs/gdk-pixbuf:2[jpeg] systemd? ( >=sys-apps/systemd-237 ) tray? ( >=sys-apps/dbus-1.10 ) X? ( x11-libs/libxcb:0= )" DEPEND="${RDEPEND}" BDEPEND="app-text/scdoc virtual/pkgconfig" FILECAPS=( cap_sys_admin usr/bin/sway ) src_prepare() { default } src_configure() { local emesonargs=( $(meson_use wallpapers default-wallpaper) $(meson_use zsh-completion zsh-completions) $(meson_use fish-completion fish-completions) $(meson_use X enable-xwaylan) "-Dbash-completions=true" "-Dwerror=false" ) meson_src_configure } pkg_postinst() { elog "You must be in the input group to allow sway to access input devices!" local dbus_cmd="" if use tray ; then elog "" optfeature "experimental xembed tray icons support" kde-plasma/xembed-sni-proxy dbus_cmd="dbus-launch --sh-syntax --exit-with-session " fi if ! use systemd && ! use elogind ; then fcaps_pkg_postinst elog "" elog "If you use ConsoleKit2, remember to launch sway using:" elog "exec ck-launch-session ${dbus_cmd}sway" fi }