Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [python-single-r1 3/3] An example conversion of ebuild to python-single-r1.
Date: Wed, 21 Nov 2012 22:20:26
Message-Id: 1353536380-9766-3-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [python-single-r1 1/3] A conceptual eclass for packages not supporting multiple Python impls. by "Michał Górny"
1 ---
2 gx86/net-libs/libproxy/libproxy-0.4.10-r1.ebuild | 20 +++++++++-----------
3 1 file changed, 9 insertions(+), 11 deletions(-)
4
5 diff --git a/gx86/net-libs/libproxy/libproxy-0.4.10-r1.ebuild b/gx86/net-libs/libproxy/libproxy-0.4.10-r1.ebuild
6 index 1ed3336..acaee2d 100644
7 --- a/gx86/net-libs/libproxy/libproxy-0.4.10-r1.ebuild
8 +++ b/gx86/net-libs/libproxy/libproxy-0.4.10-r1.ebuild
9 @@ -3,9 +3,12 @@
10 # $Header: /var/cvsroot/gentoo-x86/net-libs/libproxy/libproxy-0.4.10-r1.ebuild,v 1.9 2012/11/21 21:49:49 maekke Exp $
11
12 EAPI=4
13 -PYTHON_DEPEND="python? 2:2.6"
14 +PYTHON_COMPAT=( python{2_6,2_7} )
15
16 -inherit cmake-utils eutils mono python
17 +# Note 1: this is actually a poor example. AFAICS libproxy should be
18 +# capable of being built for multiple implementations.
19 +
20 +inherit cmake-utils eutils mono python-single-r1
21
22 DESCRIPTION="Library for automatic proxy configuration management"
23 HOMEPAGE="http://code.google.com/p/libproxy/"
24 @@ -23,6 +26,7 @@ RDEPEND="gnome? ( >=dev-libs/glib-2.26:2 )
25 mono? ( dev-lang/mono )
26 networkmanager? ( net-misc/networkmanager )
27 perl? ( dev-lang/perl )
28 + python? ( ${PYTHON_DEPS} )
29 spidermonkey? ( >=dev-lang/spidermonkey-1.8.5 )
30 webkit? ( >=net-libs/webkit-gtk-1.6:3 )"
31 DEPEND="${RDEPEND}
32 @@ -33,8 +37,7 @@ pkg_setup() {
33 DOCS="AUTHORS ChangeLog NEWS README"
34
35 if use python; then
36 - python_set_active_version 2
37 - python_pkg_setup
38 + python-single-r1_pkg_setup
39 fi
40 }
41
42 @@ -69,10 +72,5 @@ src_configure() {
43 cmake-utils_src_configure
44 }
45
46 -pkg_postinst() {
47 - use python && python_mod_optimize ${PN}.py
48 -}
49 -
50 -pkg_postrm() {
51 - use python && python_mod_cleanup ${PN}.py
52 -}
53 +# Note 2: build system doesn't compile Python files.
54 +# TODO: Introduce a public function to do that.
55 --
56 1.8.0