/[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 Revision 1.3
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 2005/09/28 18:27:00 ciaranm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/vim-spell.eclass,v 1.3 2005/09/28 19:59:46 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
22# 22#
23# * (for now) Add your spell file to package.mask next to the other vim7 23# * (for now) Add your spell file to package.mask next to the other vim7
24# things. The vim herd will handle unmasking your spell packages when vim7 24# things. The vim herd will handle unmasking your spell packages when vim7
25# comes out of package.mask. 25# comes out of package.mask.
26# 26#
27# * Create the app-vim/vim-spell-${CODE} package. A sample ebuild will look 27# * Create the app-vim/vim-spell-${CODE} package. You should base your ebuild
28# something like (header removed): 28# upon app-vim/vim-spell-en. You will need to change VIM_SPELL_LANGUAGE,
29# 29# KEYWORDS and LICENSE. Check the license carefully! The README will tell
30# VIM_SPELL_LANGUAGE="French" 30# you what it is.
31#
32# inherit vim-spell
33#
34# LICENSE="GPL-2"
35# KEYWORDS="~sparc ~mips"
36# IUSE=""
37# 31#
38# * Don't forget metadata.xml. You should list vim as the herd, and yourself 32# * Don't forget metadata.xml. You should list vim as the herd, and yourself
39# as the maintainer (there is no need to join the vim herd just for spell 33# as the maintainer (there is no need to join the vim herd just for spell
40# files): 34# files):
41# 35#
59# 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
60# 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
61# 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
62# for another language rather than keeping them Gentoo-specific. 56# for another language rather than keeping them Gentoo-specific.
63 57
58inherit eutils
59
64EXPORT_FUNCTIONS src_install 60EXPORT_FUNCTIONS src_install pkg_postinst
65 61
66IUSE="" 62IUSE=""
67DEPEND="|| ( >=app-editors/vim-7_alpha 63DEPEND="|| ( >=app-editors/vim-7_alpha
68 >=app-editors/gvim-7_alpha )" 64 >=app-editors/gvim-7_alpha )"
69RDEPEND="${DEPEND}" 65RDEPEND="${DEPEND}"
98 done 94 done
99 95
100 [[ -z "${had_spell_file}" ]] && die "Didn't install any spell files?" 96 [[ -z "${had_spell_file}" ]] && die "Didn't install any spell files?"
101} 97}
102 98
99vim-spell_pkg_postinst() {
100 target="/usr/share/vim/vimfiles/spell/"
101 echo
102 einfo "To enable ${VIM_SPELL_LANGUAGE} spell checking, use"
103 einfo " :setlocal spell spelllang=${VIM_SPELL_CODE}"
104 echo
105 einfo "The following (Vim internal, not file) encodings are supported for"
106 einfo "this language:"
107 for f in "${ROOT}/${target}/${VIM_SPELL_CODE}".*.spl ; do
108 enc="${f##*/${VIM_SPELL_CODE}.}"
109 enc="${enc%.spl}"
110 [[ -z "${enc}" ]] && continue
111 einfo " ${enc}"
112 done
113 echo
114 einfo "For further documentation, use:"
115 einfo " :help spell"
116 echo
117 epause
118}
119

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20