Gentoo Archives: gentoo-dev

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [PATCH] cuda.eclass: Drop EAPI-5 support, move some things around
Date: Tue, 06 Apr 2021 22:15:55
Message-Id: 2528085.lGaqSPkdTl@tuxbrain
1 Just some cheap changes while flag-o-matic.eclass causes cache-regen anyway.
2 See also: https://github.com/gentoo/gentoo/pull/20207
3
4 - Assign inherit guard right on top.
5 - Consolidate the EAPI switch with inherit
6
7 ---
8 eclass/cuda.eclass | 29 ++++++++++++-----------------
9 1 file changed, 12 insertions(+), 17 deletions(-)
10
11 diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
12 index b1da77c69dd..b23d9f71a8b 100644
13 --- a/eclass/cuda.eclass
14 +++ b/eclass/cuda.eclass
15 @@ -1,21 +1,10 @@
16 -# Copyright 1999-2020 Gentoo Authors
17 +# Copyright 1999-2021 Gentoo Authors
18 # Distributed under the terms of the GNU General Public License v2
19
20 -case "${EAPI:-0}" in
21 - 0|1|2|3|4)
22 - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
23 - ;;
24 - 5|6|7)
25 - ;;
26 - *)
27 - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
28 - ;;
29 -esac
30 -
31 # @ECLASS: cuda.eclass
32 # @MAINTAINER:
33 # Gentoo Science Project <sci@g.o>
34 -# @SUPPORTED_EAPIS: 5 6 7
35 +# @SUPPORTED_EAPIS: 6 7
36 # @BLURB: Common functions for cuda packages
37 # @DESCRIPTION:
38 # This eclass contains functions to be used with cuda package. Currently it is
39 @@ -25,10 +14,19 @@ esac
40 # @EXAMPLE:
41 # inherit cuda
42
43 +case "${EAPI:-0}" in
44 + [0-5]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;;
45 + 6) inherit eapi7-ver ;;
46 + 7) ;;
47 + *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
48 +esac
49 +
50 if [[ -z ${_CUDA_ECLASS} ]]; then
51 +_CUDA_ECLASS=1
52 +
53 +EXPORT_FUNCTIONS src_prepare
54
55 inherit flag-o-matic toolchain-funcs
56 -[[ ${EAPI} == [56] ]] && inherit eapi7-ver
57
58 # @ECLASS-VARIABLE: NVCCFLAGS
59 # @DESCRIPTION:
60 @@ -195,7 +193,4 @@ cuda_src_prepare() {
61 cuda_sanitize
62 }
63
64 -EXPORT_FUNCTIONS src_prepare
65 -
66 -_CUDA_ECLASS=1
67 fi
68 --
69 2.31.1

Attachments

File name MIME type
signature.asc application/pgp-signature