diff options
author | 2014-04-28 16:58:52 -0400 | |
---|---|---|
committer | 2014-04-28 16:58:52 -0400 | |
commit | 710c20c0bedf5be16536f2c0956c34e0cf180112 (patch) | |
tree | c3a8cd4ecceb48c72c57d5570ef6913be48ab823 | |
parent | s3cmd: update Manifest for 1.5.0_beta1 version (diff) | |
download | jtriley-710c20c0bedf5be16536f2c0956c34e0cf180112.tar.gz jtriley-710c20c0bedf5be16536f2c0956c34e0cf180112.tar.bz2 jtriley-710c20c0bedf5be16536f2c0956c34e0cf180112.zip |
add ebuild for nvidia-cuda-sdk-6.0.37 (#507804)
-rw-r--r-- | dev-util/nvidia-cuda-sdk/ChangeLog | 239 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-sdk/Manifest | 4 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-asneeded.patch | 22 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch | 11 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-sdk/metadata.xml | 21 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild | 150 |
6 files changed, 447 insertions, 0 deletions
diff --git a/dev-util/nvidia-cuda-sdk/ChangeLog b/dev-util/nvidia-cuda-sdk/ChangeLog new file mode 100644 index 0000000..4ed2b67 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/ChangeLog @@ -0,0 +1,239 @@ +# ChangeLog for dev-util/nvidia-cuda-sdk +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/nvidia-cuda-sdk/ChangeLog,v 1.44 2014/01/28 07:04:57 patrick Exp $ + + 28 Jan 2014; Patrick Lauer <patrick@gentoo.org> + -nvidia-cuda-sdk-5.0.35-r1.ebuild: + Remove old as dev-util/nvidia-cuda-toolkit was cleaned up + + 14 Jan 2014; Justin Lecher <jlec@gentoo.org> + nvidia-cuda-sdk-5.0.35-r1.ebuild, nvidia-cuda-sdk-5.5.22.ebuild: + Depend on equal version of toolkit, #497500 + + 12 Jan 2014; Pacho Ramos <pacho@gentoo.org> nvidia-cuda-sdk-5.5.22.ebuild: + amd64 stable, bug #497686 + +*nvidia-cuda-sdk-5.5.22 (11 Aug 2013) + + 11 Aug 2013; Justin Lecher <jlec@gentoo.org> +nvidia-cuda-sdk-5.5.22.ebuild: + Version Bump, #479374 + + 26 Jun 2013; Kacper Kowalik <xarthisius@gentoo.org> + -nvidia-cuda-sdk-2.2-r1.ebuild, -nvidia-cuda-sdk-4.2.9-r1.ebuild, + -nvidia-cuda-sdk-4.2.ebuild, -nvidia-cuda-sdk-5.0.35.ebuild, + nvidia-cuda-sdk-5.0.35-r1.ebuild: + Workaround bug #462602, drop old + +*nvidia-cuda-sdk-5.0.35-r1 (09 Mar 2013) + + 09 Mar 2013; Justin Lecher <jlec@gentoo.org> + +nvidia-cuda-sdk-5.0.35-r1.ebuild: + Install Makefile with examples, #460740 + +*nvidia-cuda-sdk-4.2.9-r2 (23 Jan 2013) + + 23 Jan 2013; Justin Lecher <jlec@gentoo.org> + +nvidia-cuda-sdk-4.2.9-r2.ebuild: + Correct installatoion path of cuda in common.mk, #413137 + + 23 Jan 2013; Justin Lecher <jlec@gentoo.org> nvidia-cuda-sdk-5.0.35.ebuild: + Fix last bit of bad deletion practise + + 21 Jan 2013; Justin Lecher <jlec@gentoo.org> nvidia-cuda-sdk-5.0.35.ebuild, + metadata.xml: + Be more sensitive for presents of files when cleaning, #452944 + + 16 Jan 2013; Justin Lecher <jlec@gentoo.org> nvidia-cuda-sdk-5.0.35.ebuild: + Add missing dep on virtual/mpi with USE=examples, #452040 + + 14 Jan 2013; Justin Lecher <jlec@gentoo.org> metadata.xml: + Take package + +*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 + +*nvidia-cuda-sdk-4.2 (31 Jul 2012) + + 31 Jul 2012; Rick Farina <zerochaos@gentoo.org> +nvidia-cuda-sdk-4.2.ebuild, + nvidia-cuda-sdk-2.02.0807.1535.ebuild: + bump to 4.2 with a few style improvements ;-) + + 05 Feb 2012; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-4.1.ebuild: + Add a check for gcc-4.5+ (bug #401407). + + 05 Feb 2012; Mike Frysinger <vapier@gentoo.org> + nvidia-cuda-sdk-2.02.0807.1535.ebuild, + nvidia-cuda-sdk-2.1.1215.2015.ebuild, nvidia-cuda-sdk-2.2.ebuild, + nvidia-cuda-sdk-2.2-r1.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: + Move to new unpacker eclass for unpack_makeself. + +*nvidia-cuda-sdk-4.1 (29 Jan 2012) + + 29 Jan 2012; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-4.1.ebuild: + Version bump. + +*nvidia-cuda-sdk-4.0 (29 May 2011) + + 29 May 2011; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-4.0.ebuild: + Add NVIDIA CUDA SDK v4.0. + + 12 Dec 2010; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-3.2.ebuild: + Add a check for GCC 4.4, which is necessary to compile the examples (bug + #347497). + +*nvidia-cuda-sdk-3.2 (01 Dec 2010) + + 01 Dec 2010; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-3.2.ebuild: + Version bump. + + 28 Nov 2010; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-3.1.ebuild: + Do not try to install directories with doins. + + 30 Sep 2010; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-2.1.1215.2015.ebuild, nvidia-cuda-sdk-2.2.ebuild, + nvidia-cuda-sdk-2.2-r1.ebuild, nvidia-cuda-sdk-2.3.ebuild, + nvidia-cuda-sdk-3.0_beta1.ebuild, nvidia-cuda-sdk-3.0.ebuild: + Add a dependency on <gcc-4.4 (bug #339106). + + 16 Sep 2010; Tomáš Chvátal <scarabeus@gentoo.org> + nvidia-cuda-sdk-2.1.1215.2015.ebuild, nvidia-cuda-sdk-2.2.ebuild, + nvidia-cuda-sdk-2.2-r1.ebuild, nvidia-cuda-sdk-2.02.0807.1535.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: + virtual/glut -> media-libs/glut + +*nvidia-cuda-sdk-3.1 (03 Jul 2010) + + 03 Jul 2010; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-3.1.ebuild: + Version bump (bug #325833). Thanks to Clemens Rabe for the updated ebuild. + +*nvidia-cuda-sdk-3.0 (21 Mar 2010) + + 21 Mar 2010; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-3.0.ebuild: + Version bump. + +*nvidia-cuda-sdk-3.0_beta1 (08 Feb 2010) + + 08 Feb 2010; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-3.0_beta1.ebuild, metadata.xml: + Add the 3.0 beta SDK. + + 01 Dec 2009; Christian Faulhammer <fauli@gentoo.org> + nvidia-cuda-sdk-2.2-r1.ebuild: + stable x86, bug 293641 + + 07 Aug 2009; <chainsaw@gentoo.org> nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Marked stable as requested by Michal "Spock" Januszewski + <spock@gentoo.org> in bug #276538. Arch-tested by Víctor "VQuicksilver" + Enríquez using K3d. + + 07 Aug 2009; <chainsaw@gentoo.org> nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Marked stable as requested by Michal "Spock" Januszewski + <spock@gentoo.org> in bug #276538. Arch-tested by Víctor "VQuicksilver" + Enríquez using K3d & cuda-profiler. + +*nvidia-cuda-sdk-2.3 (29 Jul 2009) + + 29 Jul 2009; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-2.3.ebuild: + Version bump. + + 18 Jul 2009; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-2.1.1215.2015.ebuild, nvidia-cuda-sdk-2.2.ebuild, + nvidia-cuda-sdk-2.2-r1.ebuild, nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Add info about this package requiring <=gcc-4.3 to build (bug #278137). + + 08 Jul 2009; Christian Faulhammer <fauli@gentoo.org> + nvidia-cuda-sdk-2.02.0807.1535.ebuild: + stable x86, bug 276538 + + 03 Jul 2009; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-2.1.1215.2015.ebuild, nvidia-cuda-sdk-2.2.ebuild, + nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Do not perform any binary checks as this package uses upstream binaries + (bug #274557). + +*nvidia-cuda-sdk-2.2-r1 (03 Jul 2009) + + 03 Jul 2009; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-2.2-r1.ebuild: + New, more configurable ebuild. It is not possible not to install the code + examples and documentation by disabling the 'examples' and 'doc' USE + flags. + + 16 May 2009; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-2.1.1215.2015.ebuild, nvidia-cuda-sdk-2.2.ebuild, + nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Ignore executable stacks in an upstream binary. + + 16 May 2009; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-2.1.1215.2015.ebuild: + Force serial make (bug #266069, comment #25). + +*nvidia-cuda-sdk-2.2 (16 May 2009) + + 16 May 2009; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-2.2.ebuild: + Version bump (bug #269893). + +*nvidia-cuda-sdk-2.1.1215.2015 (16 May 2009) + + 16 May 2009; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-2.1.1215.2015.ebuild, + -nvidia-cuda-sdk-2.10.1215.2015.ebuild: + As NVIDIA changed the versioning scheme of their files, change the latest + version of the package so that it is not identified as newer than 2.2. + + 22 Mar 2009; Michał Januszewski <spock@gentoo.org> + +files/nvidia-cuda-sdk-2.10.1215.2015-vararg_inline_fix.patch, + nvidia-cuda-sdk-2.10.1215.2015.ebuild: + Fix bug #260744 (compilation problems with GCC 4.3.3+). + +*nvidia-cuda-sdk-2.10.1215.2015 (21 Jan 2009) + + 21 Jan 2009; Michał Januszewski <spock@gentoo.org> + +nvidia-cuda-sdk-2.10.1215.2015.ebuild: + Version bump. + + 13 Nov 2008; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Change the default CUDA path to /opt/cuda (bug #245621). + + 29 Oct 2008; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Add missing dependency on GLUT (bug #244182). + + 18 Oct 2008; Michał Januszewski <spock@gentoo.org> + nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Fix the DESCRIPTION field in the ebuild. Remove a spurious RESTRICT. + +*nvidia-cuda-sdk-2.02.0807.1535 (18 Oct 2008) + + 18 Oct 2008; Michał Januszewski <spock@gentoo.org> + +files/nvidia-cuda-sdk-2.02.0807.1535-make_cpp_fix.patch, +metadata.xml, + +nvidia-cuda-sdk-2.02.0807.1535.ebuild: + Initial commit. diff --git a/dev-util/nvidia-cuda-sdk/Manifest b/dev-util/nvidia-cuda-sdk/Manifest new file mode 100644 index 0000000..9fabea7 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/Manifest @@ -0,0 +1,4 @@ +DIST cuda_5.5.22_linux_32.run 686412076 SHA256 0e7aad303807bb0ede8f6f6e825cfcd0f9ddb677bc8cc898ec38990b8226778d SHA512 e2e4fbc78c2e6373b3f81778d8044b299429459e8e27632e86c0d97e6fe7f4db7cd5652044beb0ce7ee3c7abaa7dcec7d85639a2de4b9cc213ab52a2d204aa6b WHIRLPOOL e5df7de03aaec8488a7fa093e272d64b5d3adaedca1458c550d4ae9c6bf2a0ead71496c8a0c9aac966500aa01401e95cc57a951e3a2554e8d823b97c10336850 +DIST cuda_5.5.22_linux_64.run 849417929 SHA256 b997e1dbe95704e0e806e0cedc5fd370a385351fef565c7bae0917baf3a29aa4 SHA512 25233b34a35fdb5ee3479a87c89484a00dcd760837436c263c3eb8731cbd24a9ed3fb57ce2d4e5bf7cd31abb9b0d990b45720a5f6a376b2488de4506a7c57c20 WHIRLPOOL 550594121a53feae4e74a4dc9ba40c4cd2ac91305f23397cd7ea421fcb801e3ce8fcf90f439c966accca44d586bc51d85ef3e211f35fd751dc9299dd07d65175 +DIST cuda_6.0.37_linux_32.run 779831016 SHA256 54084c2c808b0a4af91b5bb9cf0757f40510d6b259cd84373e7af3c90baec172 SHA512 c2e6e16b780a87c8530853dc63e6c8e000bc122428e474fd99a33c19977082eda0ef93f86a981a36c4f884ddcc2fd0d14b2f4f886cccc7c8a3f2c9441ea3c895 WHIRLPOOL 08d0a7a0eb4f6f3c07a939d949f4fa7f8bef8969224156256430de11abf204c00a0b8d6d1a2e37d4985c4dcb1f440f83380de75386dd53bbfc2aa8392e36e840 +DIST cuda_6.0.37_linux_64.run 1032032789 SHA256 991e436c7a6c94ec67cf44204d136adfef87baa3ded270544fa211179779bc40 SHA512 251f87fa797eb0ba40f76d94852c3a8a401057bdc6d921dcaf294d9972755b77b7180bbbfb655aa3fa9be6ea499e558ab02fa122ad225ddb0afdbbf3622483de WHIRLPOOL 88567cf44508cad899ab5591ee22785330b570b1447725ba120c829b9982e4629288a2c6033eb02e091c98b811fe68747d0405eacb6931389eabe05905de4d71 diff --git a/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-asneeded.patch b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-asneeded.patch new file mode 100644 index 0000000..c414578 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-asneeded.patch @@ -0,0 +1,22 @@ +--- a/cuda-samples/0_Simple/cudaOpenMP/Makefile ++++ b/cuda-samples/0_Simple/cudaOpenMP/Makefile +@@ -166,7 +166,7 @@ + endif + endif + +-GOMPLIB ?= $(shell find $(OPENMPDIR)/libgomp* 2>/dev/null) ++GOMPLIB ?= $(shell find $(OPENMPDIR) -type f -name libgomp* 2>/dev/null) + + ifeq ($(GOMPLIB),) + $(info -----------------------------------------------------------------------------------------------) +--- a/cuda-samples/0_Simple/UnifiedMemoryStreams/Makefile ++++ b/cuda-samples/0_Simple/UnifiedMemoryStreams/Makefile +@@ -166,7 +166,7 @@ + endif + endif + +-GOMPLIB ?= $(shell find $(OPENMPDIR)/libgomp* 2>/dev/null) ++GOMPLIB ?= $(shell find $(OPENMPDIR) -type f -name libgomp* 2>/dev/null) + + ifeq ($(GOMPLIB),) + $(info -----------------------------------------------------------------------------------------------) diff --git a/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch new file mode 100644 index 0000000..fd8fc59 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/files/nvidia-cuda-sdk-6.0.37-simpleMPI.patch @@ -0,0 +1,11 @@ +--- a/cuda-samples/0_Simple/simpleMPI/Makefile ++++ b/cuda-samples/0_Simple/simpleMPI/Makefile +@@ -172,7 +172,7 @@ + MPICXX=mpicxx + EXEC=@echo "[@]" + else +- MPI_GCC := $(shell $(MPICXX) -v 2>&1 | grep x86_64-pc-linux-gnu-gcc | wc -l | tr -d ' ') ++ MPI_GCC := $(shell $(MPICXX) -v 2>&1 | grep gcc | wc -l | tr -d ' ') + ifeq ($(MPI_GCC),0) + MPI_CCFLAGS += -stdlib=libstdc++ + MPI_LDFLAGS += -stdlib=libstdc++ diff --git a/dev-util/nvidia-cuda-sdk/metadata.xml b/dev-util/nvidia-cuda-sdk/metadata.xml new file mode 100644 index 0000000..71cb6af --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci</herd> + <maintainer> + <email>jlec@gentoo.org</email> + <name>Justin Lecher</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"> + Build OpenCL binaries. + </flag> + <flag name="cuda"> + Build CUDA binaries. + </flag> + </use> +</pkgmetadata> diff --git a/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild new file mode 100644 index 0000000..79d14c2 --- /dev/null +++ b/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-6.0.37.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2014 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.5.22.ebuild,v 1.3 2014/01/14 18:37:50 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) + +DESCRIPTION="NVIDIA CUDA Software Development Kit" +HOMEPAGE="http://developer.nvidia.com/cuda" +CURI="http://developer.download.nvidia.com/compute/cuda/${MYD}/rel/installers" +SRC_URI=" + amd64? ( ${CURI}/cuda_${PV}_linux_64.run ) + x86? ( ${CURI}/cuda_${PV}_linux_32.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 + virtual/mpi + >=x11-drivers/nvidia-drivers-334.16-r7[uvm] + )" +DEPEND="${RDEPEND}" + +RESTRICT="test" + +S=${WORKDIR}/cuda-samples + +QA_EXECSTACK=( + opt/cuda/sdk/0_Simple/cdpSimplePrint/cdpSimplePrint + opt/cuda/sdk/0_Simple/cdpSimpleQuicksort/cdpSimpleQuicksort + opt/cuda/sdk/bin/x86_64/linux/release/cdpSimplePrint + opt/cuda/sdk/bin/x86_64/linux/release/cdpSimpleQuicksort + ) + +src_unpack() { + unpacker + unpacker run_files/cuda-samples*run +} + +pkg_setup() { + if use cuda || use opencl; then + cuda_pkg_setup + fi +} + +src_prepare() { + export RAWLDFLAGS="$(raw-ldflags)" + 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 "/CC/s:gcc:$(tc-getCC):g" \ + -e "/GCC/s:g++:$(tc-getCXX):g" \ + -e "/ CFLAGS/s|\(:=\)|\1 ${CFLAGS}|g" \ + -e "/ CXXFLAGS/s|\(:=\)|\1 ${CXXFLAGS}|g" \ + -e "/NVCCFLAGS/s|\(:=\)|\1 ${NVCCFLAGS} |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 + + find common/inc/GL -delete || die + find . -type f -name "*\.a" -delete || die + + #sed \ + # -e "/^LDFLAGS/s|\(:=\)$|\1 ${LDFLAGS}|g" \ + # -i 0_Simple/simpleMPI/Makefile || die + + ## -e "/ALL_LDFLAGS/s|:=|:= ${RAWLDFLAGS} |g" \ + # sed corrupts the simpleMPI Makefile, resulting in a failed libstdc++ detection. + # Therefore we need this patch, if we don't wont to touch the sed command above. + epatch "${FILESDIR}"/${P}-simpleMPI.patch +} + +src_compile() { + use examples || return + local myopts verbose="verbose=1" + use debug && myopts+=" dbg=1" + export FAKEROOTKEY=1 # Workaround sandbox issue in #462602 + emake \ + cuda-install="${EPREFIX}/opt/cuda" \ + CUDA_PATH="${EPREFIX}/opt/cuda/" \ + ${myopts} ${verbose} +} + +src_test() { + local _dir _subdir + + addwrite /dev/nvidiactl + addwrite /dev/nvidia0 + + for _dir in {0..9}*; do + pushd ${_dir} > /dev/null + for _subdir in *; do + emake -C ${_subdir} run + done + popd > /dev/null + done +} + +src_install() { + local i j f t crap="" + if use doc; then + ebegin "Installing docs ..." + dodoc -r doc *.txt + eend + fi + + crap+=" *.txt doc " + + ebegin "Cleaning before installation..." + for i in ${crap}; do + if [[ -e ${i} ]]; then + find ${i} -delete || die + fi + done + 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 +} |