commit:     2e4ccd369ca6972fe56b606d3e3885249a1d4362
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sun Jan 22 09:46:06 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Jan 23 09:32:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e4ccd36

sci-libs/vtk: drop native CUDA arch

Backport from 9.2.5, until detection is fixed upstream, don't allow the use of
VTK_CUDA_ARCH=native.

Bug: https://bugs.gentoo.org/835659
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/29200
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-libs/vtk/vtk-9.0.3-r7.ebuild | 12 ++++++++++++
 sci-libs/vtk/vtk-9.1.0-r6.ebuild | 12 ++++++++++++
 sci-libs/vtk/vtk-9.2.2-r1.ebuild | 32 ++++++++++++++++++++++++++------
 3 files changed, 50 insertions(+), 6 deletions(-)

diff --git a/sci-libs/vtk/vtk-9.0.3-r7.ebuild b/sci-libs/vtk/vtk-9.0.3-r7.ebuild
index 29ec066862cb..704b90b94032 100644
--- a/sci-libs/vtk/vtk-9.0.3-r7.ebuild
+++ b/sci-libs/vtk/vtk-9.0.3-r7.ebuild
@@ -151,6 +151,12 @@ pkg_pretend() {
                # 10.2 GiB install directory, 6.4 GiB build directory with max. 
USE flags
                CHECKREQS_MEMORY="7G"
                CHECKREQS_DISK_BUILD="14G"
+               if [[ ${VTK_CUDA_ARCH} = native ]]; then
+                       eerror "Using native CUDA arches is currently broken."
+                       eerror "Please set it to one of the common arch names:"
+                       eerror "kepler, maxwell, pascal, turing or ampere."
+                       die "Please set VTK_CUDA_ARCH environment variable!"
+               fi
        fi
        check-reqs_pkg_setup
 }
@@ -162,6 +168,12 @@ pkg_setup() {
        if use cuda; then
                CHECKREQS_MEMORY="7G"
                CHECKREQS_DISK_BUILD="14G"
+               if [[ ${VTK_CUDA_ARCH} = native ]]; then
+                       eerror "Using native CUDA arches is currently broken."
+                       eerror "Please set it to one of the common arch names:"
+                       eerror "kepler, maxwell, pascal, turing or ampere."
+                       die "Please set VTK_CUDA_ARCH environment variable!"
+               fi
        fi
        check-reqs_pkg_setup
 

diff --git a/sci-libs/vtk/vtk-9.1.0-r6.ebuild b/sci-libs/vtk/vtk-9.1.0-r6.ebuild
index f2d49d2249e2..e781751ccfda 100644
--- a/sci-libs/vtk/vtk-9.1.0-r6.ebuild
+++ b/sci-libs/vtk/vtk-9.1.0-r6.ebuild
@@ -188,6 +188,12 @@ pkg_pretend() {
                # 10.2 GiB install directory, 6.4 GiB build directory with max. 
USE flags
                CHECKREQS_MEMORY="7G"
                CHECKREQS_DISK_BUILD="14G"
+               if [[ ${VTK_CUDA_ARCH} = native ]]; then
+                       eerror "Using native CUDA arches is currently broken."
+                       eerror "Please set it to one of the common arch names:"
+                       eerror "kepler, maxwell, pascal, turing or ampere."
+                       die "Please set VTK_CUDA_ARCH environment variable!"
+               fi
        fi
 
        if use qt6 && use qt5; then
@@ -217,6 +223,12 @@ pkg_setup() {
        if use cuda; then
                CHECKREQS_MEMORY="7G"
                CHECKREQS_DISK_BUILD="14G"
+               if [[ ${VTK_CUDA_ARCH} = native ]]; then
+                       eerror "Using native CUDA arches is currently broken."
+                       eerror "Please set it to one of the common arch names:"
+                       eerror "kepler, maxwell, pascal, turing or ampere."
+                       die "Please set VTK_CUDA_ARCH environment variable!"
+               fi
        fi
 
        if use qt6 && use qt5; then

diff --git a/sci-libs/vtk/vtk-9.2.2-r1.ebuild b/sci-libs/vtk/vtk-9.2.2-r1.ebuild
index f5432d511348..cd85af34661c 100644
--- a/sci-libs/vtk/vtk-9.2.2-r1.ebuild
+++ b/sci-libs/vtk/vtk-9.2.2-r1.ebuild
@@ -204,6 +204,16 @@ pkg_pretend() {
                ewarn "Both qt5 and qt6 USE flags have been selected. Using 
qt5!"
        fi
 
+       # bug #835659
+       if use cuda; then
+               if [[ ${VTK_CUDA_ARCH} = native ]]; then
+                       eerror "Using native CUDA arches is currently broken."
+                       eerror "Please set it to one of the common arch names:"
+                       eerror "kepler, maxwell, pascal, turing or ampere."
+                       die "Please set VTK_CUDA_ARCH environment variable!"
+               fi
+       fi
+
        vtk_check_reqs
 }
 
@@ -220,6 +230,16 @@ pkg_setup() {
                ewarn "Both qt5 and qt6 USE flags have been selected. Using 
qt5!"
        fi
 
+       # bug #835659
+       if use cuda; then
+               if [[ ${VTK_CUDA_ARCH} = native ]]; then
+                       eerror "Using native CUDA arches is currently broken."
+                       eerror "Please set it to one of the common arch names:"
+                       eerror "kepler, maxwell, pascal, turing or ampere."
+                       die "Please set VTK_CUDA_ARCH environment variable!"
+               fi
+       fi
+
        vtk_check_reqs
 
        use java && java-pkg-opt-2_pkg_setup
@@ -399,12 +419,12 @@ src_configure() {
                        kepler|maxwell|pascal|volta|turing|ampere|all)
                                cuda_arch=${VTK_CUDA_ARCH}
                                ;;
-                       native)
-                               ewarn "If auto detection fails for you, please 
try and export the"
-                               ewarn "VTK_CUDA_ARCH environment variable to 
one of the common arch"
-                               ewarn "names: kepler, maxwell, pascal, volta, 
turing, ampere or all."
-                               cuda_arch=native
-                               ;;
+#                      native)
+#                              ewarn "If auto detection fails for you, please 
try and export the"
+#                              ewarn "VTK_CUDA_ARCH environment variable to 
one of the common arch"
+#                              ewarn "names: kepler, maxwell, pascal, volta, 
turing, ampere or all."
+#                              cuda_arch=native
+#                              ;;
                        *)
                                eerror "Please properly set the VTK_CUDA_ARCH 
environment variable to"
                                eerror "one of: kepler, maxwell, pascal, volta, 
turing, ampere, all"

Reply via email to