summaryrefslogtreecommitdiff
path: root/dev-python/pygoocanvas/pygoocanvas-0.14.1-r1.ebuild
blob: 08f49af5c87c9b873a3a6553a02ff64bd6f7ae9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="5"
GCONF_DEBUG="no"
GNOME2_LA_PUNT="yes"
GNOME_TARBALL_SUFFIX="bz2"
PYTHON_COMPAT=(python2_7 )

inherit gnome2 python-r1

DESCRIPTION="GooCanvas python bindings"
HOMEPAGE="http://live.gnome.org/PyGoocanvas"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc ~sparc x86"
IUSE="doc examples"

RDEPEND="
	>=dev-python/pygobject-2.11.3:2[${PYTHON_USEDEP}]
	>=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
	>=dev-python/pycairo-1.8.4[${PYTHON_USEDEP}]
	>=x11-libs/goocanvas-0.14:0
"
DEPEND="${RDEPEND}
	doc? ( >=dev-util/gtk-doc-1.4 )
	virtual/pkgconfig
"

src_prepare() {
	prepare_binding() {
		mkdir -p "${BUILD_DIR}" || die
	}
	python_foreach_impl prepare_binding
}

src_configure() {
	# docs installs gtk-doc and xsltproc is not actually used
	configure_binding() {
		ECONF_SOURCE="${S}" gnome2_src_configure \
			$(use_enable doc docs) \
			XSLTPROC=$(type -P true)
	}
	python_foreach_impl run_in_build_dir configure_binding
}

src_compile() {
	python_foreach_impl run_in_build_dir gnome2_src_compile
}

src_test() {
	python_foreach_impl run_in_build_dir default
}

src_install() {
	python_foreach_impl run_in_build_dir gnome2_src_install

	dodoc AUTHORS ChangeLog* NEWS

	if use examples; then
		rm demo/Makefile* || die
		cp -R demo "${D}"/usr/share/doc/${PF} || die
	fi
}

run_in_build_dir() {
	pushd "${BUILD_DIR}" > /dev/null || die
	"$@"
	popd > /dev/null
}