Just some cheap changes while flag-o-matic.eclass causes cache-regen anyway. See also: https://github.com/gentoo/gentoo/pull/20207
- Assign inherit guard right on top.
- Consolidate the EAPI switch with inherit
---
eclass/cuda.eclass | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index b1da77c69dd..b23d9f71a8b 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -1,21 +1,10 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-case "${EAPI:-0}" in
- 0|1|2|3|4)
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
- ;;
- 5|6|7)
- ;;
- *)
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
- ;;
-esac
-
# @ECLASS: cuda.eclass
# @MAINTAINER:
# Gentoo Science Project <[email protected]>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Common functions for cuda packages
# @DESCRIPTION:
# This eclass contains functions to be used with cuda package. Currently it is
@@ -25,10 +14,19 @@ esac
# @EXAMPLE:
# inherit cuda
+case "${EAPI:-0}" in
+ [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;;
+ 6) inherit eapi7-ver ;;
+ 7) ;;
+ *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
+esac
+
if [[ -z ${_CUDA_ECLASS} ]]; then
+_CUDA_ECLASS=1
+
+EXPORT_FUNCTIONS src_prepare
inherit flag-o-matic toolchain-funcs
-[[ ${EAPI} == [56] ]] && inherit eapi7-ver
# @ECLASS-VARIABLE: NVCCFLAGS
# @DESCRIPTION:
@@ -195,7 +193,4 @@ cuda_src_prepare() {
cuda_sanitize
}
-EXPORT_FUNCTIONS src_prepare
-
-_CUDA_ECLASS=1
fi
--
2.31.1
signature.asc
Description: This is a digitally signed message part.
