From 270a8102b98cd63760beb93ead47bc42dae63d8c Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 20 Jun 2021 23:13:35 +0200 Subject: chromium-2.eclass: [QA] add EAPI guard Signed-off-by: Sam James Signed-off-by: David Seifert --- eclass/chromium-2.eclass | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'eclass/chromium-2.eclass') diff --git a/eclass/chromium-2.eclass b/eclass/chromium-2.eclass index b3d63f302d05..b8dae862dfea 100644 --- a/eclass/chromium-2.eclass +++ b/eclass/chromium-2.eclass @@ -1,14 +1,22 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: chromium-2.eclass # @MAINTAINER: -# Chromium Herd +# Chromium Project # @AUTHOR: # Mike Gilbert # @BLURB: Shared functions for chromium and google-chrome -inherit eutils linux-info +case ${EAPI} in + 7) ;; + *) die "EAPI=${EAPI:-0} is not supported" ;; +esac + +inherit linux-info + +if [[ -z ${_CHROMIUM_2_ECLASS} ]]; then +_CHROMIUM_2_ECLASS=1 if [[ ${PN} == chromium ]]; then IUSE+=" custom-cflags" @@ -19,8 +27,6 @@ fi # @DESCRIPTION: # Ensures the system kernel supports features needed for SUID sandbox to work. chromium_suid_sandbox_check_kernel_config() { - has "${EAPI:-0}" 0 1 2 3 && die "EAPI=${EAPI} is not supported" - if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then # Warn if the kernel does not support features needed for sandboxing. # Bug #363987. @@ -44,8 +50,6 @@ chromium_suid_sandbox_check_kernel_config() { # List of language packs available for this package. _chromium_set_l10n_IUSE() { - [[ ${EAPI:-0} == 0 ]] && die "EAPI=${EAPI} is not supported" - local lang for lang in ${CHROMIUM_LANGS}; do # Default to enabled since we bundle them anyway. @@ -176,3 +180,5 @@ gyp_use() { local gypflag="-D${2:-use_${1//-/_}}=" usex "$1" "${gypflag}" "${gypflag}" "${3-1}" "${4-0}" } + +fi -- cgit v1.2.3-65-gdbad