From 61f10f985e19dfe20a4d9552902625edd5b6eabb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 21 Jun 2021 17:32:00 +0100 Subject: gentoo resync : 21.06.2021 --- eclass/stardict.eclass | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) (limited to 'eclass/stardict.eclass') diff --git a/eclass/stardict.eclass b/eclass/stardict.eclass index 5e96b01625cd..0061353f4abc 100644 --- a/eclass/stardict.eclass +++ b/eclass/stardict.eclass @@ -1,10 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Author : Alastair Tse -# -# Convienence class to do stardict dictionary installations. -# +# @NAME: stardict.eclass +# @AUTHOR: Alastair Tse +# @SUPPORTED_EAPIS: 6 7 +# @BLURB: Convenience class to do stardict dictionary installations. # Usage: # - Variables to set : # * FROM_LANG - From this language @@ -12,6 +12,16 @@ # * DICT_PREFIX - SRC_URI prefix, like "dictd_www.mova.org_" # * DICT_SUFFIX - SRC_URI after the prefix. +case ${EAPI:-0} in + [67]) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +EXPORT_FUNCTIONS src_compile src_install + +if [[ -z ${_STARDICT_ECLASS} ]] ; then +_STARDICT_ECLASS=1 + RESTRICT="strip" [ -z "${DICT_SUFFIX}" ] && DICT_SUFFIX=${PN#stardict-[[:lower:]]*-} @@ -25,18 +35,22 @@ fi HOMEPAGE="http://stardict.sourceforge.net/" SRC_URI="mirror://sourceforge/stardict/${DICT_P}.tar.bz2" +S="${WORKDIR}"/${DICT_P} -IUSE="gzip" -SLOT="0" LICENSE="GPL-2" +SLOT="0" +IUSE="gzip" -DEPEND="|| ( >=app-text/stardict-2.4.2 +DEPEND=" + || ( + >=app-text/stardict-2.4.2 app-text/sdcv - app-text/goldendict ) - gzip? ( app-arch/gzip - app-text/dictd )" - -S=${WORKDIR}/${DICT_P} + app-text/goldendict + ) + gzip? ( + app-arch/gzip + app-text/dictd + )" stardict_src_compile() { if use gzip; then @@ -56,4 +70,4 @@ stardict_src_install() { doins *.ifo } -EXPORT_FUNCTIONS src_compile src_install +fi -- cgit v1.2.3