summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-03-12 11:41:11 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-03-12 16:12:48 +0100
commit53ea3a0737f19712c8b818d9e189652557f7b573 (patch)
tree998c11db4bd58ed870cdfd931992edd6a8cbe39d /eclass/freedict.eclass
parentapp-dicts/aspell-sr: Set <stabilize-allarches/> (diff)
downloadgentoo-53ea3a0737f19712c8b818d9e189652557f7b573.tar.gz
gentoo-53ea3a0737f19712c8b818d9e189652557f7b573.tar.bz2
gentoo-53ea3a0737f19712c8b818d9e189652557f7b573.zip
freedict.eclass: Support EAPI-7, fix HOMEPAGE, drop DESCRIPTION
Deprecate FORLANG and TOLANG in EAPI-7 in favor of setting DESCRIPTION directly. Avoid HOMEPAGE redirect Improve description, fix eclassdoc problems Closes: https://bugs.gentoo.org/637738 Closes: https://bugs.gentoo.org/770265 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass/freedict.eclass')
-rw-r--r--eclass/freedict.eclass36
1 files changed, 23 insertions, 13 deletions
diff --git a/eclass/freedict.eclass b/eclass/freedict.eclass
index c1b32d1b6bfb..cded485b5a47 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,7 +6,7 @@
# maintainer-needed@gentoo.org
# @AUTHOR:
# Original author: Seemant Kulleen
-# @SUPPORTED_EAPIS: 6
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Ease the installation of freedict translation dictionaries
# @DESCRIPTION:
# This eclass exists to ease the installation of freedict translation
@@ -14,24 +14,34 @@
# ebuilds are FORLANG and TOLANG for the source and target languages,
# respectively.
+# @ECLASS-VARIABLE: FREEDICT_P
+# @DESCRIPTION:
+# Strips PN of 'freedict' prefix, to be used in SRC_URI and doins
+FREEDICT_P=${PN/freedict-/}
+
# @ECLASS-VARIABLE: FORLANG
+# @DEFAULT_UNSET
# @DESCRIPTION:
-# Please see above for a description.
+# DEPRECATED: Cleanup after EAPI-7 removal.
# @ECLASS-VARIABLE: TOLANG
+# @DEFAULT_UNSET
# @DESCRIPTION:
-# Please see above for a description.
+# DEPRECATED: Cleanup after EAPI-7 removal.
case ${EAPI:-0} in
- 6) ;;
+ 6)
+ DESCRIPTION="Freedict for language translation from ${FORLANG} to ${TOLANG}"
+ ;;
+ 7)
+ [[ ${FORLANG} ]] && die "FORLANG is banned, set DESCRIPTION instead"
+ [[ ${TOLANG} ]] && die "TOLANG is banned, set DESCRIPTION instead"
+ ;;
*) die "${ECLASS}.eclass is banned in EAPI=${EAPI}" ;;
esac
-MY_P=${PN/freedict-/}
-
-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 +52,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