/[gentoo-x86]/eclass/vim-spell.eclass
Gentoo

Diff of /eclass/vim-spell.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1.1.1 Revision 1.2
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.1.1.1 2005/11/30 09:59:18 chriswhite Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.2 2005/09/28 19:13:13 ciaranm Exp $
4 4
5# 5#
6# Original Author: Ciaran McCreesh <ciaranm@gentoo.org> 6# Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
7# Maintainers: Vim Herd <vim@gentoo.org> 7# Maintainers: Vim Herd <vim@gentoo.org>
8# Purpose: Simplify installing spell files for vim7 8# Purpose: Simplify installing spell files for vim7
53# If there isn't an upstream-provided pregenerated spell file for your language 53# If there isn't an upstream-provided pregenerated spell file for your language
54# yet, read :help spell.txt from inside vim7 for instructions on how to create 54# yet, read :help spell.txt from inside vim7 for instructions on how to create
55# spell files. It's best to let upstream know if you've generated spell files 55# spell files. It's best to let upstream know if you've generated spell files
56# for another language rather than keeping them Gentoo-specific. 56# for another language rather than keeping them Gentoo-specific.
57 57
58inherit eutils
59
60EXPORT_FUNCTIONS src_install pkg_postinst 58EXPORT_FUNCTIONS src_install
61 59
62IUSE="" 60IUSE=""
63DEPEND="|| ( >=app-editors/vim-7_alpha 61DEPEND="|| ( >=app-editors/vim-7_alpha
64 >=app-editors/gvim-7_alpha )" 62 >=app-editors/gvim-7_alpha )"
65RDEPEND="${DEPEND}" 63RDEPEND="${DEPEND}"
68 66
69if [[ -z "${VIM_SPELL_CODE}" ]] ; then 67if [[ -z "${VIM_SPELL_CODE}" ]] ; then
70 VIM_SPELL_CODE="${PN/vim-spell-/}" 68 VIM_SPELL_CODE="${PN/vim-spell-/}"
71fi 69fi
72 70
71if [[ -z "${DESCRIPTION}" ]] ; then
73DESCRIPTION="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_CODE})" 72 DESCRIPTION="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_CODE})"
73fi
74 74
75if [[ -z "${HOMEPAGE}" ]] ; then 75if [[ -z "${HOMEPAGE}" ]] ; then
76 HOMEPAGE="http://www.vim.org/" 76 HOMEPAGE="http://www.vim.org/"
77fi 77fi
78 78
92 done 92 done
93 93
94 [[ -z "${had_spell_file}" ]] && die "Didn't install any spell files?" 94 [[ -z "${had_spell_file}" ]] && die "Didn't install any spell files?"
95} 95}
96 96
97vim-spell_pkg_postinst() {
98 target="/usr/share/vim/vimfiles/spell/"
99 echo
100 einfo "To enable ${VIM_SPELL_LANGUAGE} spell checking, use"
101 einfo " :setlocal spell spelllang=${VIM_SPELL_CODE}"
102 echo
103 einfo "The following (Vim internal, not file) encodings are supported for"
104 einfo "this language:"
105 for f in "${ROOT}/${target}/${VIM_SPELL_CODE}".*.spl ; do
106 enc="${f##*/${VIM_SPELL_CODE}.}"
107 enc="${enc%.spl}"
108 [[ -z "${enc}" ]] && continue
109 einfo " ${enc}"
110 done
111 echo
112 einfo "For further documentation, use:"
113 einfo " :help spell"
114 echo
115 epause
116}
117

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20