app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / eventd / eventd-0.23.0_p20171112.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit linux-info meson systemd xdg-utils
7
8 DESCRIPTION="A small daemon to act on remote or local events"
9 HOMEPAGE="https://www.eventd.org/"
10 SRC_URI="https://dev.gentoo.org/~kensington/distfiles/${P}.tgz"
11
12 LICENSE="GPL-3+ LGPL-3+ MIT"
13 SLOT="0"
14 KEYWORDS="~amd64"
15 IUSE="debug fbcon +introspection ipv6 libcanberra libnotify +notification
16         pulseaudio purple speech systemd test upnp webhook websocket +X zeroconf"
17
18 REQUIRED_USE="
19         X? ( notification )
20         fbcon? ( notification )
21         notification? ( || ( X fbcon ) )
22         test? ( websocket )
23 "
24
25 COMMON_DEPEND="
26         >=dev-libs/glib-2.40:2
27         sys-apps/util-linux
28         x11-libs/libxkbcommon
29         introspection? ( >=dev-libs/gobject-introspection-1.42 )
30         libcanberra? ( media-libs/libcanberra )
31         libnotify? ( x11-libs/gdk-pixbuf:2 )
32         notification? (
33                 x11-libs/cairo
34                 x11-libs/pango
35                 x11-libs/gdk-pixbuf:2
36                 X? (
37                         x11-libs/cairo[xcb]
38                         x11-libs/libxcb:=
39                         x11-libs/xcb-util
40                         x11-libs/xcb-util-wm
41                 )
42         )
43         pulseaudio? (
44                 media-libs/libsndfile
45                 media-sound/pulseaudio
46         )
47         purple? ( net-im/pidgin )
48         speech? ( >=app-accessibility/speech-dispatcher-0.8.7 )
49         systemd? ( sys-apps/systemd:= )
50         upnp? ( net-libs/gssdp:= )
51         webhook? ( >=net-libs/libsoup-2.42:2.4 )
52         websocket? ( >=net-libs/libsoup-2.50:2.4 )
53         zeroconf? ( net-dns/avahi[dbus] )
54 "
55 DEPEND="${COMMON_DEPEND}
56         app-text/docbook-xml-dtd:4.5
57         app-text/docbook-xsl-stylesheets
58         dev-libs/libxslt
59         virtual/pkgconfig
60         fbcon? ( virtual/os-headers )
61 "
62 RDEPEND="${COMMON_DEPEND}
63         net-libs/glib-networking[ssl]
64 "
65
66 pkg_setup() {
67         if use ipv6; then
68                 CONFIG_CHECK=$(usex test 'IPV6' '~IPV6')
69                 linux-info_pkg_setup
70         fi
71 }
72
73 src_prepare() {
74         default_src_prepare
75
76         # Prevent access violations from introspection metadata generation.
77         xdg_environment_reset
78 }
79
80 eventd_use_enable() {
81         echo "-Denable-${2:-${1}}=$(usex ${1} 'true' 'false')" || die
82 }
83
84 src_configure() {
85         local emesonargs=(
86                 -Dsystemduserunitdir="$(systemd_get_userunitdir)"
87                 -Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
88                 -Ddbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
89                 $(eventd_use_enable websocket)
90                 $(eventd_use_enable zeroconf dns-sd)
91                 $(eventd_use_enable upnp ssdp)
92                 $(eventd_use_enable ipv6)
93                 $(eventd_use_enable systemd)
94                 $(eventd_use_enable notification notification-daemon)
95                 # Wayland plugin requires wayland-wall, which is currently WIP.
96                 # See https://github.com/wayland-wall/wayland-wall/issues/1
97                 -Denable-nd-wayland="false"
98                 $(eventd_use_enable X nd-xcb)
99                 $(eventd_use_enable fbcon nd-fbdev)
100                 $(eventd_use_enable purple im)
101                 $(eventd_use_enable pulseaudio sound)
102                 $(eventd_use_enable speech tts)
103                 $(eventd_use_enable webhook)
104                 $(eventd_use_enable libnotify)
105                 $(eventd_use_enable libcanberra)
106                 $(eventd_use_enable introspection gobject-introspection)
107                 $(eventd_use_enable debug)
108         )
109         meson_src_configure
110 }
111
112 src_test() {
113         EVENTD_TESTS_TMP_DIR="${T}" meson_src_test
114 }
115
116 pkg_postinst() {
117         if { use notification || use libnotify; } && ! has_version 'gnome-base/librsvg'; then
118                 elog
119                 elog "For SVG icons in notifications, please install 'gnome-base/librsvg'."
120                 elog
121         fi
122 }