/[gentoo-x86]/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.ebuild
Gentoo

Contents of /dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Aug 2 05:10:47 2012 UTC (20 months, 2 weeks ago) by zerochaos
Branch: MAIN
Changes since 1.1: +6 -6 lines
fix stupidity recognized in bug #429370

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.ebuild,v 1.1 2012/07/31 07:37:19 zerochaos Exp $
4
5 EAPI=4
6
7 inherit unpacker toolchain-funcs
8
9 DESCRIPTION="NVIDIA CUDA Software Development Kit"
10 HOMEPAGE="http://developer.nvidia.com/cuda"
11
12 CUDA_V=${PV//_/-}
13 DIR_V=${CUDA_V//./_}
14 DIR_V=${DIR_V//beta/Beta}
15
16 SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/rel/sdk/gpucomputingsdk_${CUDA_V}.9_linux.run"
17 LICENSE="CUDPP"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="debug +doc +examples opencl +cuda"
21
22 RDEPEND=">=dev-util/nvidia-cuda-toolkit-${PV}
23 examples? ( >=x11-drivers/nvidia-drivers-260.19.21 )
24 media-libs/freeglut"
25 DEPEND="${RDEPEND}"
26
27 S="${WORKDIR}"
28
29 QA_EXECSTACK="opt/cuda/sdk/C/common/lib/linux/libGLEW.a:glew.o
30 opt/cuda/sdk/shared/lib/linux/libGLEW.a:glew.o
31 opt/cuda/sdk/CUDALibraries/common/lib/linux/libGLEW.a:glew.o"
32 QA_FLAGS_IGNORED="opt/cuda/sdk/C/bin/linux/release/.*
33 opt/cuda/sdk/OpenCL/bin/linux/release/.*"
34
35 pkg_setup() {
36 if use cuda || use opencl && [ $(gcc-major-version) -lt 4 -o $(gcc-minor-version) -lt 5 ]; then
37 eerror "This package requires >=sys-devel/gcc-4.5 to build sucessfully."
38 eerror "Please use gcc-config to switch to a compatible GCC version."
39 die ">=sys-devel/gcc-4.4 required"
40 fi
41 echo $(gcc-major-version) $(gcc-minor-version)
42 }
43
44 src_compile() {
45 if ! use examples; then
46 return
47 fi
48 local myopts=""
49
50 if use debug; then
51 myopts="${myopts} dbg=1"
52 fi
53
54 cd "${S}/sdk"
55
56 use cuda && emake -C C cuda-install=/opt/cuda ${myopts}
57 use opencl && emake -C OpenCL
58 }
59
60 src_install() {
61 cd "${S}/sdk"
62
63 if ! use doc; then
64 rm -rf *.txt doc */doc */Samples.htm */releaseNotesData || die
65 fi
66
67 if ! use examples; then
68 rm -rf bin */bin */tools || die
69 fi
70
71 for f in $(find .); do
72 local t="$(dirname ${f})"
73 if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
74 continue
75 fi
76
77 if [[ ! -d "${f}" ]]; then
78 if [[ -x "${f}" ]]; then
79 exeinto "/opt/cuda/sdk/${t}"
80 doexe "${f}"
81 else
82 insinto "/opt/cuda/sdk/${t}"
83 doins "${f}"
84 fi
85 fi
86 done
87 }

  ViewVC Help
Powered by ViewVC 1.1.20