2018-02-26 08:42:59 +03:00
|
|
|
# Copyright 1999-2018 Gentoo Foundation
|
2017-05-25 09:15:06 +03:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=6
|
|
|
|
|
2017-11-19 20:50:15 +03:00
|
|
|
inherit linux-info meson systemd xdg-utils
|
2017-05-25 09:15:06 +03:00
|
|
|
|
|
|
|
DESCRIPTION="A small daemon to act on remote or local events"
|
|
|
|
HOMEPAGE="https://www.eventd.org/"
|
2018-03-13 23:30:52 +03:00
|
|
|
SRC_URI="https://www.eventd.org/download/eventd/${P}.tar.xz"
|
2017-05-25 09:15:06 +03:00
|
|
|
|
|
|
|
LICENSE="GPL-3+ LGPL-3+ MIT"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
IUSE="debug fbcon +introspection ipv6 libcanberra libnotify +notification
|
2017-11-19 20:50:15 +03:00
|
|
|
pulseaudio purple speech systemd test upnp webhook websocket +X zeroconf"
|
2017-05-25 09:15:06 +03:00
|
|
|
|
|
|
|
REQUIRED_USE="
|
|
|
|
X? ( notification )
|
|
|
|
fbcon? ( notification )
|
|
|
|
notification? ( || ( X fbcon ) )
|
|
|
|
test? ( websocket )
|
|
|
|
"
|
|
|
|
|
|
|
|
COMMON_DEPEND="
|
|
|
|
>=dev-libs/glib-2.40:2
|
|
|
|
sys-apps/util-linux
|
2017-11-19 20:50:15 +03:00
|
|
|
x11-libs/libxkbcommon
|
2017-05-25 09:15:06 +03:00
|
|
|
introspection? ( >=dev-libs/gobject-introspection-1.42 )
|
|
|
|
libcanberra? ( media-libs/libcanberra )
|
|
|
|
libnotify? ( x11-libs/gdk-pixbuf:2 )
|
|
|
|
notification? (
|
|
|
|
x11-libs/cairo
|
|
|
|
x11-libs/pango
|
|
|
|
x11-libs/gdk-pixbuf:2
|
|
|
|
X? (
|
|
|
|
x11-libs/cairo[xcb]
|
|
|
|
x11-libs/libxcb:=
|
|
|
|
x11-libs/xcb-util
|
|
|
|
x11-libs/xcb-util-wm
|
|
|
|
)
|
|
|
|
)
|
|
|
|
pulseaudio? (
|
|
|
|
media-libs/libsndfile
|
|
|
|
media-sound/pulseaudio
|
|
|
|
)
|
|
|
|
purple? ( net-im/pidgin )
|
2017-11-19 20:50:15 +03:00
|
|
|
speech? ( >=app-accessibility/speech-dispatcher-0.8.7 )
|
2017-05-25 09:15:06 +03:00
|
|
|
systemd? ( sys-apps/systemd:= )
|
|
|
|
upnp? ( net-libs/gssdp:= )
|
2017-11-19 20:50:15 +03:00
|
|
|
webhook? ( >=net-libs/libsoup-2.42:2.4 )
|
2017-05-25 09:15:06 +03:00
|
|
|
websocket? ( >=net-libs/libsoup-2.50:2.4 )
|
|
|
|
zeroconf? ( net-dns/avahi[dbus] )
|
|
|
|
"
|
|
|
|
DEPEND="${COMMON_DEPEND}
|
2018-02-26 08:42:59 +03:00
|
|
|
>=dev-util/meson-0.44.1
|
2017-05-25 09:15:06 +03:00
|
|
|
app-text/docbook-xml-dtd:4.5
|
|
|
|
app-text/docbook-xsl-stylesheets
|
|
|
|
dev-libs/libxslt
|
|
|
|
virtual/pkgconfig
|
|
|
|
fbcon? ( virtual/os-headers )
|
|
|
|
"
|
|
|
|
RDEPEND="${COMMON_DEPEND}
|
|
|
|
net-libs/glib-networking[ssl]
|
|
|
|
"
|
|
|
|
|
|
|
|
pkg_setup() {
|
|
|
|
if use ipv6; then
|
|
|
|
CONFIG_CHECK=$(usex test 'IPV6' '~IPV6')
|
|
|
|
linux-info_pkg_setup
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
default_src_prepare
|
|
|
|
|
|
|
|
# Prevent access violations from introspection metadata generation.
|
|
|
|
xdg_environment_reset
|
|
|
|
}
|
|
|
|
|
|
|
|
eventd_use_enable() {
|
2018-03-13 23:30:52 +03:00
|
|
|
echo "-D${2:-${1}}=$(usex ${1} 'true' 'false')" || die
|
2017-05-25 09:15:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
local emesonargs=(
|
|
|
|
-Dsystemduserunitdir="$(systemd_get_userunitdir)"
|
|
|
|
-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
|
|
|
|
-Ddbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
|
|
|
|
$(eventd_use_enable websocket)
|
|
|
|
$(eventd_use_enable zeroconf dns-sd)
|
|
|
|
$(eventd_use_enable upnp ssdp)
|
|
|
|
$(eventd_use_enable ipv6)
|
|
|
|
$(eventd_use_enable systemd)
|
|
|
|
$(eventd_use_enable notification notification-daemon)
|
|
|
|
# Wayland plugin requires wayland-wall, which is currently WIP.
|
|
|
|
# See https://github.com/wayland-wall/wayland-wall/issues/1
|
2018-03-13 23:30:52 +03:00
|
|
|
-Dnd-wayland="false"
|
2017-05-25 09:15:06 +03:00
|
|
|
$(eventd_use_enable X nd-xcb)
|
|
|
|
$(eventd_use_enable fbcon nd-fbdev)
|
|
|
|
$(eventd_use_enable purple im)
|
|
|
|
$(eventd_use_enable pulseaudio sound)
|
|
|
|
$(eventd_use_enable speech tts)
|
2017-11-19 20:50:15 +03:00
|
|
|
$(eventd_use_enable webhook)
|
2017-05-25 09:15:06 +03:00
|
|
|
$(eventd_use_enable libnotify)
|
|
|
|
$(eventd_use_enable libcanberra)
|
|
|
|
$(eventd_use_enable introspection gobject-introspection)
|
|
|
|
$(eventd_use_enable debug)
|
|
|
|
)
|
|
|
|
meson_src_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
src_test() {
|
2018-03-18 12:24:43 +03:00
|
|
|
EVENTD_TESTS_TMP_DIR="${T}" meson_src_test
|
2017-05-25 09:15:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
if { use notification || use libnotify; } && ! has_version 'gnome-base/librsvg'; then
|
|
|
|
elog
|
|
|
|
elog "For SVG icons in notifications, please install 'gnome-base/librsvg'."
|
|
|
|
elog
|
|
|
|
fi
|
|
|
|
}
|