net-misc/spice-gtk: fix minimum glib dep
[gentoo.git] / net-misc / spice-gtk / spice-gtk-0.34-r2.ebuild
1 # Copyright 1999-2018 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/opus
41         gtk3? ( x11-libs/gtk+:3[introspection?] )
42         >=dev-libs/glib-2.36:2
43         >=x11-libs/cairo-1.2
44         virtual/jpeg:0=
45         sys-libs/zlib
46         introspection? ( dev-libs/gobject-introspection )
47         lz4? ( app-arch/lz4 )
48         sasl? ( dev-libs/cyrus-sasl )
49         smartcard? ( app-emulation/qemu[smartcard] )
50         usbredir? (
51                 sys-apps/hwids
52                 >=sys-apps/usbredir-0.4.2
53                 virtual/libusb:1
54                 virtual/libgudev:=
55                 policykit? (
56                         sys-apps/acl
57                         >=sys-auth/polkit-0.110-r1
58                         !~sys-auth/polkit-0.111 )
59                 )
60         webdav? (
61                 net-libs/phodav:2.0
62                 >=dev-libs/glib-2.43.90:2
63                 >=net-libs/libsoup-2.49.91 )
64 "
65 DEPEND="${RDEPEND}
66         >=app-emulation/spice-protocol-0.12.13
67         dev-perl/Text-CSV
68         >=dev-util/gtk-doc-am-1.14
69         >=dev-util/intltool-0.40.0
70         >=sys-devel/gettext-0.17
71         virtual/pkgconfig
72         vala? ( $(vala_depend) )
73 "
74
75 src_prepare() {
76         # bug 558558
77         export GIT_CEILING_DIRECTORIES="${WORKDIR}"
78         echo GIT_CEILING_DIRECTORIES=${GIT_CEILING_DIRECTORIES}
79
80         default
81
82         eautoreconf
83
84         use vala && vala_src_prepare
85 }
86
87 src_configure() {
88         # Prevent sandbox violations, bug #581836
89         # https://bugzilla.gnome.org/show_bug.cgi?id=744134
90         # https://bugzilla.gnome.org/show_bug.cgi?id=744135
91         addpredict /dev
92
93         # Clean up environment, bug #586642
94         xdg_environment_reset
95
96         local myconf
97
98         if use vala ; then
99                 # force vala regen for MinGW, etc
100                 rm -fv gtk/controller/controller.{c,vala.stamp} gtk/controller/menu.c
101         fi
102
103         myconf="
104                 $(use_enable static-libs static)
105                 $(use_enable introspection)
106                 $(use_with sasl)
107                 $(use_enable smartcard)
108                 $(use_enable usbredir)
109                 $(use_with usbredir usb-ids-path /usr/share/misc/usb.ids)
110                 $(use_with usbredir usb-acl-helper-dir /usr/libexec)
111                 $(use_with gtk3 gtk 3.0)
112                 $(use_enable policykit polkit)
113                 $(use_enable pulseaudio pulse)
114                 $(use_enable gstaudio)
115                 $(use_enable gstvideo)
116                 $(use_enable mjpeg builtin-mjpeg)
117                 $(use_enable vala)
118                 $(use_enable webdav)
119                 $(use_enable dbus)
120                 --disable-celt051
121                 --disable-gtk-doc
122                 --disable-maintainer-mode
123                 --disable-werror
124                 --enable-pie"
125
126         econf ${myconf}
127 }
128
129 src_compile() {
130         # Prevent sandbox violations, bug #581836
131         # https://bugzilla.gnome.org/show_bug.cgi?id=744134
132         # https://bugzilla.gnome.org/show_bug.cgi?id=744135
133         addpredict /dev
134
135         default
136 }
137
138 src_install() {
139         default
140
141         dodoc AUTHORS ChangeLog NEWS README THANKS TODO
142
143         # Remove .la files if they're not needed
144         use static-libs || prune_libtool_files
145
146         make_desktop_entry spicy Spicy "utilities-terminal" "Network;RemoteAccess;"
147         readme.gentoo_create_doc
148 }