Skip to content

Commit

Permalink
dev-libs/sway: update live version 9999
Browse files Browse the repository at this point in the history
Removed src_install: calling newpamd is not longer required since
meson.build now properly install the pam module.
Add ability to disable swayidle, swaymsg, swaynag.
Add support for building swaylock without pam.

Signed-off-by: Niccolò Scatena <[email protected]>
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Aaron Bauman <[email protected]>
  • Loading branch information
SpeedJack authored and FuzzyGophers committed Dec 1, 2018
1 parent 5935a30 commit a8eef63
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions dev-libs/sway/sway-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ else
KEYWORDS="~amd64 ~x86"
fi

inherit eutils fcaps meson pam
inherit eutils fcaps meson

DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"

LICENSE="MIT"
SLOT="0"
IUSE="elogind fish-completion +swaybar +swaybg +swaylock systemd +tray wallpapers X zsh-completion"
IUSE="elogind fish-completion +pam +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd +tray wallpapers X zsh-completion"
REQUIRED_USE="?? ( elogind systemd )"

RDEPEND="~dev-libs/wlroots-9999[systemd=,elogind=,X=]
Expand All @@ -38,12 +38,12 @@ RDEPEND="~dev-libs/wlroots-9999[systemd=,elogind=,X=]
swaybar? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaybg? ( x11-libs/gdk-pixbuf:2[jpeg] )
swaylock? (
virtual/pam
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=[xkb] )"
X? ( x11-libs/libxcb:0= )"
DEPEND="${RDEPEND}"
BDEPEND="app-text/scdoc
virtual/pkgconfig"
Expand All @@ -55,7 +55,14 @@ src_prepare() {

use swaybar || sed -e "s/subdir('swaybar')//g" -i meson.build || die
use swaybg || sed -e "s/subdir('swaybg')//g" -i meson.build || die
use swaylock || sed -e "s/subdir('swaylock')//g" -i meson.build || die
use swayidle || sed -e "s/subdir('swayidle')//g" -e "/swayidle.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swayidle/d" -i meson.build || die
use swaylock || sed -e "s/subdir('swaylock')//g" -e "/swaylock.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaylock/d" -i meson.build || die
use swaymsg || sed -e "s/subdir('swaymsg')//g" -e "/swaymsg.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaymsg/d" -i meson.build || die
use swaynag || sed -e "s/subdir('swaynag')//g" -e "/swaynag.[0-9].scd/d" \
-e "/completions\/[a-z]\+\/_\?swaynag/d" -i meson.build || die
}

src_configure() {
Expand All @@ -71,12 +78,6 @@ src_configure() {
meson_src_configure
}

src_install() {
meson_src_install

use swaylock && newpamd swaylock/pam/swaylock.linux swaylock
}

pkg_postinst() {
elog "You must be in the input group to allow sway to access input devices!"
local dbus_cmd=""
Expand All @@ -91,4 +92,7 @@ pkg_postinst() {
elog "If you use ConsoleKit2, remember to launch sway using:"
elog "exec ck-launch-session ${dbus_cmd}sway"
fi
if use swaylock && ! use pam; then
fcaps cap_sys_admin usr/bin/swaylock
fi
}

0 comments on commit a8eef63

Please sign in to comment.