summaryrefslogtreecommitdiff
path: root/eclass/gkrellm-plugin.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-12 09:56:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-12 09:56:54 +0000
commitebc282ef4dfa408accac685565b8ee5f6faec119 (patch)
treec0a4f713228cda0ab17eed46f0bb7ca8cb8be2f6 /eclass/gkrellm-plugin.eclass
parent6c8694a707151d59555b0e4e48235f085ce166c3 (diff)
gentoo auto-resync : 12:02:2023 - 09:56:54
Diffstat (limited to 'eclass/gkrellm-plugin.eclass')
-rw-r--r--eclass/gkrellm-plugin.eclass53
1 files changed, 12 insertions, 41 deletions
diff --git a/eclass/gkrellm-plugin.eclass b/eclass/gkrellm-plugin.eclass
index 7e846bbf2faa..1424fdfe53f9 100644
--- a/eclass/gkrellm-plugin.eclass
+++ b/eclass/gkrellm-plugin.eclass
@@ -8,56 +8,40 @@
# Original author: Jim Ramsay <lack@gentoo.org>
# EAPI 6 author: David Seifert <soap@gentoo.org>
# EAPI 8 author: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
-# @SUPPORTED_EAPIS: 6 8
-# @PROVIDES: multilib
+# @SUPPORTED_EAPIS: 8
# @BLURB: Provides src_install used by (almost) all gkrellm plugins
# @DESCRIPTION:
# - Sets up default dependencies
# - Provides a common src_install method to avoid code duplication
-#
-# Changelog:
-# 17 March 2022: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
-# - Port to EAPI 8
-# 03 January 2018: David Seifert <soap@gentoo.org>
-# - Port to EAPI 6, remove built_with_use, simplify a lot
-# 12 March 2007: Jim Ramsay <lack@gentoo.org>
-# - Added server plugin support
-# 09 March 2007: Jim Ramsay <lack@gentoo.org>
-# - Initial commit
-#
# @ECLASS_VARIABLE: PLUGIN_SO
# @DESCRIPTION:
# The name of the plugin's .so file which will be installed in
-# the plugin dir. Defaults to "${PN}$(get_modname)". Has to be a bash array.
+# the plugin dir. Defaults to "${PN}$(get_modname)". Has to be a bash array.
# @ECLASS_VARIABLE: PLUGIN_SERVER_SO
# @DEFAULT_UNSET
# @DESCRIPTION:
# The name of the plugin's server plugin $(get_modname) portion.
-# Unset by default. Has to be a bash array.
+# Unset by default. Has to be a bash array.
# @ECLASS_VARIABLE: PLUGIN_DOCS
# @DEFAULT_UNSET
# @DESCRIPTION:
# An optional list of docs to be installed, in addition to the default
-# DOCS variable which is respected too. Has to be a bash array.
+# DOCS variable which is respected too. Has to be a bash array.
case ${EAPI} in
- 6|8) ;;
+ 8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit multilib
+if [[ ! ${_GKRELLM_PLUGIN_ECLASS} ]]; then
+_GKRELLM_PLUGIN_ECLASS=1
-if [[ ! ${_GKRELLM_PLUGIN_R1} ]]; then
-_GKRELLM_PLUGIN_R1=1
+inherit multilib
-if [[ ${EAPI} == 6 ]]; then
- DEPEND="virtual/pkgconfig"
-else
- BDEPEND="virtual/pkgconfig"
-fi
+BDEPEND="virtual/pkgconfig"
# @FUNCTION: gkrellm-plugin_src_install
# @USAGE:
@@ -68,20 +52,13 @@ gkrellm-plugin_src_install() {
if ! declare -p PLUGIN_SO >/dev/null 2>&1 ; then
doexe ${PN}$(get_modname)
- elif declare -p PLUGIN_SO | grep -q "^declare -a " ; then
- doexe "${PLUGIN_SO[@]}"
else
- die "PLUGIN_SO has to be a bash array!"
+ doexe "${PLUGIN_SO[@]}"
fi
if [[ -n ${PLUGIN_SERVER_SO} ]]; then
exeinto /usr/$(get_libdir)/gkrellm2/plugins-gkrellmd
-
- if declare -p PLUGIN_SERVER_SO | grep -q "^declare -a " ; then
- doexe "${PLUGIN_SERVER_SO[@]}"
- else
- die "PLUGIN_SERVER_SO has to be a bash array!"
- fi
+ doexe "${PLUGIN_SERVER_SO[@]}"
fi
einstalldocs
@@ -90,13 +67,7 @@ gkrellm-plugin_src_install() {
[[ -s "${d}" ]] && dodoc "${d}"
done
- if [[ -n ${PLUGIN_DOCS} ]]; then
- if declare -p PLUGIN_DOCS | grep -q "^declare -a " ; then
- dodoc "${PLUGIN_DOCS[@]}"
- else
- die "PLUGIN_DOCS has to be a bash array!"
- fi
- fi
+ [[ -n ${PLUGIN_DOCS} ]] && dodoc "${PLUGIN_DOCS[@]}"
}
fi