Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/caffe2/
Date: Mon, 27 Feb 2023 07:23:55
Message-Id: 1677482595.04f1c73d1190c41edc24667ebd0c2505c62a6706.tupone@gentoo
1 commit: 04f1c73d1190c41edc24667ebd0c2505c62a6706
2 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 27 07:13:55 2023 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 27 07:23:15 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04f1c73d
7
8 sci-libs/caffe2: find the right GCC for CUDA
9
10 Closes: https://bugs.gentoo.org/888039
11 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
12
13 sci-libs/caffe2/caffe2-1.13.1-r1.ebuild | 10 ++++++++--
14 1 file changed, 8 insertions(+), 2 deletions(-)
15
16 diff --git a/sci-libs/caffe2/caffe2-1.13.1-r1.ebuild b/sci-libs/caffe2/caffe2-1.13.1-r1.ebuild
17 index 352a593d3559..4e0dfcb9b980 100644
18 --- a/sci-libs/caffe2/caffe2-1.13.1-r1.ebuild
19 +++ b/sci-libs/caffe2/caffe2-1.13.1-r1.ebuild
20 @@ -4,7 +4,7 @@
21 EAPI=8
22
23 PYTHON_COMPAT=( python3_{9..11} )
24 -inherit python-single-r1 cmake flag-o-matic
25 +inherit python-single-r1 cmake cuda flag-o-matic
26
27 MYPN=pytorch
28 MYP=${MYPN}-${PV}
29 @@ -148,7 +148,13 @@ src_configure() {
30 -DLIBSHM_INSTALL_LIB_SUBDIR="${EPREFIX}"/usr/$(get_libdir)
31 )
32
33 - use cuda && addpredict "/dev/nvidiactl" # bug 867706
34 + if use cuda; then
35 + addpredict "/dev/nvidiactl" # bug 867706
36 +
37 + mycmakeargs+=(
38 + -DCMAKE_CUDA_FLAGS="$(cuda_gccdir -f | tr -d \")"
39 + )
40 + fi
41 cmake_src_configure
42 }