From 7218e1b46bceac05841e90472501742d905fb3fc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 12 Mar 2021 21:55:15 +0000 Subject: gentoo resync : 12.03.2021 --- eclass/freedict.eclass | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) (limited to 'eclass/freedict.eclass') diff --git a/eclass/freedict.eclass b/eclass/freedict.eclass index c1b32d1b6bfb..2af79666aa20 100644 --- a/eclass/freedict.eclass +++ b/eclass/freedict.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: freedict.eclass @@ -6,32 +6,27 @@ # maintainer-needed@gentoo.org # @AUTHOR: # Original author: Seemant Kulleen -# @SUPPORTED_EAPIS: 6 +# @SUPPORTED_EAPIS: 7 # @BLURB: Ease the installation of freedict translation dictionaries # @DESCRIPTION: # This eclass exists to ease the installation of freedict translation -# dictionaries. The only variables which need to be defined in the actual -# ebuilds are FORLANG and TOLANG for the source and target languages, -# respectively. +# dictionaries. -# @ECLASS-VARIABLE: FORLANG +# @ECLASS-VARIABLE: FREEDICT_P # @DESCRIPTION: -# Please see above for a description. - -# @ECLASS-VARIABLE: TOLANG -# @DESCRIPTION: -# Please see above for a description. +# Strips PN of 'freedict' prefix, to be used in SRC_URI and doins +FREEDICT_P=${PN/freedict-/} case ${EAPI:-0} in - 6) ;; + 7) ;; *) die "${ECLASS}.eclass is banned in EAPI=${EAPI}" ;; esac -MY_P=${PN/freedict-/} +[[ ${FORLANG} ]] && die "FORLANG is banned, set DESCRIPTION instead" +[[ ${TOLANG} ]] && die "TOLANG is banned, set DESCRIPTION instead" -DESCRIPTION="Freedict for language translation from ${FORLANG} to ${TOLANG}" -HOMEPAGE="http://freedict.sourceforge.net/" -SRC_URI="http://freedict.sourceforge.net/download/linux/${MY_P}.tar.gz" +HOMEPAGE="http://freedict.sourceforge.net/en/" +SRC_URI="http://freedict.sourceforge.net/download/linux/${FREEDICT_P}.tar.gz" LICENSE="GPL-2+" SLOT="0" @@ -42,11 +37,11 @@ S="${WORKDIR}" # @FUNCTION: freedict_src_install # @DESCRIPTION: -# The freedict src_install function, which is exported +# Installs translation specific dict.dz and index files. freedict_src_install() { insinto /usr/$(get_libdir)/dict - doins ${MY_P}.dict.dz - doins ${MY_P}.index + doins ${FREEDICT_P}.dict.dz + doins ${FREEDICT_P}.index } EXPORT_FUNCTIONS src_install -- cgit v1.2.3