1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 VALA_MIN_API_VERSION="0.14"
9 VALA_USE_DEPEND="vapigen"
11 PYTHON_COMPAT=( python2_7 )
13 inherit autotools eutils multibuild python-single-r1 vala
15 DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI"
16 HOMEPAGE="http://spice-space.org http://gitorious.org/spice-gtk"
20 SRC_URI="http://spice-space.org/download/gtk/${P}.tar.bz2"
21 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
22 IUSE="dbus gstreamer gtk3 +introspection lz4 policykit pulseaudio python sasl smartcard static-libs usbredir vala webdav"
25 python? ( ${PYTHON_REQUIRED_USE} )
26 ?? ( pulseaudio gstreamer )
30 # * check if sys-freebsd/freebsd-lib (from virtual/acl) provides acl/libacl.h
31 # * use external pnp.ids as soon as that means not pulling in gnome-desktop
34 pulseaudio? ( media-sound/pulseaudio[glib] )
36 media-libs/gstreamer:1.0
37 media-libs/gst-plugins-base:1.0 )
38 >=x11-libs/pixman-0.17.7
39 >=media-libs/celt-0.5.1.1:0.5.1
42 gtk3? ( x11-libs/gtk+:3[introspection?] )
43 x11-libs/gtk+:2[introspection?]
44 >=dev-libs/glib-2.28:2
48 introspection? ( dev-libs/gobject-introspection )
50 python? ( dev-python/pygtk:2 )
51 sasl? ( dev-libs/cyrus-sasl )
52 smartcard? ( app-emulation/qemu[smartcard] )
55 >=sys-apps/usbredir-0.4.2
60 >=sys-auth/polkit-0.110-r1
61 !~sys-auth/polkit-0.111 )
65 >=dev-libs/glib-2.43.90:2
66 >=net-libs/libsoup-2.49.91 )
72 >=dev-util/gtk-doc-am-1.14
73 >=dev-util/intltool-0.40.0
74 >=sys-devel/gettext-0.17
76 vala? ( $(vala_depend) )
79 # Hard-deps while building from git:
86 AT_NO_RECURSIVE="yes" eautoreconf
88 use vala && vala_src_prepare
95 use gstreamer && audio="gstreamer"
96 use pulseaudio && audio="pulse"
99 # force vala regen for MinGW, etc
100 rm -fv gtk/controller/controller.{c,vala.stamp} gtk/controller/menu.c
104 --disable-maintainer-mode \
105 $(use_enable static-libs static) \
106 $(use_enable introspection) \
107 --with-audio=${audio} \
109 $(use_enable smartcard) \
110 $(use_enable usbredir) \
111 $(use_with usbredir usb-ids-path /usr/share/misc/usb.ids) \
112 $(use_with usbredir usb-acl-helper-dir /usr/libexec) \
113 $(use_enable policykit polkit) \
115 $(use_enable webdav) \
121 # Parameter of --with-gtk
122 MULTIBUILD_VARIANTS=( 2.0 )
123 use gtk3 && MULTIBUILD_VARIANTS+=( 3.0 )
127 myconf+=( --with-gtk=${MULTIBUILD_VARIANT} )
129 if [[ ${MULTIBUILD_ID} =~ "2.0" ]] ; then
130 myconf+=( $(use_with python) )
132 myconf+=( --without-python )
135 ECONF_SOURCE="${S}" econf $@ ${myconf[@]}
137 multibuild_foreach_variant run_in_build_dir configure ${myconf}
141 multibuild_foreach_variant run_in_build_dir default
145 multibuild_foreach_variant run_in_build_dir default
149 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
151 multibuild_foreach_variant run_in_build_dir default
153 # Remove .la files if they're not needed
154 use static-libs || prune_libtool_files
156 use python && rm -rf "${ED}"/usr/lib*/python*/site-packages/*.la
158 make_desktop_entry spicy Spicy "utilities-terminal" "Network;RemoteAccess;"