From ebc282ef4dfa408accac685565b8ee5f6faec119 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 12 Feb 2023 09:56:54 +0000 Subject: gentoo auto-resync : 12:02:2023 - 09:56:54 --- eclass/gkrellm-plugin.eclass | 53 ++++++++++---------------------------------- 1 file changed, 12 insertions(+), 41 deletions(-) (limited to 'eclass/gkrellm-plugin.eclass') 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 # EAPI 6 author: David Seifert # EAPI 8 author: Thomas Bracht Laumann Jespersen -# @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 -# - Port to EAPI 8 -# 03 January 2018: David Seifert -# - Port to EAPI 6, remove built_with_use, simplify a lot -# 12 March 2007: Jim Ramsay -# - Added server plugin support -# 09 March 2007: Jim Ramsay -# - 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 -- cgit v1.2.3