net-misc/spice-gtk: fix minimum glib dep
[gentoo.git] / net-misc / spice-gtk / spice-gtk-9999.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 GCONF_DEBUG="no"
6 WANT_AUTOMAKE="1.12"
7 VALA_MIN_API_VERSION="0.14"
8 VALA_USE_DEPEND="vapigen"
9
10 inherit autotools eutils git-r3 readme.gentoo-r1 vala xdg-utils
11
12 DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI"
13 HOMEPAGE="https://www.spice-space.org https://cgit.freedesktop.org/spice/spice-gtk/"
14
15 LICENSE="LGPL-2.1"
16 SLOT="0"
17 EGIT_REPO_URI="https://anongit.freedesktop.org/git/spice/spice-gtk.git"
18 KEYWORDS=""
19 IUSE="dbus gstaudio gstvideo +gtk3 +introspection lz4 mjpeg policykit pulseaudio sasl smartcard static-libs usbredir vala webdav libressl"
20
21 REQUIRED_USE="?? ( pulseaudio gstaudio )"
22
23 # TODO:
24 # * check if sys-freebsd/freebsd-lib (from virtual/acl) provides acl/libacl.h
25 # * use external pnp.ids as soon as that means not pulling in gnome-desktop
26 RDEPEND="
27         !libressl? ( dev-libs/openssl:0= )
28         libressl? ( dev-libs/libressl:0= )
29         pulseaudio? ( media-sound/pulseaudio[glib] )
30         gstvideo? (
31                 media-libs/gstreamer:1.0
32                 media-libs/gst-plugins-base:1.0
33                 media-libs/gst-plugins-good:1.0
34                 )
35         gstaudio? (
36                 media-libs/gstreamer:1.0
37                 media-libs/gst-plugins-base:1.0
38                 media-libs/gst-plugins-good:1.0
39                 )
40         >=x11-libs/pixman-0.17.7
41         media-libs/opus
42         gtk3? ( x11-libs/gtk+:3[introspection?] )
43         >=dev-libs/glib-2.46: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                 >=net-libs/libsoup-2.49.91 )
64 "
65 DEPEND="${RDEPEND}
66         ~app-emulation/spice-protocol-9999
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 NEWS README
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 }