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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Tue Jul 31 07:37:19 2012 UTC (2 years, 1 month ago) by zerochaos
Branch: MAIN
Changes since 1.11: +2 -2 lines
bump to 4.2 with a few style improvements ;-)

(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-2.02.0807.1535.ebuild,v 1.11 2012/02/05 06:27:23 vapier Exp $
4
5 inherit eutils unpacker toolchain-funcs
6
7 DESCRIPTION="NVIDIA CUDA Software Development Kit"
8 HOMEPAGE="http://developer.nvidia.com/cuda"
9
10 SRC_URI="http://developer.download.nvidia.com/compute/cuda/2_0/linux/sdk/NVIDIA_CUDA_SDK_${PV}_linux.run"
11 LICENSE="CUDPP"
12 SLOT="0"
13 KEYWORDS="amd64 x86"
14 IUSE="debug emulation"
15
16 DEPEND="dev-util/nvidia-cuda-toolkit
17 >=x11-drivers/nvidia-drivers-177.73
18 media-libs/freeglut"
19
20 S="${WORKDIR}"
21 RESTRICT="binchecks"
22
23 pkg_setup() {
24 if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 4 ]; then
25 eerror "This package requires <=sys-devel/gcc-4.3 to build sucessfully."
26 eerror "Please use gcc-config to switch to a compatible GCC version."
27 die "<=sys-devel/gcc-4.3 required"
28 fi
29 }
30
31 src_unpack() {
32 unpack_makeself
33 cd "${S}"
34 epatch "${FILESDIR}/${P}-make_cpp_fix.patch"
35 sed -i -e 's:CUDA_INSTALL_PATH ?= .*:CUDA_INSTALL_PATH ?= /opt/cuda:' sdk/common/common.mk
36 }
37
38 src_compile() {
39 local myopts=""
40
41 if use emulation; then
42 myopts="emu=1"
43 fi
44
45 if use debug; then
46 myopts="${myopts} dbg=1"
47 fi
48
49 cd "${S}/sdk"
50 emake cuda-install=/opt/cuda ${myopts} || die
51 }
52
53 src_install() {
54 cd "${S}/sdk"
55
56 for f in $(find .); do
57 local t="$(dirname ${f})"
58 if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
59 continue
60 fi
61
62 if [[ -x "${f}" && ! -d "${f}" ]]; then
63 exeinto "/opt/cuda/sdk/$(dirname ${f})"
64 doexe "${f}"
65 else
66 insinto "/opt/cuda/sdk/$(dirname ${f})"
67 doins "${f}"
68 fi
69 done
70 }

  ViewVC Help
Powered by ViewVC 1.1.20