Add EROOT (EAPI3) support to vim-doc & vim-spell eclasses
authorJeremy Olexa <darkside@gentoo.org>
Fri, 23 Apr 2010 19:01:37 +0000 (19:01 +0000)
committerJeremy Olexa <darkside@gentoo.org>
Fri, 23 Apr 2010 19:01:37 +0000 (19:01 +0000)
eclass/vim-doc.eclass
eclass/vim-spell.eclass

index 62a859be0aeae0d16647d3c96e06ffab8f7d64f3..c2c5f7cc42ccd64d45224740fc8c2ed739012ba0 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim-doc.eclass,v 1.15 2007/05/14 20:04:07 pioto Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim-doc.eclass,v 1.16 2010/04/23 19:01:37 darkside Exp $
 #
 # This eclass is used by vim.eclass and vim-plugin.eclass to update
 # the documentation tags.  This is necessary since vim doesn't look in
 
 
 update_vim_helptags() {
+       has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
        local vimfiles vim d s
 
        # This is where vim plugins are installed
-       vimfiles="${ROOT}"/usr/share/vim/vimfiles
+       vimfiles="${EROOT}"/usr/share/vim/vimfiles
 
        if [[ $PN != vim-core ]]; then
                # Find a suitable vim binary for updating tags :helptags
@@ -37,7 +38,7 @@ update_vim_helptags() {
 
        # Install the documentation symlinks into the versioned vim
        # directory and run :helptags
-       for d in "${ROOT}"/usr/share/vim/vim[0-9]*; do
+       for d in "${EROOT%/}"/usr/share/vim/vim[0-9]*; do
                [[ -d "$d/doc" ]] || continue   # catch a failed glob
 
                # Remove links, and possibly remove stale dirs
index b6b6a8b66f0d17d5b448c62de606446c0efcc706..ff00b93e6e439e77f328453a2418b56ac5cffa1d 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.7 2009/07/07 18:54:05 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.8 2010/04/23 19:01:37 darkside Exp $
 
 #
 # Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
@@ -105,6 +105,7 @@ vim-spell_src_install() {
 }
 
 vim-spell_pkg_postinst() {
+       has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
        target="/usr/share/vim/vimfiles/spell/"
        echo
        elog "To enable ${VIM_SPELL_LANGUAGE} spell checking, use"
@@ -112,7 +113,7 @@ vim-spell_pkg_postinst() {
        echo
        elog "The following (Vim internal, not file) encodings are supported for"
        elog "this language:"
-       for f in "${ROOT}/${target}/${VIM_SPELL_CODE}".*.spl ; do
+       for f in "${EROOT}/${target}/${VIM_SPELL_CODE}".*.spl ; do
                enc="${f##*/${VIM_SPELL_CODE}.}"
                enc="${enc%.spl}"
                [[ -z "${enc}" ]] && continue