From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B4E481382C5 for ; Tue, 6 Apr 2021 22:15:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 33537E0977; Tue, 6 Apr 2021 22:15:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E87D2E096C for ; Tue, 6 Apr 2021 22:15:50 +0000 (UTC) From: Andreas Sturmlechner 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 Message-ID: <2528085.lGaqSPkdTl@tuxbrain> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2355154.XAFRqVoOGU"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Archives-Salt: 946a41ee-aa14-4811-9653-f60b2db8005e X-Archives-Hash: 59a76651866faf0a2ec1012e725a2aff --nextPart2355154.XAFRqVoOGU Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org Subject: [PATCH] cuda.eclass: Drop EAPI-5 support, move some things around Date: Wed, 07 Apr 2021 00:15:43 +0200 Message-ID: <2528085.lGaqSPkdTl@tuxbrain> 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 -# @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 --nextPart2355154.XAFRqVoOGU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEE/x0UfMgLbk/MiQ+AUIqgAODug+AFAmBs3Y9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZG MUQxNDdDQzgwQjZFNEZDQzg5MEY4MDUwOEFBMDAwRTBFRTgzRTAACgkQUIqgAODu g+A+tAf+MffLZI8OBI5hEs1b000Fgu9Lj4yax/JXdAdUDasndCsCDeHEw2b6VCHU /We4cJSTxf+fv3BHH872vZ3Dh4Ar1j1HvvMY3rQkHQWbswF83FDguPSQgtqVZWtp hfHE8HhZGFutLBoKgHGQbzGmDlvPKtgzWL4koDUDenFvfyoHvleGYGsLoNo5XxGp aU/ppr0sqG7dr9aEUPdLtvuZxPNeNhab92xXiQFVvFiZt2WIb8Y1Qd4X+bsWWByV 1CMC0yl3wj/TFU9/Dj2obisIabC4Q8uY1tzuYtncX9bSbn+gS2p7u2BTY+Ph9DGa V3zyLB4BAABWeG1OiUpzxvvhO1VD2g== =n1rP -----END PGP SIGNATURE----- --nextPart2355154.XAFRqVoOGU--