public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andreas Sturmlechner <asturm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH] cuda.eclass: Drop EAPI-5 support, move some things around
Date: Wed, 07 Apr 2021 00:15:43 +0200	[thread overview]
Message-ID: <2528085.lGaqSPkdTl@tuxbrain> (raw)

[-- Attachment #1: Type: text/plain, Size: 1696 bytes --]

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 <sci@gentoo.org>
-# @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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

                 reply	other threads:[~2021-04-06 22:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2528085.lGaqSPkdTl@tuxbrain \
    --to=asturm@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox