cmake-utils.eclass: Drop remaining support for <cmake-3.4.0_rc1
[gentoo.git] / eclass / cuda.eclass
index e36d4ca1db9bba0f8e729991bb51b5f8232853a2..688251f3a3067471ed16e4e92aa986cc98c885f9 100644 (file)
@@ -1,12 +1,12 @@
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 inherit flag-o-matic toolchain-funcs versionator
 
 # @ECLASS: cuda.eclass
 # @MAINTAINER:
 # Justin Lecher <jlec@gentoo.org>
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
 # @BLURB: Common functions for cuda packages
 # @DESCRIPTION:
 # This eclass contains functions to be used with cuda package. Currently it is
@@ -31,7 +31,7 @@ if [[ -z ${_CUDA_ECLASS} ]]; then
 
 # @FUNCTION: cuda_gccdir
 # @USAGE: [-f]
-# @RETURN: gcc bindir compatible with current cuda, optionally (-f) prefixed with "--compiler-bindir="
+# @RETURN: gcc bindir compatible with current cuda, optionally (-f) prefixed with "--compiler-bindir "
 # @DESCRIPTION:
 # Helper for determination of the latest gcc bindir supported by
 # then current nvidia cuda toolkit.
@@ -39,7 +39,7 @@ if [[ -z ${_CUDA_ECLASS} ]]; then
 # Example:
 # @CODE
 # cuda_gccdir -f
-# -> --compiler-bindir="/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
+# -> --compiler-bindir "/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3"
 # @CODE
 cuda_gccdir() {
        debug-print-function ${FUNCNAME} "$@"
@@ -47,7 +47,7 @@ cuda_gccdir() {
        local gcc_bindir ver args="" flag ret
 
        # Currently we only support the gnu compiler suite
-       if [[ $(tc-getCXX) != *g++* ]]; then
+       if  ! tc-is-gcc ; then
                ewarn "Currently we only support the gnu compiler suite"
                return 2
        fi
@@ -55,7 +55,7 @@ cuda_gccdir() {
        while [ "$1" ]; do
                case $1 in
                        -f)
-                               flag="--compiler-bindir="
+                               flag="--compiler-bindir "
                                ;;
                        *)
                                ;;
@@ -110,7 +110,7 @@ cuda_sanitize() {
        NVCCFLAGS+=" $(cuda_gccdir -f)"
 
        # Tell nvcc which flags should be used for underlying C compiler
-       NVCCFLAGS+=" --compiler-options=\"${CXXFLAGS}\" --linker-options=\"${rawldflags// /,}\""
+       NVCCFLAGS+=" --compiler-options \"${CXXFLAGS}\" --linker-options \"${rawldflags// /,}\""
 
        debug-print "Using ${NVCCFLAGS} for cuda"
        export NVCCFLAGS
@@ -137,7 +137,7 @@ cuda_src_prepare() {
 case "${EAPI:-0}" in
        0|1)
                EXPORT_FUNCTIONS pkg_setup ;;
-       2|3|4|5)
+       2|3|4|5|6)
                EXPORT_FUNCTIONS src_prepare ;;
        *) die "EAPI=${EAPI} is not supported" ;;
 esac