diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /eclass/vim-spell.eclass | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'eclass/vim-spell.eclass')
-rw-r--r-- | eclass/vim-spell.eclass | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass new file mode 100644 index 000000000000..05c38dadc1cc --- /dev/null +++ b/eclass/vim-spell.eclass @@ -0,0 +1,127 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# +# Original Author: Ciaran McCreesh <ciaranm@gentoo.org> +# Maintainers: Vim Herd <vim@gentoo.org> +# Purpose: Simplify installing spell files for vim7 +# + +# How to make a vim spell file package using prebuilt spell lists +# from upstream (${CODE} is the language's two letter code): +# +# * Get the ${CODE}.*.spl, ${CODE}.*.sug (if your language has them) and +# README_${CODE}.txt files. Currently they're at +# ftp://ftp.vim.org/pub/vim/unstable/runtime/spell/ (except for English, +# which should be taken from CVS instead). +# +# * Stick them in vim-spell-${CODE}-$(date --iso | tr -d - ).tar.bz2 . Make sure +# that they're in the appropriately named subdirectory to avoid having to mess +# with S=. +# +# * Upload the tarball to the Gentoo mirrors. +# +# * (for now) Add your spell file to package.mask next to the other vim7 +# things. The vim herd will handle unmasking your spell packages when vim7 +# comes out of package.mask. +# +# * Create the app-vim/vim-spell-${CODE} package. You should base your ebuild +# upon app-vim/vim-spell-en. You will need to change VIM_SPELL_LANGUAGE, +# KEYWORDS and LICENSE. Check the license carefully! The README will tell +# you what it is. +# +# * Don't forget metadata.xml. You should list vim as the herd, and yourself +# as the maintainer (there is no need to join the vim herd just for spell +# files): +# +# <?xml version="1.0" encoding="UTF-8"?> +# <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +# <pkgmetadata> +# <herd>vim</herd> +# <maintainer> +# <email>your-name@gentoo.org</email> +# </maintainer> +# <longdescription lang="en"> +# Vim spell files for French (fr). Supported character sets are +# UTF-8 and latin1. +# </longdescription> +# </pkgmetadata> +# +# * Send an email to vim@gentoo.org to let us know. +# +# Don't forget to update your package as necessary. +# +# If there isn't an upstream-provided pregenerated spell file for your language +# yet, read :help spell.txt from inside vim7 for instructions on how to create +# spell files. It's best to let upstream know if you've generated spell files +# for another language rather than keeping them Gentoo-specific. + +inherit eutils + +EXPORT_FUNCTIONS src_install pkg_postinst + +IUSE="" +DEPEND="|| ( >=app-editors/vim-7_alpha + >=app-editors/gvim-7_alpha )" +RDEPEND="${DEPEND}" +SRC_URI="mirror://gentoo/${P}.tar.bz2" +SLOT="0" + +if [[ -z "${VIM_SPELL_CODE}" ]] ; then + VIM_SPELL_CODE="${PN/vim-spell-/}" +fi + +DESCRIPTION="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_CODE})" + +if [[ -z "${HOMEPAGE}" ]] ; then + HOMEPAGE="http://www.vim.org/" +fi + +vim-spell_src_install() { + target="/usr/share/vim/vimfiles/spell/" + dodir "${target}" + insinto "${target}" + + had_spell_file= + for f in *.spl ; do + if [[ -f "${f}" ]]; then + doins "${f}" + had_spell_file="yes" + fi + done + + for f in *.sug ; do + if [[ -f "${f}" ]]; then + doins "${f}" + fi + done + + for f in README* ; do + dodoc "${f}" + done + + [[ -z "${had_spell_file}" ]] && die "Didn't install any spell files?" +} + +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" + elog " :setlocal spell spelllang=${VIM_SPELL_CODE}" + echo + elog "The following (Vim internal, not file) encodings are supported for" + elog "this language:" + for f in "${EROOT}/${target}/${VIM_SPELL_CODE}".*.spl ; do + enc="${f##*/${VIM_SPELL_CODE}.}" + enc="${enc%.spl}" + [[ -z "${enc}" ]] && continue + elog " ${enc}" + done + echo + elog "For further documentation, use:" + elog " :help spell" + echo + epause +} |