app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / spice-gtk / spice-gtk-0.34.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 GCONF_DEBUG="no"
6 VALA_MIN_API_VERSION="0.14"
7 VALA_USE_DEPEND="vapigen"
8
9 inherit autotools eutils xdg-utils vala readme.gentoo-r1
10
11 DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI"
12 HOMEPAGE="https://www.spice-space.org https://cgit.freedesktop.org/spice/spice-gtk/"
13
14 LICENSE="LGPL-2.1"
15 SLOT="0"
16 SRC_URI="https://www.spice-space.org/download/gtk/${P}.tar.bz2"
17 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
18 IUSE="dbus gstaudio gstvideo gtk3 +introspection lz4 mjpeg policykit pulseaudio sasl smartcard static-libs usbredir vala webdav libressl"
19
20 REQUIRED_USE="?? ( pulseaudio gstaudio )"
21
22 # TODO:
23 # * check if sys-freebsd/freebsd-lib (from virtual/acl) provides acl/libacl.h
24 # * use external pnp.ids as soon as that means not pulling in gnome-desktop
25 RDEPEND="
26         !libressl? ( dev-libs/openssl:0= )
27         libressl? ( dev-libs/libressl:0= )
28         pulseaudio? ( media-sound/pulseaudio[glib] )
29         gstvideo? (
30                 media-libs/gstreamer:1.0
31                 media-libs/gst-plugins-base:1.0
32                 media-libs/gst-plugins-good:1.0
33                 )
34         gstaudio? (
35                 media-libs/gstreamer:1.0
36                 media-libs/gst-plugins-base:1.0
37                 media-libs/gst-plugins-good:1.0
38                 )
39         >=x11-libs/pixman-0.17.7
40         >=media-libs/celt-0.5.1.1:0.5.1
41         media-libs/opus
42         gtk3? ( x11-libs/gtk+:3[introspection?] )
43         >=dev-libs/glib-2.36:2
44         >=x11-libs/cairo-1.2
45         virtual/jpeg:0=
46         sys-libs/zlib
47         introspection? ( dev-libs/gobject-introspection )
48         lz4? ( app-arch/lz4 )
49         sasl? ( dev-libs/cyrus-sasl )
50         smartcard? ( app-emulation/qemu[smartcard] )
51         usbredir? (
52                 sys-apps/hwids
53                 >=sys-apps/usbredir-0.4.2
54                 virtual/libusb:1
55                 virtual/libgudev:=
56                 policykit? (
57                         sys-apps/acl
58                         >=sys-auth/polkit-0.110-r1
59                         !~sys-auth/polkit-0.111 )
60                 )
61         webdav? (
62                 net-libs/phodav:2.0
63                 >=dev-libs/glib-2.43.90:2
64                 >=net-libs/libsoup-2.49.91 )
65 "
66 DEPEND="${RDEPEND}
67         >=app-emulation/spice-protocol-0.12.12
68         dev-perl/Text-CSV
69         >=dev-util/gtk-doc-am-1.14
70         >=dev-util/intltool-0.40.0
71         >=sys-devel/gettext-0.17
72         virtual/pkgconfig
73         vala? ( $(vala_depend) )
74 "
75
76 src_prepare() {
77         default
78
79         eautoreconf
80
81         use vala && vala_src_prepare
82 }
83
84 src_configure() {
85         # Prevent sandbox violations, bug #581836
86         # https://bugzilla.gnome.org/show_bug.cgi?id=744134
87         # https://bugzilla.gnome.org/show_bug.cgi?id=744135
88         addpredict /dev
89
90         # Clean up environment, bug #586642
91         xdg_environment_reset
92
93         local myconf
94
95         if use vala ; then
96                 # force vala regen for MinGW, etc
97                 rm -fv gtk/controller/controller.{c,vala.stamp} gtk/controller/menu.c
98         fi
99
100         myconf="
101                 --disable-maintainer-mode \
102                 $(use_enable static-libs static) \
103                 $(use_enable introspection) \
104                 $(use_with sasl) \
105                 $(use_enable smartcard) \
106                 $(use_enable usbredir) \
107                 $(use_with usbredir usb-ids-path /usr/share/misc/usb.ids) \
108                 $(use_with usbredir usb-acl-helper-dir /usr/libexec) \
109                 $(use_with gtk3 gtk 3.0) \
110                 $(use_enable policykit polkit) \
111                 $(use_enable pulseaudio pulse) \
112                 $(use_enable gstaudio) \
113                 $(use_enable gstvideo) \
114                 $(use_enable mjpeg builtin-mjpeg) \
115                 $(use_enable vala) \
116                 $(use_enable webdav) \
117                 $(use_enable dbus) \
118                 --disable-gtk-doc \
119                 --disable-werror \
120                 --enable-pie"
121
122         econf ${myconf}
123 }
124
125 src_compile() {
126         # Prevent sandbox violations, bug #581836
127         # https://bugzilla.gnome.org/show_bug.cgi?id=744134
128         # https://bugzilla.gnome.org/show_bug.cgi?id=744135
129         addpredict /dev
130
131         default
132 }
133
134 src_install() {
135         default
136
137         dodoc AUTHORS ChangeLog NEWS README THANKS TODO
138
139         # Remove .la files if they're not needed
140         use static-libs || prune_libtool_files
141
142         make_desktop_entry spicy Spicy "utilities-terminal" "Network;RemoteAccess;"
143         readme.gentoo_create_doc
144 }