OLD | NEW |
(Empty) | |
| 1 # Copyright 1999-2009 Gentoo Foundation |
| 2 # Distributed under the terms of the GNU General Public License v2 |
| 3 # $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/pygobject-2.18.0.ebuild,
v 1.10 2009/08/19 16:30:10 jer Exp $ |
| 4 |
| 5 inherit alternatives autotools gnome2 python virtualx |
| 6 |
| 7 DESCRIPTION="GLib's GObject library bindings for Python" |
| 8 HOMEPAGE="http://www.pygtk.org/" |
| 9 |
| 10 LICENSE="LGPL-2.1" |
| 11 SLOT="2" |
| 12 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" |
| 13 IUSE="doc examples libffi test" |
| 14 |
| 15 RDEPEND=">=dev-lang/python-2.4.4-r5 |
| 16 >=dev-libs/glib-2.16 |
| 17 !<dev-python/pygtk-2.13 |
| 18 libffi? ( virtual/libffi )" |
| 19 DEPEND="${RDEPEND} |
| 20 doc? ( dev-libs/libxslt >=app-text/docbook-xsl-stylesheets-1.70.1 ) |
| 21 test? ( media-fonts/font-cursor-misc media-fonts/font-misc-misc ) |
| 22 >=dev-util/pkgconfig-0.12.0" |
| 23 |
| 24 DOCS="AUTHORS ChangeLog* NEWS README" |
| 25 |
| 26 pkg_setup() { |
| 27 G2CONF="${G2CONF} |
| 28 --disable-dependency-tracking |
| 29 $(use_enable doc docs) |
| 30 $(use_with libffi ffi)" |
| 31 } |
| 32 |
| 33 src_unpack() { |
| 34 gnome2_src_unpack |
| 35 |
| 36 # Fix FHS compliance, see upstream bug #535524 |
| 37 epatch "${FILESDIR}/${PN}-2.15.4-fix-codegen-location.patch" |
| 38 |
| 39 # Do not build tests if unneeded, bug #226345 |
| 40 epatch "${FILESDIR}"/${P}-make_check.patch |
| 41 |
| 42 # Do not install files twice, bug #279813 |
| 43 epatch "${FILESDIR}/${P}-automake111.patch" |
| 44 |
| 45 # For cross-compilation we need to compile the constant |
| 46 # generation for the HOST architecture while using the |
| 47 # target headers. |
| 48 if tc-is-cross-compiler ; then |
| 49 epatch "${FILESDIR}/${P}-cross-generate-constants.patch" |
| 50 fi |
| 51 |
| 52 |
| 53 # needed to build on a libtool-1 system, bug #255542 |
| 54 rm m4/lt* m4/libtool.m4 ltmain.sh |
| 55 |
| 56 # disable pyc compiling |
| 57 mv py-compile py-compile.orig |
| 58 ln -s $(type -P true) py-compile |
| 59 |
| 60 eautoreconf |
| 61 } |
| 62 |
| 63 src_test() { |
| 64 unset DBUS_SESSION_BUS_ADDRESS |
| 65 Xemake check || die "tests failed" |
| 66 } |
| 67 |
| 68 src_install() { |
| 69 gnome2_src_install |
| 70 |
| 71 if use examples; then |
| 72 insinto /usr/share/doc/${P} |
| 73 doins -r examples |
| 74 fi |
| 75 |
| 76 python_version |
| 77 mv "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py \ |
| 78 "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.py-2
.0 |
| 79 mv "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth \ |
| 80 "${D}"/usr/$(get_libdir)/python${PYVER}/site-packages/pygtk.pth-
2.0 |
| 81 } |
| 82 |
| 83 pkg_postinst() { |
| 84 python_version |
| 85 python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/gtk-
2.0 |
| 86 alternatives_auto_makesym /usr/$(get_libdir)/python${PYVER}/site-package
s/pygtk.py pygtk.py-[0-9].[0-9] |
| 87 alternatives_auto_makesym /usr/$(get_libdir)/python${PYVER}/site-package
s/pygtk.pth pygtk.pth-[0-9].[0-9] |
| 88 python_mod_compile /usr/$(get_libdir)/python${PYVER}/site-packages/pygtk
.py |
| 89 python_need_rebuild |
| 90 } |
| 91 |
| 92 pkg_postrm() { |
| 93 python_version |
| 94 python_mod_cleanup |
| 95 } |
OLD | NEW |