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

Contents of /net-libs/gtk-vnc/gtk-vnc-0.5.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Oct 28 16:23:43 2012 UTC (23 months ago) by armin76
Branch: MAIN
Changes since 1.7: +2 -2 lines
ia64/sparc stable wrt #427544

(Portage version: 2.1.11.9/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20