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-libs/gtk-vnc/, net-libs/gtk-vnc/files/
Date: Tue, 15 Nov 2011 01:32:15
Message-Id: c70abea24cb4bb1873fe88bc38c0feb7abe687d0.nirbheek@gentoo
1 commit: c70abea24cb4bb1873fe88bc38c0feb7abe687d0
2 Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 7 06:12:53 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=c70abea2
7
8 net-libs/gtk-vnc: add live ebuild
9
10 ---
11 .../files/gtk-vnc-0.4.3-outoftree-build.patch | 21 +++
12 net-libs/gtk-vnc/gtk-vnc-9999.ebuild | 153 ++++++++++++++++++++
13 2 files changed, 174 insertions(+), 0 deletions(-)
14
15 diff --git a/net-libs/gtk-vnc/files/gtk-vnc-0.4.3-outoftree-build.patch b/net-libs/gtk-vnc/files/gtk-vnc-0.4.3-outoftree-build.patch
16 new file mode 100644
17 index 0000000..36a3a3a
18 --- /dev/null
19 +++ b/net-libs/gtk-vnc/files/gtk-vnc-0.4.3-outoftree-build.patch
20 @@ -0,0 +1,21 @@
21 +diff --git a/src/Makefile.am b/src/Makefile.am
22 +index 37f8444..2f72fa6 100644
23 +--- a/src/Makefile.am
24 ++++ b/src/Makefile.am
25 +@@ -279,14 +279,14 @@ GVNC_INTROSPECTION_SRCS = \
26 + $(srcdir)/vnccolormap.h $(srcdir)/vnccolormap.c \
27 + $(srcdir)/vnccursor.h $(srcdir)/vnccursor.c \
28 + $(srcdir)/vncconnection.h $(srcdir)/vncconnection.c \
29 +- $(builddir)/vncconnectionenums.h $(builddir)/vncconnectionenums.c \
30 ++ $(srcdir)/vncconnectionenums.h $(srcdir)/vncconnectionenums.c \
31 + $(srcdir)/vncutil.h $(srcdir)/vncutil.c
32 +
33 + GTK_VNC_INTROSPECTION_SRCS = \
34 + $(srcdir)/vnccairoframebuffer.h $(srcdir)/vnccairoframebuffer.c \
35 + $(srcdir)/vncdisplay.h $(srcdir)/vncdisplay.c \
36 + $(srcdir)/vncgrabsequence.h $(srcdir)/vncgrabsequence.c \
37 +- $(builddir)/vncdisplayenums.h $(builddir)/vncdisplayenums.c
38 ++ $(srcdir)/vncdisplayenums.h $(srcdir)/vncdisplayenums.c
39 +
40 + if HAVE_GTK_2
41 + GTK_VNC_INTROSPECTION_SRCS += \
42
43 diff --git a/net-libs/gtk-vnc/gtk-vnc-9999.ebuild b/net-libs/gtk-vnc/gtk-vnc-9999.ebuild
44 new file mode 100644
45 index 0000000..653531e
46 --- /dev/null
47 +++ b/net-libs/gtk-vnc/gtk-vnc-9999.ebuild
48 @@ -0,0 +1,153 @@
49 +# Copyright 1999-2011 Gentoo Foundation
50 +# Distributed under the terms of the GNU General Public License v2
51 +# $Header: /var/cvsroot/gentoo-x86/net-libs/gtk-vnc/gtk-vnc-0.4.3-r1.ebuild,v 1.6 2011/10/30 17:24:14 armin76 Exp $
52 +
53 +EAPI="3"
54 +GNOME2_LA_PUNT="yes"
55 +GNOME_TARBALL_SUFFIX="xz"
56 +
57 +inherit autotools eutils base gnome.org python
58 +if [[ ${PV} = 9999 ]]; then
59 + inherit gnome2-live
60 +fi
61 +
62 +DESCRIPTION="VNC viewer widget for GTK"
63 +HOMEPAGE="http://live.gnome.org/gtk-vnc"
64 +
65 +LICENSE="GPL-2"
66 +SLOT="0"
67 +if [[ ${PV} = 9999 ]]; then
68 + KEYWORDS=""
69 +else
70 + KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd"
71 +fi
72 +IUSE="examples +gtk3 +introspection python sasl +vala"
73 +
74 +# libview is used in examples/gvncviewer -- no need
75 +# TODO: review nsplugin when it will be considered less experimental
76 +
77 +COMMON_DEPEND=">=dev-libs/glib-2.10:2
78 + >=net-libs/gnutls-1.4
79 + >=x11-libs/cairo-1.2
80 + >=x11-libs/gtk+-2.18:2
81 + x11-libs/libX11
82 + gtk3? ( >=x11-libs/gtk+-2.91.3:3 )
83 + introspection? ( >=dev-libs/gobject-introspection-0.9.4 )
84 + python? ( >=dev-python/pygtk-2:2 )
85 + sasl? ( dev-libs/cyrus-sasl )"
86 +RDEPEND="${COMMON_DEPEND}"
87 +DEPEND="${COMMON_DEPEND}
88 + >=dev-lang/perl-5
89 + dev-util/pkgconfig
90 + sys-devel/gettext
91 + >=dev-util/intltool-0.40
92 + vala? (
93 + dev-lang/vala:0.14
94 + >=dev-libs/gobject-introspection-0.9.4 )"
95 +
96 +if [[ ${PV} = 9999 ]]; then
97 + # Needed by src/keymap-gen.pl to autogenerate keymap .c/.h files
98 + # Not needed in the tarball because they're created during distcheck
99 + DEPEND="${DEPEND}
100 + dev-perl/Text-CSV"
101 +fi
102 +
103 +GTK2_BUILDDIR="${WORKDIR}/${P}_gtk2"
104 +GTK3_BUILDDIR="${WORKDIR}/${P}_gtk3"
105 +
106 +pkg_setup() {
107 + python_set_active_version 2
108 +}
109 +
110 +src_prepare() {
111 + python_convert_shebangs -r 2 .
112 + mkdir "${GTK2_BUILDDIR}" || die
113 + mkdir "${GTK3_BUILDDIR}" || die
114 +
115 + # Remove a few files that were autogenerated during distcheck.
116 + # Having these around in srcdir breaks out of tree build since they're
117 + # expected to be in builddir, which is correct for trunk builds since
118 + # they're generated files, not source files. Funny false dichotomy.
119 + rm -vf "${S}"/src/{vncconnectionenums.[ch],vncdisplayenums.[ch]}
120 +
121 + # Fix incorrect codegendir check: h2def.py is in pygobject, not pygtk
122 + sed -e 's/codegendir pygtk-2.0/codegendir pygobject-2.0/g' \
123 + -i src/Makefile.* || die
124 +
125 + gnome2_src_prepare
126 +}
127 +
128 +src_configure() {
129 + local myconf
130 + myconf="
131 + $(use_with examples) \
132 + $(use_enable vala) \
133 + $(use_enable vala introspection) \
134 + $(use_enable introspection) \
135 + $(use_with sasl) \
136 + VAPIGEN=$(type -P vapigen-0.14) \
137 + --with-coroutine=gthread \
138 + --without-libview \
139 + --disable-static"
140 +
141 + cd ${GTK2_BUILDDIR}
142 + einfo "Running configure in ${GTK2_BUILDDIR}"
143 + ECONF_SOURCE="${S}" econf ${myconf} \
144 + $(use_with python) \
145 + --with-gtk=2.0
146 +
147 + if use gtk3; then
148 + cd ${GTK3_BUILDDIR}
149 + einfo "Running configure in ${GTK3_BUILDDIR}"
150 + # Python support is via gobject-introspection
151 + # Ex: from gi.repository import GtkVnc
152 + ECONF_SOURCE="${S}" econf ${myconf} \
153 + --with-python=no \
154 + --with-gtk=3.0
155 + fi
156 +}
157 +
158 +src_compile() {
159 + cd ${GTK2_BUILDDIR}
160 + einfo "Running make in ${GTK2_BUILDDIR}"
161 + emake || die
162 +
163 + if use gtk3; then
164 + cd ${GTK3_BUILDDIR}
165 + einfo "Running make in ${GTK3_BUILDDIR}"
166 + emake || die
167 + fi
168 +}
169 +
170 +src_test() {
171 + cd ${GTK2_BUILDDIR}
172 + einfo "Running make check in ${GTK2_BUILDDIR}"
173 + emake check || die
174 +
175 + if use gtk3; then
176 + cd ${GTK3_BUILDDIR}
177 + einfo "Running make check in ${GTK3_BUILDDIR}"
178 + emake check || die
179 + fi
180 +}
181 +
182 +src_install() {
183 + dodoc AUTHORS ChangeLog NEWS README || die
184 +
185 + cd ${GTK2_BUILDDIR}
186 + einfo "Running make install in ${GTK2_BUILDDIR}"
187 + # bug #328273
188 + MAKEOPTS="${MAKEOPTS} -j1" base_src_install
189 +
190 + if use gtk3; then
191 + cd ${GTK3_BUILDDIR}
192 + einfo "Running make install in ${GTK3_BUILDDIR}"
193 + # bug #328273
194 + MAKEOPTS="${MAKEOPTS} -j1" base_src_install
195 + fi
196 +
197 + python_clean_installation_image
198 +
199 + # Remove .la files
200 + find "${ED}" -name '*.la' -exec rm -f '{}' + || die
201 +}