OLD | NEW |
(Empty) | |
| 1 # Copyright 1999-2010 Gentoo Foundation |
| 2 # Distributed under the terms of the GNU General Public License v2 |
| 3 # $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-python/eselect-python-20100
321.ebuild,v 1.6 2010/06/19 17:06:00 armin76 Exp $ |
| 4 |
| 5 EAPI="1" |
| 6 |
| 7 inherit toolchain-funcs |
| 8 |
| 9 DESCRIPTION="Eselect module for management of multiple Python versions" |
| 10 HOMEPAGE="http://www.gentoo.org" |
| 11 SRC_URI="mirror://gentoo/${P}.tar.bz2" |
| 12 |
| 13 LICENSE="GPL-2" |
| 14 SLOT="0" |
| 15 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~spar
c-fbsd ~x86-fbsd" |
| 16 IUSE="" |
| 17 |
| 18 RDEPEND=">=app-admin/eselect-1.2.3" |
| 19 DEPEND="${RDEPEND} |
| 20 sys-devel/autoconf |
| 21 >=sys-devel/gcc-3.4" |
| 22 |
| 23 pkg_setup() { |
| 24 if [[ $(gcc-major-version) -lt 3 || ($(gcc-major-version) -eq 3 && $(gcc
-minor-version) -lt 4) ]]; then |
| 25 die "GCC >=3.4 is required" |
| 26 fi |
| 27 } |
| 28 |
| 29 src_unpack() { |
| 30 unpack ${A} |
| 31 cd "${S}" |
| 32 ./autogen.sh || die "autogen.sh failed" |
| 33 } |
| 34 |
| 35 src_install() { |
| 36 keepdir /etc/env.d/python |
| 37 emake DESTDIR="${D}" install || die "emake install failed" |
| 38 } |
| 39 |
| 40 pkg_preinst() { |
| 41 if has_version "<${CATEGORY}/${PN}-20090804" || ! has_version "${CATEGOR
Y}/${PN}"; then |
| 42 run_eselect_python_update="1" |
| 43 fi |
| 44 } |
| 45 |
| 46 pkg_postinst() { |
| 47 if [[ "${run_eselect_python_update}" == "1" ]]; then |
| 48 ebegin "Running \`eselect python update\`" |
| 49 eselect python update --python2 > /dev/null |
| 50 eend "$?" |
| 51 fi |
| 52 } |
OLD | NEW |