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 9651A13933E for ; Wed, 14 Jul 2021 22:45:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E4994E09EE; Wed, 14 Jul 2021 22:45:18 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 CED2EE09EE for ; Wed, 14 Jul 2021 22:45:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F288B33BF35 for ; Wed, 14 Jul 2021 22:45:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A25D7D6 for ; Wed, 14 Jul 2021 22:45:14 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1626302702.023b13e88213bf2247c35960b590b598a17e68ac.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/nvidia-cuda-toolkit/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.2.88-r1.ebuild X-VCS-Directories: dev-util/nvidia-cuda-toolkit/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: 023b13e88213bf2247c35960b590b598a17e68ac X-VCS-Branch: master Date: Wed, 14 Jul 2021 22:45:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9585a04e-4670-4acd-9ead-0a7bf129d3a5 X-Archives-Hash: f5f8f700e5649ef78fcdf976537d027d commit: 023b13e88213bf2247c35960b590b598a17e68ac Author: Marek Szuba gentoo org> AuthorDate: Wed Jul 14 22:42:54 2021 +0000 Commit: Marek Szuba gentoo org> CommitDate: Wed Jul 14 22:45:02 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=023b13e8 dev-util/nvidia-cuda-toolkit: update EAPI 6 -> 7 Signed-off-by: Marek Szuba gentoo.org> .../nvidia-cuda-toolkit-9.2.88-r1.ebuild | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.2.88-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.2.88-r1.ebuild index bf17569c9df..1fc2740c122 100644 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.2.88-r1.ebuild +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-9.2.88-r1.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit check-reqs eutils toolchain-funcs unpacker versionator +inherit check-reqs toolchain-funcs unpacker -MYD=$(get_version_component_range 1-2) +MYD=$(ver_cut 1-2 ${PV}) DRIVER_PV="396.26" DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" @@ -18,8 +18,8 @@ KEYWORDS="-* ~amd64 ~amd64-linux" IUSE="debugger doc eclipse profiler" RESTRICT="bindist mirror" -DEPEND="" -RDEPEND="${DEPEND} +BDEPEND="" +RDEPEND=" =x11-drivers/nvidia-drivers-${DRIVER_PV} debugger? ( @@ -96,7 +96,7 @@ src_install() { done dodir ${cudadir} - mv * "${ED%/}${cudadir}" || die + mv * "${ED}${cudadir}" || die cat > "${T}"/99cuda <<- EOF || die PATH=${ecudadir}/bin$(usex profiler ":${ecudadir}/libnvvp" "") @@ -113,15 +113,19 @@ src_install() { pkg_postinst_check() { local a b - a="$(version_sort $(cuda-config -s))"; a=( $a ) - # greatest supported version - b="${a[${#a[@]}-1]}" + a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" + b="0.0" + for v in $a; do + if ver_test "${v}" -gt "${b}"; then + b="${v}" + fi + done # if gcc and if not gcc-version is at least greatest supported if tc-is-gcc && \ - ! version_is_at_least gcc-version ${b}; then + ver_test $(gcc-version) -gt ${b}; then ewarn "" - ewarn "gcc >= ${b} will not work with CUDA" + ewarn "gcc > ${b} will not work with CUDA" ewarn "Make sure you set an earlier version of gcc with gcc-config" ewarn "or append --compiler-bindir= pointing to a gcc bindir like" ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}"