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

Contents of /dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sun Feb 5 05:48:44 2012 UTC (2 years, 7 months ago) by vapier
Branch: MAIN
Changes since 1.5: +3 -7 lines
Move to new unpacker eclass for unpack_makeself.

(Portage version: 2.2.0_alpha84/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.2-r1.ebuild,v 1.5 2010/09/30 08:59:17 spock Exp $
4
5 EAPI=2
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
14 SRC_URI="http://developer.download.nvidia.com/compute/cuda/${CUDA_V}/sdk/cudasdk_${PV}_linux.run"
15 LICENSE="CUDPP"
16 SLOT="0"
17 KEYWORDS="~amd64 x86"
18 IUSE="debug +doc emulation +examples"
19
20 RDEPEND=">=dev-util/nvidia-cuda-toolkit-2.2
21 examples? ( !emulation? ( >=x11-drivers/nvidia-drivers-180.22 ) )
22 media-libs/freeglut"
23 DEPEND="${RDEPEND}
24 <sys-devel/gcc-4.4"
25
26 S="${WORKDIR}"
27
28 RESTRICT="binchecks"
29
30 pkg_setup() {
31 if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 4 ]; then
32 eerror "This package requires <=sys-devel/gcc-4.3 to build sucessfully."
33 eerror "Please use gcc-config to switch to a compatible GCC version."
34 die "<=sys-devel/gcc-4.3 required"
35 fi
36 }
37
38 src_prepare() {
39 sed -i -e 's:CUDA_INSTALL_PATH ?= .*:CUDA_INSTALL_PATH ?= /opt/cuda:' sdk/common/common.mk
40 }
41
42 src_compile() {
43 if ! use examples; then
44 return
45 fi
46 local myopts=""
47
48 if use emulation; then
49 myopts="emu=1"
50 fi
51
52 if use debug; then
53 myopts="${myopts} dbg=1"
54 fi
55
56 cd "${S}/sdk"
57 emake cuda-install=/opt/cuda ${myopts} || die
58 }
59
60 src_install() {
61 cd "${S}/sdk"
62
63 if ! use doc; then
64 rm -rf doc ReleaseNotes.htm releaseNotesData
65 fi
66
67 if ! use examples; then
68 rm -rf projects bin tools
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 [[ -x "${f}" && ! -d "${f}" ]]; then
78 exeinto "/opt/cuda/sdk/${t}"
79 doexe "${f}"
80 else
81 insinto "/opt/cuda/sdk/${t}"
82 doins "${f}"
83 fi
84 done
85 }

  ViewVC Help
Powered by ViewVC 1.1.20