summaryrefslogtreecommitdiff
path: root/eclass/stardict.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-21 17:32:00 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-21 17:32:00 +0100
commit61f10f985e19dfe20a4d9552902625edd5b6eabb (patch)
tree50db31971b38c4e0358253ef5005058a46fc773e /eclass/stardict.eclass
parent34dea8e38f88007799629d0a56b12dec480b1d21 (diff)
gentoo resync : 21.06.2021
Diffstat (limited to 'eclass/stardict.eclass')
-rw-r--r--eclass/stardict.eclass42
1 files changed, 28 insertions, 14 deletions
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 <liquidx@gentoo.org>
-#
-# Convienence class to do stardict dictionary installations.
-#
+# @NAME: stardict.eclass
+# @AUTHOR: Alastair Tse <liquidx@gentoo.org>
+# @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