Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2008 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: $ |
4 |
|
5 |
# |
6 |
# Original Author: Jim Ramsay <lack@gentoo.org> |
7 |
# Purpose: Centralizes functions needed to split up the huge |
8 |
# 'gnome-python-desktop' package into its constituent bindings |
9 |
# |
10 |
# Important enviroment variables: |
11 |
# |
12 |
# MY_BINDING: The actual '--enable-<binding>' name, which by default is ${PN} |
13 |
# excluding the last -python (our convention). May be overridden if |
14 |
# necessary. |
15 |
# |
16 |
|
17 |
inherit gnome2 python eutils autotools |
18 |
|
19 |
MY_BINDING=${PN%-*} |
20 |
MY_PN="gnome-python-desktop" |
21 |
DESCRIPTION="Provides python interfacing modules for some GNOME desktop libraries" |
22 |
HOMEPAGE="http://pygtk.org/" |
23 |
PVP=(${PV//[-\._]/ }) |
24 |
SRC_URI="mirror://gnome/sources/${MY_PN}/${PVP[0]}.${PVP[1]}/${MY_PN}-${PV}.tar.bz2 |
25 |
http://nemesis.accosted.net/downloads/${MY_PN}-${PV}-split.patch.gz" |
26 |
|
27 |
LICENSE="LGPL-2.1 GPL-2" |
28 |
SLOT="0" |
29 |
|
30 |
RDEPEND="virtual/python |
31 |
>=dev-python/pygtk-2.10.3 |
32 |
>=dev-libs/glib-2.6.0 |
33 |
>=x11-libs/gtk+-2.4.0 |
34 |
>=dev-python/gnome-python-2.10.0 |
35 |
!<dev-python/gnome-python-extras-2.13" |
36 |
DEPEND="${RDEPEND} |
37 |
>=dev-util/pkgconfig-0.7 |
38 |
=dev-python/gnome-python-desktop-base-${PV}" |
39 |
|
40 |
DOCS="AUTHORS ChangeLog INSTALL* MAINTAINERS NEWS README" |
41 |
|
42 |
S="${WORKDIR}/${MY_PN}-${PV}" |
43 |
|
44 |
gnome-python-desktop_src_unpack() { |
45 |
unpack ${A} |
46 |
cd "${S}" |
47 |
epatch "${WORKDIR}/gnome-python-desktop-${PV}-split.patch" |
48 |
# the .pc file is installed by gnome-python-desktop-data |
49 |
sed -i '/pkgconfig_DATA/d' Makefile.am || die "sed failed" |
50 |
eautoreconf |
51 |
} |
52 |
|
53 |
gnome-python-desktop_src_compile() { |
54 |
G2CONF="${G2CONF} --disable-allbindings --enable-${MY_BINDING}" |
55 |
gnome2_src_compile |
56 |
} |
57 |
|
58 |
gnome-python-desktop_src_install() { |
59 |
gnome2_src_install |
60 |
} |
61 |
|
62 |
gnome-python-desktop_src_test() { |
63 |
Xemake check || die "tests failed" |
64 |
} |
65 |
|
66 |
gnome-python-desktop_pkg_postinst() { |
67 |
python_version |
68 |
python_mod_optimize "${ROOT}/usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0" |
69 |
} |
70 |
|
71 |
gnome-python-desktop_pkg_postrm() { |
72 |
python_version |
73 |
python_mod_cleanup |
74 |
} |
75 |
|
76 |
EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm |