From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C864D1396D0 for ; Sat, 19 Aug 2017 12:55:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BC4C1FC07D; Sat, 19 Aug 2017 12:53:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DD60C1FC079 for ; Sat, 19 Aug 2017 12:53:57 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2a01:cb1d:197:1900:c8be:3dff:3bea:ae3d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: monsieurp@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 75A073416EC; Sat, 19 Aug 2017 12:53:56 +0000 (UTC) From: Patrice Clement To: gentoo-dev@lists.gentoo.org Cc: vim@gentoo.org Subject: [gentoo-dev] [PATCH 2/2] vim-spell.eclass: document variables using Gentoo documentation tags. Date: Sat, 19 Aug 2017 14:53:50 +0200 Message-Id: <20170819125350.10651-3-monsieurp@gentoo.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170819125350.10651-1-monsieurp@gentoo.org> References: <20170819125350.10651-1-monsieurp@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 8e62d64a-27a3-4ce5-a69e-530ed3fb97df X-Archives-Hash: e57cede76a6bb40ac497a5bde074c8d7 --- eclass/vim-spell.eclass | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass index 1b0f93c264d..8c1b6314ed8 100644 --- a/eclass/vim-spell.eclass +++ b/eclass/vim-spell.eclass @@ -68,23 +68,34 @@ RDEPEND="${DEPEND}" SRC_URI="mirror://gentoo/${P}.tar.bz2" SLOT="0" -if [[ -z "${VIM_SPELL_CODE}" ]] ; then - VIM_SPELL_CODE="${PN/vim-spell-/}" -fi +# @ECLASS-VARIABLE: DESCRIPTION +# @DESCRIPTION: +# Default DESCRIPTION for Vim spell ebuilds. +: ${DESCRIPTION:="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_LOCALE})"} -DESCRIPTION="vim spell files: ${VIM_SPELL_LANGUAGE} (${VIM_SPELL_CODE})" +# @ECLASS-VARIABLE: HOMEPAGE +# @DESCRIPTION: +# Default HOMEPAGE for Vim spell ebuilds. +: ${HOMEPAGE:="https://www.vim.org"} -if [[ -z "${HOMEPAGE}" ]] ; then - HOMEPAGE="http://www.vim.org/" -fi +# @ECLASS-VARIABLE: VIM_SPELL_LOCALE +# @INTERNAL +# @DESCRIPTION: +# Locale for the current ebuild. +: ${VIM_SPELL_LOCALE:="${PN/vim-spell-/}"} + +# @ECLASS-VARIABLE: VIM_SPELL_DIRECTORY +# @INTERNAL +# @DESCRIPTION: +# Path to Vim spell directory files. +: ${VIM_SPELL_DIRECTORY:="/usr/share/vim/vimfiles/spell/"} # @FUNCTION: vim-spell_src_install # @DESCRIPTION: # Install Vim spell files. vim-spell_src_install() { - target="/usr/share/vim/vimfiles/spell/" - dodir "${target}" - insinto "${target}" + dodir "${VIM_SPELL_DIRECTORY}" + insinto "${VIM_SPELL_DIRECTORY}" had_spell_file= for f in *.spl ; do @@ -112,15 +123,13 @@ vim-spell_src_install() { # Display installed Vim 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}" + elog " :setlocal spell spelllang=${VIM_SPELL_LOCALE}" 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}.}" + for f in "${EROOT}/${VIM_SPELL_DIRECTORY}/${VIM_SPELL_LOCALE}".*.spl ; do enc="${f##*/${VIM_SPELL_LOCALE}.}" enc="${enc%.spl}" [[ -z "${enc}" ]] && continue elog " ${enc}" -- 2.13.0