summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJim Ramsay <lack@gentoo.org>2010-03-26 18:40:26 +0000
committerJim Ramsay <lack@gentoo.org>2010-03-26 18:40:26 +0000
commit1c8609102dd0b6016a0edb5d16374a256d6d5694 (patch)
treeec56979865c01aafdbd269194e9b1bdc46d632f4 /eclass
parentVersion bump. (diff)
downloadhistorical-1c8609102dd0b6016a0edb5d16374a256d6d5694.tar.gz
historical-1c8609102dd0b6016a0edb5d16374a256d6d5694.tar.bz2
historical-1c8609102dd0b6016a0edb5d16374a256d6d5694.zip
Fix for bug #311175 and bug #311179: Clean up python support
app-editors/vim and app-editors/gvim both rely completely on vim.eclass, so this is the place to ensure we only use python2, since vim does not yet support python3.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/vim.eclass32
1 files changed, 18 insertions, 14 deletions
diff --git a/eclass/vim.eclass b/eclass/vim.eclass
index c7fd7a3a1adf..e6f4f79b6d6e 100644
--- a/eclass/vim.eclass
+++ b/eclass/vim.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.181 2010/03/23 16:02:36 darkside Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.182 2010/03/26 18:40:26 lack Exp $
# Authors:
# Jim Ramsay <i.am@gentoo.org>
@@ -22,7 +22,12 @@
# -aqua -gtk -motif nextaw NEXTAW
# -aqua -gtk -motif -nextaw ATHENA
-inherit eutils vim-doc flag-o-matic versionator fdo-mime bash-completion prefix
+if [[ ${MY_PN} != "vim-core" ]] ; then
+ # vim supports python-2 only
+ PYTHON_DEPEND="python? 2"
+ PYTHON_USE_WITH="threads"
+fi
+inherit eutils vim-doc flag-o-matic versionator fdo-mime bash-completion prefix python
HOMEPAGE="http://www.vim.org/"
SLOT="0"
@@ -75,26 +80,18 @@ if [[ ${MY_PN} == "vim-core" ]] ; then
else
IUSE="${IUSE} cscope debug gpm perl python ruby"
- if [[ $HAS_USE_DEP ]]; then
- PYTHON_DEP="python? ( dev-lang/python[threads] )"
- else
- PYTHON_DEP="python? ( dev-lang/python )"
- fi
-
DEPEND="${DEPEND}
cscope? ( dev-util/cscope )
gpm? ( >=sys-libs/gpm-1.19.3 )
perl? ( dev-lang/perl )
acl? ( kernel_linux? ( sys-apps/acl ) )
- ruby? ( virtual/ruby )
- ${PYTHON_DEP}"
+ ruby? ( virtual/ruby )"
RDEPEND="${RDEPEND}
cscope? ( dev-util/cscope )
gpm? ( >=sys-libs/gpm-1.19.3 )
perl? ( dev-lang/perl )
acl? ( kernel_linux? ( sys-apps/acl ) )
ruby? ( virtual/ruby )
- ${PYTHON_DEP}
!<app-vim/align-30-r1
!app-vim/vimspell
!<app-vim/vimbuddy-0.9.1-r1
@@ -240,9 +237,16 @@ vim_pkg_setup() {
mkdir -p "${T}/home"
export HOME="${T}/home"
- # [g]vim needs dev-lang/python[threads]
- if [[ ${MY_PN} != "vim-core" ]] && use python && ! built_with_use dev-lang/python threads; then
- die "You must build dev-lang/python with USE=threads"
+ if [[ ${MY_PN} != "vim-core" ]] && use python; then
+ # vim supports python-2 only
+ python_set_active_version 2
+ if [[ $HAS_USE_DEP ]]; then
+ # python.eclass only defines python_pkg_setup for EAPIs that support
+ # USE dependencies
+ python_pkg_setup
+ elif ! built_with_use =dev-lang/python-2* threads; then
+ die "You must build dev-lang/python with USE=threads"
+ fi
fi
}