This adds support for EAPI=7. Also overhauled the ebuild and dropped aspell-0.50 from *DEPEND, as it's not anymore in tree. Also slightly adjusted messages and taking ownership.
Since there is a open bug ticket about setting a default value for ASPELL_VERSION, I am changing the logic a little bit. ASPELL_VERSION will be by default version 6, while version 5 or no version can be set by an empty variable instead. It's needed for automatic SRC_URI, since there are packages starting with 'aspell', 'aspell5' or 'aspell6', despite being all for aspell-0.60. This is a preparation for an major version bump off all app-dicts/aspell-* language dicts ebuilds. Most of them are anyway outdated, so we could bump them directly to EAPI=7 after merging this one here. Closes: https://bugs.gentoo.org/637710 Closes: https://bugs.gentoo.org/770259 Signed-off-by: Conrad Kostecki <conik...@gentoo.org> --- eclass/aspell-dict-r1.eclass | 74 ++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/eclass/aspell-dict-r1.eclass b/eclass/aspell-dict-r1.eclass index b07af61fdf1..14bbfcb98d2 100644 --- a/eclass/aspell-dict-r1.eclass +++ b/eclass/aspell-dict-r1.eclass @@ -1,42 +1,48 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: aspell-dict-r1.eclass # @MAINTAINER: -# maintainer-nee...@gentoo.org +# Conrad Kostecki <conik...@gentoo.org> # @AUTHOR: -# Original author: Seemant Kulleen -# -r1 author: David Seifert -# @SUPPORTED_EAPIS: 6 -# @BLURB: An eclass to streamline the construction of ebuilds for new aspell dicts +# Seemant Kulleen <seem...@gentoo.org> +# David Seifert <s...@gentoo.org> +# Conrad Kostecki <conik...@gentoo.org> +# @SUPPORTED_EAPIS: 6 7 +# @BLURB: An eclass to streamline the construction of ebuilds for new aspell dictionaries. # @DESCRIPTION: -# The aspell-dict-r1 eclass is designed to streamline the construction of -# ebuilds for the new aspell dictionaries (from gnu.org) which support -# aspell-0.50. Support for aspell-0.60 has been added by Sergey Ulanov. +# The aspell-dict-r1 eclass is designed to streamline the construction of ebuilds +# for the new aspell dictionaries (from gnu.org) which support aspell-0.50. +# Support for aspell-0.60 has been added by Sergey Ulanov. # @ECLASS-VARIABLE: ASPELL_LANG # @REQUIRED # @DESCRIPTION: -# Pure cleartext string that is included into DESCRIPTION. This is the name -# of the language, for instance "Hungarian". Needs to be defined before -# inheriting the eclass. +# Pure cleartext string that is included into DESCRIPTION. +# This is the name of the language, for instance "Hungarian". +# Needs to be defined before inheriting the eclass. + +# @ECLASS-VARIABLE: ASPELL_SPELLANG +# @DESCRIPTION: +# Short (readonly) form of the language code, generated from ${PN}. +# For instance, 'aspell-hu' yields to the value 'hu'. +readonly ASPELL_SPELLANG="${PN/aspell-/}" # @ECLASS-VARIABLE: ASPELL_VERSION # @DESCRIPTION: -# What major version of aspell is this dictionary for? Valid values are 5, 6 or undefined. -# This value is used to construct SRC_URI and *DEPEND strings. If defined to 6, -# >=app-text/aspell-0.60 will be added to DEPEND and RDEPEND, otherwise, -# >=app-text/aspell-0.50 is added to DEPEND and RDEPEND. If the value is to be overridden, -# it needs to be overridden before inheriting the eclass. +# What major version of aspell is this dictionary for? Valid values are 5, 6 or empty. +# This value is used to construct SRC_URI strings. +# If the value needs to be overridden, it needs to be overridden before inheriting the eclass. +: ${ASPELL_VERSION:-6} case ${EAPI:-0} in - [0-5]) - die "aspell-dict-r1.eclass is banned in EAPI ${EAPI:-0}" + 0|1|2|3|4|5) + die "Unsupported EAPI=${EAPI} (obsolete) for ${ECLASS}" ;; - 6) + 6|7) ;; *) - die "Unknown EAPI ${EAPI:-0}" + die "Unknown EAPI=${EAPI} for ${ECLASS}" ;; esac @@ -44,29 +50,22 @@ EXPORT_FUNCTIONS src_configure src_install if [[ ! ${_ASPELL_DICT_R1} ]]; then -# aspell packages have an idiosyncratic versioning scheme, that is -# the last separating version separator is replaced by a '-'. -_ASPELL_P=aspell${ASPELL_VERSION}-${PN/aspell-/}-${PV%.*}-${PV##*.} +[[ ! -z "${ASPELL_VERSION}" && "${ASPELL_VERSION}" != [56] ]] && die "Unsupported ASPELL_VERSION=${ASPELL_VERSION} for ${ECLASS}" -# @ECLASS-VARIABLE: ASPELL_SPELLANG -# @DESCRIPTION: -# Short (readonly) form of the language code, generated from ${PN} -# For instance, 'aspell-hu' yields the value 'hu'. -readonly ASPELL_SPELLANG=${PN/aspell-/} -S="${WORKDIR}/${_ASPELL_P}" +# Most of those aspell packages have an idiosyncratic versioning scheme, +# where the last separating version separator is replaced by a '-'. +_ASPELL_P="aspell${ASPELL_VERSION}-${PN/aspell-/}-${PV%.*}-${PV##*.}" -DESCRIPTION="${ASPELL_LANG} language dictionary for aspell" +DESCRIPTION="Aspell (${ASPELL_LANG}) language dictionary" HOMEPAGE="http://aspell.net" SRC_URI="mirror://gnu/aspell/dict/${ASPELL_SPELLANG}/${_ASPELL_P}.tar.bz2" +S="${WORKDIR}/${_ASPELL_P}" + unset _ASPELL_P -IUSE="" SLOT="0" -_ASPELL_MAJOR_VERSION=${ASPELL_VERSION:-5} -[[ ${_ASPELL_MAJOR_VERSION} != [56] ]] && die "${ASPELL_VERSION} is not a valid version" - -RDEPEND=">=app-text/aspell-0.${_ASPELL_MAJOR_VERSION}0" +RDEPEND="app-text/aspell" DEPEND="${RDEPEND}" unset _ASPELL_MAJOR_VERSION @@ -74,7 +73,7 @@ unset _ASPELL_MAJOR_VERSION # @DESCRIPTION: # The aspell-dict-r1 src_configure function which is exported. aspell-dict-r1_src_configure() { - # non-autoconf based script, cannot be used with econf + # Since it's a non-autoconf based script, 'econf' cannot be used. ./configure || die } @@ -88,3 +87,4 @@ aspell-dict-r1_src_install() { _ASPELL_DICT_R1=1 fi + -- 2.30.1