/[gentoo-x86]/net-libs/gtk-vnc/gtk-vnc-0.5.0-r1.ebuild
Gentoo

Contents of /net-libs/gtk-vnc/gtk-vnc-0.5.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Jul 15 18:14:28 2012 UTC (2 years, 2 months ago) by armin76
Branch: MAIN
Changes since 1.7: +2 -2 lines
alpha/ia64/sparc stable wrt #410611

(Portage version: 2.1.11.5/cvs/Linux ia64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-libs/gtk-vnc/gtk-vnc-0.5.0-r1.ebuild,v 1.7 2012/07/02 18:49:36 pacho Exp $
4
5 EAPI="4"
6
7 PYTHON_DEPEND="python? 2"
8
9 inherit autotools base eutils gnome.org python
10
11 DESCRIPTION="VNC viewer widget for GTK"
12 HOMEPAGE="http://live.gnome.org/gtk-vnc"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd"
17 IUSE="examples gtk3 +introspection pulseaudio python sasl vala"
18
19 # libview is used in examples/gvncviewer -- no need
20 # glib-2.30.1 needed to avoid linking failure due to .la files (bug #399129)
21 # TODO: review nsplugin when it will be considered less experimental
22 # XXX: automagic pulseaudio. Is it worth patching?
23 COMMON_DEPEND=">=dev-libs/glib-2.30.1:2
24 >=dev-libs/libgcrypt-1.4.2
25 dev-libs/libgpg-error
26 >=net-libs/gnutls-1.4
27 >=x11-libs/cairo-1.2
28 >=x11-libs/gtk+-2.18:2
29 x11-libs/libX11
30 gtk3? ( >=x11-libs/gtk+-2.91.3:3 )
31 introspection? ( >=dev-libs/gobject-introspection-0.9.4 )
32 pulseaudio? ( media-sound/pulseaudio )
33 python? ( >=dev-python/pygtk-2:2 )
34 sasl? ( dev-libs/cyrus-sasl )"
35 RDEPEND="${COMMON_DEPEND}"
36 DEPEND="${COMMON_DEPEND}
37 >=dev-lang/perl-5
38 virtual/pkgconfig
39 sys-devel/gettext
40 >=dev-util/intltool-0.40
41
42 gnome-base/gnome-common
43
44 vala? (
45 dev-lang/vala:0.14[vapigen]
46 >=dev-libs/gobject-introspection-0.9.4 )
47 "
48 # eautoreconf requires gnome-common
49
50 GTK2_BUILDDIR="${WORKDIR}/${P}_gtk2"
51 GTK3_BUILDDIR="${WORKDIR}/${P}_gtk3"
52
53 pkg_setup() {
54 python_set_active_version 2
55 python_pkg_setup
56
57 if use vala && ! use gtk3; then
58 ewarn "You must set USE=gtk3 to enable vala bindings support."
59 fi
60 }
61
62 src_prepare() {
63 # https://bugzilla.gnome.org/show_bug.cgi?id=667943
64 epatch "${FILESDIR}/${PN}-0.5.0-pod.patch"
65
66 # bug #399111, https://bugzilla.gnome.org/show_bug.cgi?id=673570
67 # requires eautoreconf
68 epatch "${FILESDIR}/${PN}-0.5.0-pulseaudio-automagic.patch"
69
70 python_convert_shebangs -r 2 .
71 mkdir "${GTK2_BUILDDIR}" || die
72 mkdir "${GTK3_BUILDDIR}" || die
73
74 # Remove a few files that were autogenerated during distcheck.
75 # Having these around in srcdir breaks out of tree build since they're
76 # expected to be in builddir, which is correct for trunk builds since
77 # they're generated files, not source files. Funny false dichotomy.
78 rm -vf "${S}"/src/{vncconnectionenums.[ch],vncdisplayenums.[ch]}
79
80 # Fix incorrect codegendir check: h2def.py is in pygobject, not pygtk
81 sed -e 's/codegendir pygtk-2.0/codegendir pygobject-2.0/g' \
82 -i src/Makefile.* || die
83
84 eautoreconf
85
86 # Work around https://bugzilla.gnome.org/show_bug.cgi?id=667941
87 [[ -e GNUmakefile ]] || touch GNUmakefile
88 }
89
90 src_configure() {
91 local myconf
92 myconf="
93 $(use_with examples) \
94 $(use_enable introspection) \
95 $(use_with pulseaudio) \
96 $(use_with sasl) \
97 --with-coroutine=gthread \
98 --without-libview \
99 --disable-static \
100 --disable-vala"
101
102 cd ${GTK2_BUILDDIR}
103 einfo "Running configure in ${GTK2_BUILDDIR}"
104 ECONF_SOURCE="${S}" econf ${myconf} \
105 $(use_with python) \
106 --with-gtk=2.0
107
108 if use gtk3; then
109 if use vala; then
110 myconf="${myconf} \
111 --enable-introspection \
112 --enable-vala \
113 VAPIGEN=$(type -p vapigen-0.14)"
114 fi
115
116 cd ${GTK3_BUILDDIR}
117 einfo "Running configure in ${GTK3_BUILDDIR}"
118 # Python support is via gobject-introspection
119 # Ex: from gi.repository import GtkVnc
120 ECONF_SOURCE="${S}" econf ${myconf} \
121 --with-python=no \
122 --with-gtk=3.0
123 fi
124 }
125
126 src_compile() {
127 cd ${GTK2_BUILDDIR}
128 einfo "Running make in ${GTK2_BUILDDIR}"
129 # Work around https://bugzilla.gnome.org/show_bug.cgi?id=667941
130 rm GNUmakefile
131 emake
132
133 if use gtk3; then
134 cd ${GTK3_BUILDDIR}
135 einfo "Running make in ${GTK3_BUILDDIR}"
136 # Work around https://bugzilla.gnome.org/show_bug.cgi?id=667941
137 rm GNUmakefile
138 emake
139 fi
140 }
141
142 src_test() {
143 cd ${GTK2_BUILDDIR}
144 einfo "Running make check in ${GTK2_BUILDDIR}"
145 emake check
146
147 if use gtk3; then
148 cd ${GTK3_BUILDDIR}
149 einfo "Running make check in ${GTK3_BUILDDIR}"
150 emake check
151 fi
152 }
153
154 src_install() {
155 dodoc AUTHORS ChangeLog NEWS README
156
157 cd ${GTK2_BUILDDIR}
158 einfo "Running make install in ${GTK2_BUILDDIR}"
159 # bug #328273, try again parallel installation in next testing version
160 MAKEOPTS="${MAKEOPTS} -j1" base_src_install
161
162 if use gtk3; then
163 cd ${GTK3_BUILDDIR}
164 einfo "Running make install in ${GTK3_BUILDDIR}"
165 # bug #328273
166 MAKEOPTS="${MAKEOPTS} -j1" base_src_install
167 fi
168
169 python_clean_installation_image
170
171 # Remove .la files
172 find "${ED}" -name '*.la' -exec rm -f '{}' + || die
173 }

  ViewVC Help
Powered by ViewVC 1.1.20