summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-01-14 10:19:19 +0000
committerJustin Lecher <jlec@gentoo.org>2013-01-14 10:19:19 +0000
commitefab3235d37a4b687f497027ca34fe0b6d11f600 (patch)
treebb87d6c2d9a4a388dbc9dcf032197376623b2c2f
parentsci-libs/vtk: Solve problems with USE=examples, #447146 (diff)
downloadgentoo-2-efab3235d37a4b687f497027ca34fe0b6d11f600.tar.gz
gentoo-2-efab3235d37a4b687f497027ca34fe0b6d11f600.tar.bz2
gentoo-2-efab3235d37a4b687f497027ca34fe0b6d11f600.zip
dev-util/nvidia-cuda-sdk: Version Bump; drop old
(Portage version: 2.2.0_alpha151/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)
-rw-r--r--dev-util/nvidia-cuda-sdk/ChangeLog17
-rw-r--r--dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-4.2.9-asneeded.patch89
-rw-r--r--dev-util/nvidia-cuda-sdk/metadata.xml19
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.1.1215.2015.ebuild73
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.2.ebuild74
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.3.ebuild88
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild94
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0_beta1.ebuild94
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.1.ebuild83
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.2.ebuild91
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild91
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.1.ebuild92
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.9-r1.ebuild112
-rw-r--r--dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-5.0.35.ebuild136
14 files changed, 361 insertions, 792 deletions
diff --git a/dev-util/nvidia-cuda-sdk/ChangeLog b/dev-util/nvidia-cuda-sdk/ChangeLog
index c710312ed384..838627d2092a 100644
--- a/dev-util/nvidia-cuda-sdk/ChangeLog
+++ b/dev-util/nvidia-cuda-sdk/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for dev-util/nvidia-cuda-sdk
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.32 2012/08/02 05:10:47 zerochaos Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.33 2013/01/14 10:19:19 jlec Exp $
+
+*nvidia-cuda-sdk-5.0.35 (14 Jan 2013)
+*nvidia-cuda-sdk-4.2.9-r1 (14 Jan 2013)
+
+ 14 Jan 2013; Justin Lecher <jlec@gentoo.org>
+ -nvidia-cuda-sdk-2.1.1215.2015.ebuild, -nvidia-cuda-sdk-2.2.ebuild,
+ -nvidia-cuda-sdk-2.3.ebuild, -nvidia-cuda-sdk-3.0_beta1.ebuild,
+ -nvidia-cuda-sdk-3.0.ebuild, -nvidia-cuda-sdk-3.1.ebuild,
+ -nvidia-cuda-sdk-3.2.ebuild, -nvidia-cuda-sdk-4.0.ebuild,
+ -nvidia-cuda-sdk-4.1.ebuild, +nvidia-cuda-sdk-4.2.9-r1.ebuild,
+ +files/nvidia-cuda-sdk-4.2.9-asneeded.patch, +nvidia-cuda-sdk-5.0.35.ebuild,
+ metadata.xml:
+ Version Bump; drop old
02 Aug 2012; Rick Farina <zerochaos@gentoo.org> nvidia-cuda-sdk-4.2.ebuild:
fix stupidity recognized in bug #429370
diff --git a/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-4.2.9-asneeded.patch b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-4.2.9-asneeded.patch
new file mode 100644
index 000000000000..f639b967bda0
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-4.2.9-asneeded.patch
@@ -0,0 +1,89 @@
+--- a/sdk/C/common/common.mk
++++ b/sdk/C/common/common.mk
+@@ -268,18 +268,18 @@ endif
+
+ # If dynamically linking to CUDA and CUDART, we exclude the libraries from the LIB
+ ifeq ($(USECUDADYNLIB),1)
+- LIB += ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) ${LIB} -ldl -rdynamic
++ LIB += $(RENDERCHECKGLLIB) ${OPENGLLIB} $(PARAMGLLIB) ${LIB} -ldl -rdynamic
+ else
+ # static linking, we will statically link against CUDA and CUDART
+ ifeq ($(USEDRVAPI),1)
+- LIB += -lcuda ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) ${LIB}
++ LIB += -lcuda $(RENDERCHECKGLLIB) ${OPENGLLIB} $(PARAMGLLIB) ${LIB}
+ else
+ ifeq ($(emu),1)
+ LIB += -lcudartemu
+ else
+ LIB += -lcudart
+ endif
+- LIB += ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) ${LIB}
++ LIB += $(RENDERCHECKGLLIB) ${OPENGLLIB} $(PARAMGLLIB) ${LIB}
+ endif
+ endif
+
+--- a/sdk/CUDALibraries/common/common_cudalib.mk
++++ b/sdk/CUDALibraries/common/common_cudalib.mk
+@@ -253,7 +253,7 @@ ifeq ($(USEPARAMGL),1)
+ endif
+
+ ifeq ($(USERENDERCHECKGL),1)
+- RENDERCHECKGLLIB := -lrendercheckgl_$(LIB_ARCH)$(LIBSUFFIX)
++ RENDERCHECKGLLIB := -L../../../C/lib -lrendercheckgl_$(LIB_ARCH)$(LIBSUFFIX)
+ endif
+
+ ifeq ($(USENVCUVID), 1)
+--- a/sdk/CUDALibraries/src/boxFilterNPP/Makefile
++++ b/sdk/CUDALibraries/src/boxFilterNPP/Makefile
+@@ -38,7 +38,7 @@ include ../../common/common_npplib.mk
+ # Targets
+ ################################################################################
+ all:
+- $(CXX) $(INC) $(LIB) -o boxFilterNPP boxFilterNPP.cpp -lUtilNPP_$(LIB_ARCH) -lfreeimage$(FREEIMAGELIBARCH)
++ $(CXX) $(INC) -o boxFilterNPP boxFilterNPP.cpp -lUtilNPP_$(LIB_ARCH) -lfreeimage$(FREEIMAGELIBARCH) $(LIB)
+ mkdir -p ../../bin
+ mkdir -p ../../bin/$(OSLOWER)/
+ mkdir -p ../../bin/$(OSLOWER)/debug
+--- a/sdk/CUDALibraries/src/freeImageInteropNPP/Makefile
++++ b/sdk/CUDALibraries/src/freeImageInteropNPP/Makefile
+@@ -38,7 +38,7 @@ include ../../common/common_npplib.mk
+ # Targets
+ ################################################################################
+ all:
+- $(CXX) $(INC) $(LIB) -o freeImageInteropNPP freeImageInteropNPP.cpp -lUtilNPP_$(LIB_ARCH) -lfreeimage$(FREEIMAGELIBARCH)
++ $(CXX) $(INC) -o freeImageInteropNPP freeImageInteropNPP.cpp -lUtilNPP_$(LIB_ARCH) -lfreeimage$(FREEIMAGELIBARCH) $(LIB)
+ mkdir -p ../../bin
+ mkdir -p ../../bin/$(OSLOWER)
+ mkdir -p ../../bin/$(OSLOWER)/release
+--- a/sdk/CUDALibraries/src/histEqualizationNPP/Makefile
++++ b/sdk/CUDALibraries/src/histEqualizationNPP/Makefile
+@@ -38,7 +38,7 @@ include ../../common/common_npplib.mk
+ # Targets
+ ################################################################################
+ all:
+- $(CXX) $(INC) $(LIB) -o histEqualizationNPP histEqualizationNPP.cpp -lUtilNPP_$(LIB_ARCH) -lfreeimage$(FREEIMAGELIBARCH)
++ $(CXX) $(INC) -o histEqualizationNPP histEqualizationNPP.cpp -lUtilNPP_$(LIB_ARCH) -lfreeimage$(FREEIMAGELIBARCH) $(LIB)
+ mkdir -p ../../bin
+ mkdir -p ../../bin/$(OSLOWER)
+ mkdir -p ../../bin/$(OSLOWER)/release
+--- a/sdk/CUDALibraries/src/imageSegmentationNPP/Makefile
++++ b/sdk/CUDALibraries/src/imageSegmentationNPP/Makefile
+@@ -38,7 +38,7 @@ include ../../common/common_npplib.mk
+ # Targets
+ ################################################################################
+ all:
+- $(CXX) $(INC) $(LIB) -o imageSegmentationNPP imageSegmentationNPP.cpp -lUtilNPP_$(LIB_ARCH) -lfreeimage$(FREEIMAGELIBARCH)
++ $(CXX) $(INC) -o imageSegmentationNPP imageSegmentationNPP.cpp -lUtilNPP_$(LIB_ARCH) -lfreeimage$(FREEIMAGELIBARCH) $(LIB)
+ mkdir -p ../../bin
+ mkdir -p ../../bin/$(OSLOWER)
+ mkdir -p ../../bin/$(OSLOWER)/release
+--- a/sdk/CUDALibraries/src/randomFog/Makefile
++++ b/sdk/CUDALibraries/src/randomFog/Makefile
+@@ -45,6 +45,7 @@ CCFILES := randomFog.cpp rng.cpp
+ USECURAND := 1
+ USEGLLIB := 1
+ USEGLUT := 1
++USERENDERCHECKGL := 1
+
+ ################################################################################
+ # Rules and targets
diff --git a/dev-util/nvidia-cuda-sdk/metadata.xml b/dev-util/nvidia-cuda-sdk/metadata.xml
index 7045b9a4796e..05c4766adab4 100644
--- a/dev-util/nvidia-cuda-sdk/metadata.xml
+++ b/dev-util/nvidia-cuda-sdk/metadata.xml
@@ -1,21 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer>
- <email>spock@gentoo.org</email>
- <name>Michał Januszewski</name>
- </maintainer>
- <use>
- <flag name='emulation'>
+ <maintainer>
+ <email>spock@gentoo.org</email>
+ <name>Michał Januszewski</name>
+ </maintainer>
+ <use>
+ <flag name="emulation">
Build binaries for device emulation mode. These binaries
will not require a CUDA-capable GPU to run.
</flag>
- <flag name='opencl'>
+ <flag name="opencl">
Build OpenCL binaries.
</flag>
- <flag name='cuda'>
+ <flag name="cuda">
Build CUDA binaries.
</flag>
- </use>
+ </use>
</pkgmetadata>
-
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.1.1215.2015.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.1.1215.2015.ebuild
deleted file mode 100644
index 8a918f64df5e..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.1.1215.2015.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.1.1215.2015.ebuild,v 1.8 2012/02/05 05:48:44 vapier Exp $
-
-inherit eutils unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/2_1/SDK/cuda-sdk-linux-2.10.1215.2015-3233425.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug emulation"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-2.1
- >=x11-drivers/nvidia-drivers-180.22
- media-libs/freeglut"
-DEPEND="${RDEPEND}
- <sys-devel/gcc-4.4"
-
-S="${WORKDIR}"
-RESTRICT="binchecks"
-
-pkg_setup() {
- if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 4 ]; then
- eerror "This package requires <=sys-devel/gcc-4.3 to build sucessfully."
- eerror "Please use gcc-config to switch to a compatible GCC version."
- die "<=sys-devel/gcc-4.3 required"
- fi
-}
-
-src_unpack() {
- unpack_makeself
- cd "${S}"
- sed -i -e 's:CUDA_INSTALL_PATH ?= .*:CUDA_INSTALL_PATH ?= /opt/cuda:' sdk/common/common.mk
- epatch "${FILESDIR}/nvidia-cuda-sdk-2.10.1215.2015-vararg_inline_fix.patch"
-}
-
-src_compile() {
- local myopts=""
-
- if use emulation; then
- myopts="emu=1"
- fi
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk"
-
- MAKEOPTS="${MAKEOPTS} -j1" emake cuda-install=/opt/cuda ${myopts} || die
-}
-
-src_install() {
- cd "${S}/sdk"
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ -x "${f}" && ! -d "${f}" ]]; then
- exeinto "/opt/cuda/sdk/$(dirname ${f})"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/$(dirname ${f})"
- doins "${f}"
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.2.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.2.ebuild
deleted file mode 100644
index 9bb7c039194b..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.2.ebuild
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.2.ebuild,v 1.7 2012/02/05 05:48:44 vapier Exp $
-
-inherit unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-CUDA_V=${PV//./_}
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/${CUDA_V}/sdk/cudasdk_${PV}_linux.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug emulation"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-2.2
- >=x11-drivers/nvidia-drivers-180.22
- media-libs/freeglut"
-DEPEND="${RDEPEND}
- <sys-devel/gcc-4.4"
-
-S="${WORKDIR}"
-
-RESTRICT="binchecks"
-
-pkg_setup() {
- if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 4 ]; then
- eerror "This package requires <=sys-devel/gcc-4.3 to build sucessfully."
- eerror "Please use gcc-config to switch to a compatible GCC version."
- die "<=sys-devel/gcc-4.3 required"
- fi
-}
-
-src_unpack() {
- unpack_makeself
- cd "${S}"
- sed -i -e 's:CUDA_INSTALL_PATH ?= .*:CUDA_INSTALL_PATH ?= /opt/cuda:' sdk/common/common.mk
-}
-
-src_compile() {
- local myopts=""
-
- if use emulation; then
- myopts="emu=1"
- fi
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk"
- emake cuda-install=/opt/cuda ${myopts} || die
-}
-
-src_install() {
- cd "${S}/sdk"
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ -x "${f}" && ! -d "${f}" ]]; then
- exeinto "/opt/cuda/sdk/$(dirname ${f})"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/$(dirname ${f})"
- doins "${f}"
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.3.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.3.ebuild
deleted file mode 100644
index 18031aa60bdd..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.3.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-2.3.ebuild,v 1.4 2012/02/05 05:48:44 vapier Exp $
-
-EAPI=2
-
-inherit unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-CUDA_V=${PV//./_}
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/${CUDA_V}/sdk/cudasdk_${PV}_linux.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug +doc emulation +examples"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-2.3
- examples? ( !emulation? ( >=x11-drivers/nvidia-drivers-190.18 ) )
- media-libs/freeglut"
-DEPEND="${RDEPEND}
- <sys-devel/gcc-4.4"
-
-S="${WORKDIR}"
-
-RESTRICT="binchecks"
-
-pkg_setup() {
- if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 4 ]; then
- eerror "This package requires <=sys-devel/gcc-4.3 to build sucessfully."
- eerror "Please use gcc-config to switch to a compatible GCC version."
- die "<=sys-devel/gcc-4.3 required"
- fi
-}
-
-src_prepare() {
- sed -i -e 's:CUDA_INSTALL_PATH ?= .*:CUDA_INSTALL_PATH ?= /opt/cuda:' sdk/shared/common.mk sdk/C/common/common.mk
-}
-
-src_compile() {
- if ! use examples; then
- return
- fi
- local myopts=""
-
- if use emulation; then
- myopts="emu=1"
- fi
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk/C"
- emake cuda-install=/opt/cuda ${myopts} || die
-}
-
-src_install() {
- cd "${S}/sdk"
-
- # This only contains object files.
- rm -rf projects
-
- if ! use doc; then
- rm -rf C/doc C/ReleaseNotes.html C/releaseNotesData
- fi
-
- if ! use examples; then
- rm -rf C/bin C/src
- fi
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ -x "${f}" && ! -d "${f}" ]]; then
- exeinto "/opt/cuda/sdk/${t}"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/${t}"
- doins "${f}"
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild
deleted file mode 100644
index 81b643fa20aa..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0.ebuild,v 1.4 2012/02/05 05:48:44 vapier Exp $
-
-EAPI=2
-
-inherit unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-CUDA_V=${PV//_/-}
-DIR_V=${CUDA_V//./_}
-DIR_V=${DIR_V//beta/Beta}
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/sdk/gpucomputingsdk_${CUDA_V}_linux.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug +doc emulation +examples opencl +cuda"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-3.0_beta1
- examples? ( !emulation? ( >=x11-drivers/nvidia-drivers-195.30 ) )
- media-libs/freeglut"
-DEPEND="${RDEPEND}
- <sys-devel/gcc-4.4"
-
-S="${WORKDIR}"
-
-RESTRICT="binchecks"
-
-pkg_setup() {
- if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 4 ]; then
- eerror "This package requires <=sys-devel/gcc-4.3 to build sucessfully."
- eerror "Please use gcc-config to switch to a compatible GCC version."
- die "<=sys-devel/gcc-4.3 required"
- fi
-}
-
-src_compile() {
- if ! use examples; then
- return
- fi
- local myopts=""
-
- if use emulation; then
- myopts="emu=1"
- fi
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk"
-
- if use cuda; then
- cd C
- emake cuda-install=/opt/cuda ${myopts} || die
- cd ..
- fi
-
- if use opencl; then
- cd OpenCL
- emake || die
- cd ..
- fi
-}
-
-src_install() {
- cd "${S}/sdk"
-
- if ! use doc; then
- rm -rf doc ReleaseNotes.htm releaseNotesData
- fi
-
- if ! use examples; then
- rm -rf bin tools
- fi
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ -x "${f}" && ! -d "${f}" ]]; then
- exeinto "/opt/cuda/sdk/${t}"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/${t}"
- doins "${f}"
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0_beta1.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0_beta1.ebuild
deleted file mode 100644
index 60fad82b9a27..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0_beta1.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.0_beta1.ebuild,v 1.4 2012/02/05 05:48:44 vapier Exp $
-
-EAPI=2
-
-inherit unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-CUDA_V=${PV//_/-}
-DIR_V=${CUDA_V//./_}
-DIR_V=${DIR_V//beta/Beta}
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/sdk/gpucomputingsdk_${CUDA_V}_linux.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug +doc emulation +examples opencl +cuda"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-3.0_beta1
- examples? ( !emulation? ( >=x11-drivers/nvidia-drivers-195.30 ) )
- media-libs/freeglut"
-DEPEND="${RDEPEND}
- <sys-devel/gcc-4.4"
-
-S="${WORKDIR}"
-
-RESTRICT="binchecks"
-
-pkg_setup() {
- if [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 4 ]; then
- eerror "This package requires <=sys-devel/gcc-4.3 to build sucessfully."
- eerror "Please use gcc-config to switch to a compatible GCC version."
- die "<=sys-devel/gcc-4.3 required"
- fi
-}
-
-src_compile() {
- if ! use examples; then
- return
- fi
- local myopts=""
-
- if use emulation; then
- myopts="emu=1"
- fi
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk"
-
- if use cuda; then
- cd C
- emake cuda-install=/opt/cuda ${myopts} || die
- cd ..
- fi
-
- if use opencl; then
- cd OpenCL
- emake || die
- cd ..
- fi
-}
-
-src_install() {
- cd "${S}/sdk"
-
- if ! use doc; then
- rm -rf doc ReleaseNotes.htm releaseNotesData
- fi
-
- if ! use examples; then
- rm -rf bin tools
- fi
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ -x "${f}" && ! -d "${f}" ]]; then
- exeinto "/opt/cuda/sdk/${t}"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/${t}"
- doins "${f}"
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.1.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.1.ebuild
deleted file mode 100644
index 530009d7ec38..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.1.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.1.ebuild,v 1.4 2012/02/05 05:48:44 vapier Exp $
-
-EAPI=2
-
-inherit unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-CUDA_V=${PV//_/-}
-DIR_V=${CUDA_V//./_}
-DIR_V=${DIR_V//beta/Beta}
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/sdk/gpucomputingsdk_${CUDA_V}_linux.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug +doc +examples opencl +cuda"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-3.1
- examples? ( >=x11-drivers/nvidia-drivers-256.35 )
- media-libs/freeglut"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}"
-
-RESTRICT="binchecks"
-
-src_compile() {
- if ! use examples; then
- return
- fi
- local myopts=""
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk"
-
- if use cuda; then
- cd C
- emake cuda-install=/opt/cuda ${myopts} || die
- cd ..
- fi
-
- if use opencl; then
- cd OpenCL
- emake || die
- cd ..
- fi
-}
-
-src_install() {
- cd "${S}/sdk"
-
- if ! use doc; then
- rm -rf *.txt doc */doc */Samples.htm */releaseNotesData
- fi
-
- if ! use examples; then
- rm -rf bin */bin */tools
- fi
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ ! -d "${f}" ]]; then
- if [[ -x "${f}" ]]; then
- exeinto "/opt/cuda/sdk/${t}"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/${t}"
- doins "${f}"
- fi
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.2.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.2.ebuild
deleted file mode 100644
index b1245a0ee3ed..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.2.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-3.2.ebuild,v 1.3 2012/02/05 05:48:44 vapier Exp $
-
-EAPI=2
-
-inherit unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-CUDA_V=${PV//_/-}
-DIR_V=${CUDA_V//./_}
-DIR_V=${DIR_V//beta/Beta}
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}_prod/sdk/gpucomputingsdk_${CUDA_V}.16_linux.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug +doc +examples opencl +cuda"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-3.2
- examples? ( >=x11-drivers/nvidia-drivers-260.19.21 )
- media-libs/freeglut"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}"
-
-RESTRICT="binchecks"
-
-pkg_setup() {
- if use cuda || use opencl && [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 5 ]; then
- eerror "This package requires <=sys-devel/gcc-4.4 to build sucessfully."
- eerror "Please use gcc-config to switch to a compatible GCC version."
- die "<=sys-devel/gcc-4.4 required"
- fi
-}
-
-src_compile() {
- if ! use examples; then
- return
- fi
- local myopts=""
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk"
-
- if use cuda; then
- cd C
- emake cuda-install=/opt/cuda ${myopts} || die
- cd ..
- fi
-
- if use opencl; then
- cd OpenCL
- emake || die
- cd ..
- fi
-}
-
-src_install() {
- cd "${S}/sdk"
-
- if ! use doc; then
- rm -rf *.txt doc */doc */Samples.htm */releaseNotesData
- fi
-
- if ! use examples; then
- rm -rf bin */bin */tools
- fi
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ ! -d "${f}" ]]; then
- if [[ -x "${f}" ]]; then
- exeinto "/opt/cuda/sdk/${t}"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/${t}"
- doins "${f}"
- fi
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild
deleted file mode 100644
index ad4475ad49a9..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.0.ebuild,v 1.2 2012/02/05 05:48:44 vapier Exp $
-
-EAPI=2
-
-inherit unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-CUDA_V=${PV//_/-}
-DIR_V=${CUDA_V//./_}
-DIR_V=${DIR_V//beta/Beta}
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/sdk/gpucomputingsdk_${CUDA_V}.17_linux.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug +doc +examples opencl +cuda"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-4.0
- examples? ( >=x11-drivers/nvidia-drivers-260.19.21 )
- media-libs/freeglut"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}"
-
-RESTRICT="binchecks"
-
-pkg_setup() {
- if use cuda || use opencl && [ "$(gcc-major-version)" == "4" -a $(gcc-minor-version) -ge 5 ]; then
- eerror "This package requires <=sys-devel/gcc-4.4 to build sucessfully."
- eerror "Please use gcc-config to switch to a compatible GCC version."
- die "<=sys-devel/gcc-4.4 required"
- fi
-}
-
-src_compile() {
- if ! use examples; then
- return
- fi
- local myopts=""
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk"
-
- if use cuda; then
- cd C
- emake cuda-install=/opt/cuda ${myopts} || die
- cd ..
- fi
-
- if use opencl; then
- cd OpenCL
- emake || die
- cd ..
- fi
-}
-
-src_install() {
- cd "${S}/sdk"
-
- if ! use doc; then
- rm -rf *.txt doc */doc */Samples.htm */releaseNotesData
- fi
-
- if ! use examples; then
- rm -rf bin */bin */tools
- fi
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ ! -d "${f}" ]]; then
- if [[ -x "${f}" ]]; then
- exeinto "/opt/cuda/sdk/${t}"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/${t}"
- doins "${f}"
- fi
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.1.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.1.ebuild
deleted file mode 100644
index 6720501827ee..000000000000
--- a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.1.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.1.ebuild,v 1.3 2012/02/05 16:39:02 spock Exp $
-
-EAPI=2
-
-inherit unpacker toolchain-funcs
-
-DESCRIPTION="NVIDIA CUDA Software Development Kit"
-HOMEPAGE="http://developer.nvidia.com/cuda"
-
-CUDA_V=${PV//_/-}
-DIR_V=${CUDA_V//./_}
-DIR_V=${DIR_V//beta/Beta}
-
-SRC_URI="http://developer.download.nvidia.com/compute/cuda/${DIR_V}/rel/sdk/gpucomputingsdk_${CUDA_V}.28_linux.run"
-LICENSE="CUDPP"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug +doc +examples opencl +cuda"
-
-RDEPEND=">=dev-util/nvidia-cuda-toolkit-4.1
- examples? ( >=x11-drivers/nvidia-drivers-260.19.21 )
- media-libs/freeglut"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}"
-
-RESTRICT="binchecks"
-
-pkg_setup() {
- if use cuda || use opencl && [ $(gcc-major-version) -lt 4 -o $(gcc-minor-version) -lt 5 ]; then
- eerror "This package requires >=sys-devel/gcc-4.5 to build sucessfully."
- eerror "Please use gcc-config to switch to a compatible GCC version."
- die ">=sys-devel/gcc-4.4 required"
- fi
- echo $(gcc-major-version) $(gcc-minor-version)
-}
-
-src_compile() {
- if ! use examples; then
- return
- fi
- local myopts=""
-
- if use debug; then
- myopts="${myopts} dbg=1"
- fi
-
- cd "${S}/sdk"
-
- if use cuda; then
- cd C
- emake cuda-install=/opt/cuda ${myopts} || die
- cd ..
- fi
-
- if use opencl; then
- cd OpenCL
- emake || die
- cd ..
- fi
-}
-
-src_install() {
- cd "${S}/sdk"
-
- if ! use doc; then
- rm -rf *.txt doc */doc */Samples.htm */releaseNotesData
- fi
-
- if ! use examples; then
- rm -rf bin */bin */tools
- fi
-
- for f in $(find .); do
- local t="$(dirname ${f})"
- if [[ "${t/obj\/}" != "${t}" || "${t##*.}" == "a" ]]; then
- continue
- fi
-
- if [[ ! -d "${f}" ]]; then
- if [[ -x "${f}" ]]; then
- exeinto "/opt/cuda/sdk/${t}"
- doexe "${f}"
- else
- insinto "/opt/cuda/sdk/${t}"
- doins "${f}"
- fi
- fi
- done
-}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.9-r1.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.9-r1.ebuild
new file mode 100644
index 000000000000..92b99478c86c
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.9-r1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-4.2.9-r1.ebuild,v 1.1 2013/01/14 10:19:19 jlec Exp $
+
+EAPI=4
+
+inherit cuda eutils toolchain-funcs unpacker versionator
+
+MYD=$(get_version_component_range 1)_$(get_version_component_range 2)
+DESCRIPTION="NVIDIA CUDA Software Development Kit"
+HOMEPAGE="http://developer.nvidia.com/cuda"
+SRC_URI="http://developer.download.nvidia.com/compute/cuda/${MYD}/rel/sdk/gpucomputingsdk_${PV}_linux.run"
+
+LICENSE="CUDPP"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug +doc +examples opencl +cuda"
+
+RDEPEND="
+ >=dev-util/nvidia-cuda-toolkit-${PV}
+ media-libs/freeglut
+ examples? (
+ >=x11-drivers/nvidia-drivers-296
+ media-libs/glew
+ )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ if use cuda || use opencl; then
+ cuda_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+ sed \
+ -e 's:-O2::g' \
+ -e 's:-O3::g' \
+ -e "/LINK/s:gcc:$(tc-getCC) ${LDFLAGS}:g" \
+ -e "/LINK/s:g++:$(tc-getCXX) ${LDFLAGS}:g" \
+ -e "/LINKFLAGS/s:=:= ${LDFLAGS} :g" \
+ -e "/CC/s:gcc:$(tc-getCC):g" \
+ -e "/CXX/s:g++:$(tc-getCXX):g" \
+ -e "/NVCCFLAGS/s|\(:=\)|\1 ${NVCCFLAGS} |g" \
+ -e "/ CFLAGS/s|\(:=\)|\1 ${CFLAGS}|g" \
+ -e "/ CXXFLAGS/s|\(:=\)|\1 ${CXXFLAGS}|g" \
+ -e 's:-Wimplicit::g' \
+ -e 's:GLEW_x86_64:GLEW:g' \
+ -i $(find sdk -type f -name "*.mk") || die
+
+ find sdk/shared/inc/GL -delete || die
+ find sdk -type f -name "*\.a" -delete || die
+}
+
+src_compile() {
+ use examples || return
+ local myopts verbose="verbose=1"
+ use debug && myopts+=" dbg=1"
+ cd sdk
+ use cuda && emake -C C cuda-install="${EPREFIX}/opt/cuda" ${myopts} ${verbose}
+ use opencl && emake -C OpenCL ${verbose}
+}
+
+src_install() {
+ local i j f t crap=""
+ cd sdk
+ if use doc; then
+ ebegin "Installing docs ..."
+ for i in *; do
+ if [[ -d ${i} ]]; then
+ for j in doc releaseNotesData; do
+ docinto ${i}
+ [[ -d ${i}/${j} ]] && dodoc -r ${i}/${j}
+ done
+ fi
+ done
+ dodoc -r doc
+ dohtml {.,*}/*htm*
+ eend
+ fi
+
+ crap+=" *.txt doc */doc */Samples.htm* */releaseNotesData"
+
+ if ! use examples; then
+ crap+=" */bin */tools"
+ fi
+
+ ebegin "Cleaning before installation..."
+ find ${crap} -delete || die
+ find . \( -name Makefile -o -name "*.mk" \) -delete || die
+ eend
+
+ ebegin "Moving files..."
+ for f in $(find .); do
+ local t="$(dirname ${f})"
+ if [[ ${t/obj\/} != ${t} || ${t##*.} == a ]]; then
+ continue
+ fi
+ if [[ ! -d ${f} ]]; then
+ if [[ -x ${f} ]]; then
+ exeinto /opt/cuda/sdk/${t}
+ doexe ${f}
+ else
+ insinto /opt/cuda/sdk/${t}
+ doins ${f}
+ fi
+ fi
+ done
+ eend
+}
diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-5.0.35.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-5.0.35.ebuild
new file mode 100644
index 000000000000..52388d60de1f
--- /dev/null
+++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-5.0.35.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-5.0.35.ebuild,v 1.1 2013/01/14 10:19:19 jlec Exp $
+
+EAPI=4
+
+inherit cuda eutils flag-o-matic toolchain-funcs unpacker versionator
+
+MYD=$(get_version_component_range 1)_$(get_version_component_range 2)
+DISTRO=fedora16-1
+
+DESCRIPTION="NVIDIA CUDA Software Development Kit"
+HOMEPAGE="http://developer.nvidia.com/cuda"
+CURI="http://developer.download.nvidia.com/compute/cuda/${MYD}/rel-update-1/installers/"
+SRC_URI="
+ http://dev.gentoo.org/~jlec/distfiles/${P}-asneeded.patch.xz
+ amd64? ( ${CURI}/cuda_${PV}_linux_64_${DISTRO}.run )
+ x86? ( ${CURI}/cuda_${PV}_linux_32_${DISTRO}.run )"
+
+LICENSE="CUDPP"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug +doc +examples opencl +cuda"
+
+RDEPEND="
+ >=dev-util/nvidia-cuda-toolkit-${PV}
+ media-libs/freeglut
+ examples? (
+ media-libs/freeimage
+ media-libs/glew
+ >=x11-drivers/nvidia-drivers-304.54
+ )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/sdk
+
+# nvcc doesn't support LDFLAGS
+QA_FLAGS_IGNORED=(
+ opt/cuda/sdk/0_Simple/simpleMPI/simpleMPI
+ opt/cuda/sdk/0_Simple/cdpSimplePrint/cdpSimplePrint
+ opt/cuda/sdk/0_Simple/cdpSimpleQuicksort/cdpSimpleQuicksort
+ opt/cuda/sdk/6_Advanced/cdpAdvancedQuicksort/cdpAdvancedQuicksort
+ opt/cuda/sdk/6_Advanced/cdpLUDecomposition/cdpLUDecomposition
+ opt/cuda/sdk/6_Advanced/cdpQuadtree/cdpQuadtree
+ opt/cuda/sdk/bin/linux/release/cdpLUDecomposition
+ opt/cuda/sdk/bin/linux/release/cdpSimpleQuicksort
+ opt/cuda/sdk/bin/linux/release/simpleMPI
+ opt/cuda/sdk/bin/linux/release/cdpAdvancedQuicksort
+ opt/cuda/sdk/bin/linux/release/cdpQuadtree
+ opt/cuda/sdk/bin/linux/release/cdpSimplePrint
+ )
+
+src_unpack() {
+ unpacker
+ unpacker run_files/cuda-samples*run
+}
+
+pkg_setup() {
+ if use cuda || use opencl; then
+ cuda_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/${P}-asneeded.patch
+ sed \
+ -e 's:-O2::g' \
+ -e 's:-O3::g' \
+ -e "/LINK/s:gcc:$(tc-getCC) ${LDFLAGS}:g" \
+ -e "/LINK/s:g++:$(tc-getCXX) ${LDFLAGS}:g" \
+ -e "/LINKFLAGS/s:=:= ${LDFLAGS} :g" \
+ -e "/CC/s:gcc:$(tc-getCC):g" \
+ -e "/GCC/s:g++:$(tc-getCXX):g" \
+ -e "/NVCCFLAGS/s|\(:=\)|\1 ${NVCCFLAGS} |g" \
+ -e "/ CFLAGS/s|\(:=\)|\1 ${CFLAGS}|g" \
+ -e "/ CXXFLAGS/s|\(:=\)|\1 ${CXXFLAGS}|g" \
+ -e 's:-Wimplicit::g' \
+ -e "s|../../common/lib/linux/\$(OS_ARCH)/libGLEW.a|$(pkg-config --libs glew)|g" \
+ -e "s|../../common/lib/\$(OSLOWER)/libGLEW.a|$(pkg-config --libs glew)|g" \
+ -e "s|../../common/lib/\$(OSLOWER)/\$(OS_ARCH)/libGLEW.a|$(pkg-config --libs glew)|g" \
+ -i $(find . -type f -name "Makefile") || die
+
+ export RAWLDFLAGS="$(raw-ldflags)"
+
+ find common/inc/GL -delete || die
+ find . -type f -name "*\.a" -delete || die
+}
+
+src_compile() {
+ use examples || return
+ local myopts verbose="verbose=1"
+ use debug && myopts+=" dbg=1"
+ emake \
+ cuda-install="${EPREFIX}/opt/cuda" \
+ CUDA_PATH="${EPREFIX}/opt/cuda/" \
+ ${myopts} ${verbose}
+}
+
+src_install() {
+ local i j f t crap=""
+ if use doc; then
+ ebegin "Installing docs ..."
+ dodoc -r doc releaseNotesData
+ dohtml *htm*
+ eend
+ fi
+
+ crap+=" *.txt doc Samples.htm* releaseNotesData"
+
+ if ! use examples; then
+ crap+=" */bin */tools"
+ fi
+
+ ebegin "Cleaning before installation..."
+ find ${crap} -delete || die
+ find . \( -name Makefile -o -name "*.mk" \) -delete || die
+ eend
+
+ ebegin "Moving files..."
+ for f in $(find .); do
+ local t="$(dirname ${f})"
+ if [[ ${t/obj\/} != ${t} || ${t##*.} == a ]]; then
+ continue
+ fi
+ if [[ ! -d ${f} ]]; then
+ if [[ -x ${f} ]]; then
+ exeinto /opt/cuda/sdk/${t}
+ doexe ${f}
+ else
+ insinto /opt/cuda/sdk/${t}
+ doins ${f}
+ fi
+ fi
+ done
+ eend
+}