Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: net-misc/spice-gtk/, net-misc/spice-gtk/files/
Date: Tue, 15 Nov 2011 01:32:02
Message-Id: c25b53d60e38518b6729f2d3731ced80e0327d32.nirbheek@gentoo
1 commit: c25b53d60e38518b6729f2d3731ced80e0327d32
2 Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 14 23:14:38 2011 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 15 01:31:29 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=c25b53d6
7
8 net-misc/spice-gtk: add live ebuild with vapi generation
9
10 ---
11 net-misc/spice-gtk/files/spice.protocol | 12 +++
12 net-misc/spice-gtk/files/spice.schemas | 41 ++++++++++
13 net-misc/spice-gtk/spice-gtk-9999.ebuild | 119 ++++++++++++++++++++++++++++++
14 3 files changed, 172 insertions(+), 0 deletions(-)
15
16 diff --git a/net-misc/spice-gtk/files/spice.protocol b/net-misc/spice-gtk/files/spice.protocol
17 new file mode 100644
18 index 0000000..348247f
19 --- /dev/null
20 +++ b/net-misc/spice-gtk/files/spice.protocol
21 @@ -0,0 +1,12 @@
22 +[Protocol]
23 +exec=/usr/bin/spicy --uri="%u"
24 +protocol=spice
25 +input=none
26 +output=none
27 +helper=true
28 +listing=
29 +reading=false
30 +writing=false
31 +makedir=false
32 +deleting=false
33 +
34
35 diff --git a/net-misc/spice-gtk/files/spice.schemas b/net-misc/spice-gtk/files/spice.schemas
36 new file mode 100644
37 index 0000000..43b1217
38 --- /dev/null
39 +++ b/net-misc/spice-gtk/files/spice.schemas
40 @@ -0,0 +1,41 @@
41 +<?xml version="1.0"?>
42 +<gconfschemafile>
43 +<schemalist>
44 +<schema>
45 + <key>/schemas/desktop/gnome/url-handlers/spice/enabled</key>
46 + <applyto>/desktop/gnome/url-handlers/spice/enabled</applyto>
47 + <owner>spice</owner>
48 + <type>bool</type>
49 + <default>true</default>
50 + <locale name="C">
51 + <short>How to handle spice URLs</short>
52 + <long>Set to true to have a program specified in command handle spice URLs</long>
53 + </locale>
54 +</schema>
55 +
56 + <schema>
57 + <key>/schemas/desktop/gnome/url-handlers/spice/command</key>
58 + <applyto>/desktop/gnome/url-handlers/spice/command</applyto>
59 + <owner>spice</owner>
60 + <type>string</type>
61 + <default>/usr/bin/spicy --uri="%s"</default>
62 + <locale name="C">
63 + <short>URL handler for spice URIs</short>
64 + <long>URL handler for spice URIs</long>
65 + </locale>
66 + </schema>
67 +
68 + <schema>
69 + <key>/schemas/desktop/gnome/url-handlers/spice/need-terminal</key>
70 + <applyto>/desktop/gnome/url-handlers/spice/need-terminal</applyto>
71 + <owner>spice</owner>
72 + <type>bool</type>
73 + <default>false</default>
74 + <locale name="C">
75 + <short>Run program in terminal</short>
76 + <long>True if the program to handle this URL should be run in a terminal</long>
77 + </locale>
78 + </schema>
79 +</schemalist>
80 +</gconfschemafile>
81 +
82
83 diff --git a/net-misc/spice-gtk/spice-gtk-9999.ebuild b/net-misc/spice-gtk/spice-gtk-9999.ebuild
84 new file mode 100644
85 index 0000000..59c00c9
86 --- /dev/null
87 +++ b/net-misc/spice-gtk/spice-gtk-9999.ebuild
88 @@ -0,0 +1,119 @@
89 +# Copyright 1999-2011 Gentoo Foundation
90 +# Distributed under the terms of the GNU General Public License v2
91 +# $Header: /var/cvsroot/gentoo-x86/net-misc/spice-gtk/spice-gtk-0.7.ebuild,v 1.2 2011/10/19 08:37:10 dev-zero Exp $
92 +
93 +EAPI=3
94 +GCONF_DEBUG="no"
95 +
96 +inherit eutils python gnome2-utils
97 +if [[ ${PV} = 9999 ]]; then
98 + inherit gnome2-live
99 +fi
100 +
101 +PYTHON_DEPEND="python? 2"
102 +
103 +DESCRIPTION="Set of GObject and Gtk objects for connecting to Spice servers and a client GUI."
104 +HOMEPAGE="http://spice-space.org http://gitorious.org/spice-gtk"
105 +
106 +LICENSE="LGPL-2.1"
107 +SLOT="0"
108 +if [[ ${PV} = 9999 ]]; then
109 + EGIT_REPO_URI="git://anongit.freedesktop.org/spice/${PN}"
110 + KEYWORDS=""
111 +else
112 + SRC_URI="http://spice-space.org/download/gtk/${P}.tar.bz2"
113 + KEYWORDS="~amd64 ~x86"
114 +fi
115 +IUSE="+cairo doc gnome gstreamer gtk3 +introspection kde +pulseaudio python sasl static-libs vala"
116 +
117 +RDEPEND="pulseaudio? ( !gstreamer? ( media-sound/pulseaudio ) )
118 + gstreamer? ( media-libs/gstreamer )
119 + >=app-emulation/spice-protocol-0.9.0
120 + >=x11-libs/pixman-0.17.7
121 + >=media-libs/celt-0.5.1.1:0.5.1
122 + dev-libs/openssl
123 + gtk3? ( x11-libs/gtk+:3[introspection?] )
124 + !gtk3? ( x11-libs/gtk+:2[introspection?] )
125 + >=dev-libs/glib-2.26:2
126 + >=x11-libs/cairo-1.2
127 + virtual/jpeg
128 + sys-libs/zlib
129 + introspection? ( dev-libs/gobject-introspection )
130 + python? ( dev-python/pygtk:2 )
131 + sasl? ( dev-libs/cyrus-sasl )
132 + gnome? ( gnome-base/gconf )"
133 +DEPEND="${RDEPEND}
134 + vala? ( dev-lang/vala:0.14 )
135 + dev-lang/python
136 + dev-lang/perl
137 + dev-perl/Text-CSV
138 + dev-python/pyparsing
139 + dev-util/pkgconfig"
140 +
141 +pkg_setup() {
142 + if use gstreamer && use pulseaudio ; then
143 + ewarn "spice-gtk can use only one audio backend: gstreamer will be used since you enabled both."
144 + fi
145 +}
146 +
147 +src_configure() {
148 + local audio="no"
149 + local gtk="2.0"
150 +
151 + use pulseaudio && audio="pulse"
152 + use gstreamer && audio="gstreamer"
153 + use gtk3 && gtk="3.0"
154 + if use vala ; then
155 + rm -vf gtk/controller/controller.{c,vala.stamp} gtk/controller/menu.c # force vala regen
156 + fi
157 +
158 + # TODO: usbredir support, needs libusbredirhost and newer libusb
159 + econf \
160 + VALAC=$(type -P valac-0.14) \
161 + VAPIGEN=$(type -P vapigen-0.14) \
162 + $(use_enable static-libs static) \
163 + $(use_enable introspection) \
164 + --with-audio="${audio}" \
165 + $(use_with !cairo x11) \
166 + $(use_with python) \
167 + $(use_with sasl) \
168 + $(use_enable vala) \
169 + --with-gtk="${gtk}" \
170 + --disable-smartcard \
171 + --disable-usbredir \
172 + --disable-werror
173 +}
174 +
175 +src_install() {
176 + emake -j1 DESTDIR="${D}" install || die "emake install failed"
177 +
178 + use static-libs || rm -rf "${D}"/usr/lib*/*.la
179 + use python && rm -rf "${D}"/usr/lib*/python*/site-packages/*.la
180 + use doc || rm -rf "${D}/usr/share/gtk-doc"
181 +
182 + dodoc AUTHORS NEWS README TODO
183 +
184 + make_desktop_entry spicy Spicy "" net
185 +
186 + if use gnome ; then
187 + insinto /etc/gconf/schemas
188 + doins "${FILESDIR}/spice.schemas"
189 + fi
190 + if use kde ; then
191 + insinto /usr/share/kde4/services
192 + doins "${FILESDIR}/spice.protocol"
193 + fi
194 +
195 +}
196 +
197 +pkg_preinst() {
198 + use gnome && gnome2_gconf_savelist
199 +}
200 +
201 +pkg_postinst() {
202 + use gnome && gnome2_gconf_install
203 +}
204 +
205 +pkg_prerm() {
206 + use gnome && gnome2_gconf_uninstall
207 +}