Gentoo Archives: gentoo-commits

From: "Michael Januszewski (spock)" <spock@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/nvidia-cuda-sdk: ChangeLog nvidia-cuda-sdk-4.0.ebuild
Date: Sun, 29 May 2011 20:26:19
Message-Id: 20110529202610.514C420054@flycatcher.gentoo.org
1 spock 11/05/29 20:26:10
2
3 Modified: ChangeLog
4 Added: nvidia-cuda-sdk-4.0.ebuild
5 Log:
6 Add NVIDIA CUDA SDK v4.0.
7
8 (Portage version: 2.1.9.50/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.26 dev-util/nvidia-cuda-sdk/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog?rev=1.26&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog?rev=1.26&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog?r1=1.25&r2=1.26
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v
20 retrieving revision 1.25
21 retrieving revision 1.26
22 diff -u -r1.25 -r1.26
23 --- ChangeLog 12 Dec 2010 14:51:29 -0000 1.25
24 +++ ChangeLog 29 May 2011 20:26:10 -0000 1.26
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-util/nvidia-cuda-sdk
27 -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.25 2010/12/12 14:51:29 spock Exp $
29 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.26 2011/05/29 20:26:10 spock Exp $
31 +
32 +*nvidia-cuda-sdk-4.0 (29 May 2011)
33 +
34 + 29 May 2011; Michał Januszewski <spock@g.o>
35 + +nvidia-cuda-sdk-4.0.ebuild:
36 + Add NVIDIA CUDA SDK v4.0.
37
38 12 Dec 2010; Michał Januszewski <spock@g.o>
39 nvidia-cuda-sdk-3.2.ebuild:
40
41
42
43 1.1 dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild?rev=1.1&content-type=text/plain
47
48 Index: nvidia-cuda-sdk-4.0.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild,v 1.1 2011/05/29 20:26:10 spock Exp $
53
54 EAPI=2
55
56 inherit eutils toolchain-funcs
57
58 DESCRIPTION="NVIDIA CUDA Software Development Kit"
59 HOMEPAGE="http://developer.nvidia.com/cuda"
60
61 CUDA_V=${PV//_/-}
62 DIR_V=${CUDA_V//./_}
63 DIR_V=${DIR_V//beta/Beta}
64
65 SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/sdk/gpucomputingsdk_${CUDA_V}.17_linux.run"
66 LICENSE="CUDPP"
67 SLOT="0"
68 KEYWORDS="~amd64 ~x86"
69 IUSE="debug +doc +examples opencl +cuda"
70
71 RDEPEND=">=dev-util/nvidia-cuda-toolkit-4.0
72 examples? ( >=x11-drivers/nvidia-drivers-260.19.21 )
73 media-libs/freeglut"
74 DEPEND="${RDEPEND}"
75
76 S="${WORKDIR}"
77
78 RESTRICT="binchecks"
79
80 pkg_setup() {
81 if use cuda || use opencl && [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 5 ]; then
82 eerror "This package requires <=sys-devel/gcc-4.4 to build sucessfully."
83 eerror "Please use gcc-config to switch to a compatible GCC version."
84 die "<=sys-devel/gcc-4.4 required"
85 fi
86 }
87
88 src_unpack() {
89 unpack_makeself
90 }
91
92 src_compile() {
93 if ! use examples; then
94 return
95 fi
96 local myopts=""
97
98 if use debug; then
99 myopts="${myopts} dbg=1"
100 fi
101
102 cd "${S}/sdk"
103
104 if use cuda; then
105 cd C
106 emake cuda-install=/opt/cuda ${myopts} || die
107 cd ..
108 fi
109
110 if use opencl; then
111 cd OpenCL
112 emake || die
113 cd ..
114 fi
115 }
116
117 src_install() {
118 cd "${S}/sdk"
119
120 if ! use doc; then
121 rm -rf *.txt doc */doc */Samples.htm */releaseNotesData
122 fi
123
124 if ! use examples; then
125 rm -rf bin */bin */tools
126 fi
127
128 for f in $(find .); do
129 local t="$(dirname ${f})"
130 if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
131 continue
132 fi
133
134 if [[ ! -d "${f}" ]]; then
135 if [[ -x "${f}" ]]; then
136 exeinto "/opt/cuda/sdk/${t}"
137 doexe "${f}"
138 else
139 insinto "/opt/cuda/sdk/${t}"
140 doins "${f}"
141 fi
142 fi
143 done
144 }