summaryrefslogtreecommitdiff
path: root/dev-libs/sway/sway-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-02-16 12:59:29 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-02-16 12:59:29 +0000
commit79599515788b85b18aa655e7b7f8cc05c1bbddd8 (patch)
treeade7cb031f363fad64c77139dea7aa3d81908537 /dev-libs/sway/sway-9999.ebuild
parent6bc2e4d7c5906e46a8f275a876ead6ec41aca5bb (diff)
gentoo resync : 16.02.1018
Diffstat (limited to 'dev-libs/sway/sway-9999.ebuild')
-rw-r--r--dev-libs/sway/sway-9999.ebuild79
1 files changed, 44 insertions, 35 deletions
diff --git a/dev-libs/sway/sway-9999.ebuild b/dev-libs/sway/sway-9999.ebuild
index 95621d2f0721..f1d3935e2f12 100644
--- a/dev-libs/sway/sway-9999.ebuild
+++ b/dev-libs/sway/sway-9999.ebuild
@@ -3,59 +3,64 @@
EAPI=7
-inherit eutils fcaps meson
+inherit eutils meson
DESCRIPTION="i3-compatible Wayland window manager"
HOMEPAGE="https://swaywm.org"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
- EGIT_REPO_URI="https://github.com/swaywm/sway.git"
+ EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
else
MY_PV=${PV/_rc/-rc}
- SRC_URI="https://github.com/swaywm/sway/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/swaywm/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
-IUSE="bash-completion clipboard doc elogind fish-completion +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd +tray wallpapers X zsh-completion"
-REQUIRED_USE="?? ( elogind systemd )"
+IUSE="elogind fish-completion +man +swaybar +swaybg +swayidle +swaylock +swaymsg +swaynag systemd tray wallpapers X zsh-completion"
+REQUIRED_USE="?? ( elogind systemd )
+ tray? ( || ( elogind systemd ) )"
-RDEPEND="
- >=dev-libs/wlroots-0.3[elogind=,systemd=,X=]
+DEPEND="
>=dev-libs/json-c-0.13:0=
>=dev-libs/libinput-1.6.0:0=
dev-libs/libpcre
dev-libs/wayland
- >=dev-libs/wayland-protocols-1.14
x11-libs/cairo
x11-libs/libxkbcommon
x11-libs/pango
x11-libs/pixman
- sys-libs/libcap
- clipboard? ( dev-libs/wl-clipboard )
elogind? ( >=sys-auth/elogind-239 )
- swaybar? ( x11-libs/gdk-pixbuf:2[jpeg] )
- swaybg? ( x11-libs/gdk-pixbuf:2[jpeg] )
+ swaybar? ( x11-libs/gdk-pixbuf:2 )
+ swaybg? ( x11-libs/gdk-pixbuf:2 )
swayidle? ( dev-libs/swayidle )
swaylock? ( dev-libs/swaylock )
systemd? ( >=sys-apps/systemd-239 )
- tray? ( >=sys-apps/dbus-1.10 )
- X? ( x11-libs/libxcb:0= )"
-DEPEND="${RDEPEND}"
+ X? ( x11-libs/libxcb:0= )
+"
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+="~dev-libs/wlroots-9999[elogind=,systemd=,X=]"
+else
+ DEPEND+=">=dev-libs/wlroots-0.3[elogind=,systemd=,X=]"
+fi
+RDEPEND="
+ x11-misc/xkeyboard-config
+ ${DEPEND}
+"
BDEPEND="
- dev-libs/wayland-protocols
- doc? ( >=app-text/scdoc-1.8.1 )
- virtual/pkgconfig"
-
-FILECAPS=( cap_sys_admin usr/bin/sway )
+ >=dev-libs/wayland-protocols-1.14
+ virtual/pkgconfig
+ man? ( >=app-text/scdoc-1.8.1 )
+"
src_prepare() {
default
- use swaybar || sed -e "s/subdir('swaybar')//g" -i meson.build || die
+ use swaybar || sed -e "s/subdir('swaybar')//g" -e "/sway-bar.[0-9].scd/d" \
+ -e "/completions\/[a-z]\+\/_\?swaybar/d" -i meson.build || die
use swaybg || sed -e "s/subdir('swaybg')//g" -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
@@ -65,36 +70,40 @@ src_prepare() {
src_configure() {
local emesonargs=(
- $(meson_use bash-completion bash-completions)
- $(meson_use fish-completion fish-completions)
+ -Dman-pages=$(usex man enabled disabled)
+ -Dtray=$(usex tray enabled disabled)
+ -Dxwayland=$(usex X enabled disabled)
$(meson_use wallpapers default-wallpaper)
+ $(meson_use fish-completion fish-completions)
$(meson_use zsh-completion zsh-completions)
- "-Dtray=$(usex tray enabled disabled)"
- "-Dxwayland=$(usex X enabled disabled)"
+ "-Dbash-completions=true"
"-Dwerror=false"
)
+
if use swaybar || use swaybg; then
emesonargs+=("-Dgdk-pixbuf=enabled")
else
emesonargs+=("-Dgdk-pixbuf=disabled")
fi
- if [[ ${PV} != 9999 ]]; then
- emesonargs+=("-Dsway-version=${PV}")
- fi
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
- dbus_cmd="dbus-launch --sh-syntax --exit-with-session "
+pkg_preinst() {
+ if ! use systemd && ! use elogind; then
+ fowners root:0 /usr/bin/sway
+ fperms 4511 /usr/bin/sway
fi
+}
+
+pkg_postinst() {
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"
+ elog "exec ck-launch-session sway"
+ elog ""
+ elog "If your system does not set the XDG_RUNTIME_DIR environment"
+ elog "variable, you must set it manually to run Sway. See wiki"
+ elog "for details: https://wiki.gentoo.org/wiki/Sway"
fi
}